-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug: Coinbase funds are not spendable in zebra regtest mode. #9082
Comments
Transparent outputs in transactions spending coinbase inputs is now allowed on Regtest in #9085, but the logs in this issue indicate that the rejected transactions are using the wrong consensus branch id. Switching from NU6 to NU5 or NU5 to NU6 could be a quick fix. |
Thanks for looking into this. One of our wallet devs will have a look at this this week. Its interesting that this works for zcashd but not zebrad though, but maybe there are stronger tx acceptance rules in zebrad? |
Hey, I think we may have solved this, I'm not sure 100% what it was exactly but there was a part of zcash-local-net that had not been updated for NU6. Im still running tests but so far everything is looking good. I'm sorry if you have wasted time looking into this for us. I think it has possibly highlighted some bugs in other codebases though. We have run this test using lwd-zcashd, lwd-zebrad, zaino-zcashd and zaino-zebrad and found the following behaviour:
I will post this in the discord as it seams less to do with zebra, and will be adding a fix for zaino's bad behaviour. |
What happened?
I expected to see this happen:
Funds received from mining rewards should be spendable by the wallet as is the case when using zcashd.
Instead, this happened:
Any transactions containing coinbase funds are rejected by zebra.
The following error is returned in zingolib's (wallet) log :
2024-12-11T23:49:16.858270Z ERROR zingolib::utils::txid: server returned invalid txid Invalid character 'i' at position 2
The following error is returned in zebrad's log:
2024-12-11T23:49:16.857789Z INFO zebra_rpc::server::rpc_call_compatibility: RPC error: Server error: failed to validate tx: WtxId("private"), error: transaction did not pass consensus validation: transaction uses an incorrect consensus branch id in call: method = "sendrawtransaction", params = Array([String("050000800a27a726b4d0d6c2000000008e00000002e81f75bc5edf9c3500b28dd23ac213efd9deb602ed6...
What were you doing when the issue happened?
Order of operations in test:
A test showing this behaviour (
lightwalletd_zebrad_basic_send
) can be found here: [https://github.com/idky137/zcash-local-net/blob/fcd0298ffb876570224de6dc2acdd44f7d3f205f/tests/integration.rs#L385].Similar tests using Zcashd and Zaino can be found in the same file for comparison.
Zebra logs
Zebra Version
zebrad 2.1.0
Which operating systems does the issue happen on?
OS details
Linux works 6.1.0-28-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.119-1 (2024-11-22) x86_64 GNU/Linux
Additional information
Before [https://github.com//pull/9063] merged a different error was being hit where any block containing transactions spending coinbase funds were rejected. This is no longer the case but the transaction withing the blocks still are.
*NOTE: When the same test is run with Zaino instead of Lightwalletd the Following Error is returned by Zaino:
called Result::unwrap()on anErrvalue: CompleteAndBroadcast(Broadcast(Broadcast("Send Error: status: Internal, message: \"Error: JsonRPC Client Error: Error: Serialization/Deserialization Error: missing fieldresult at line 1 column 202\", details: [], metadata: MetadataMap { headers: {\"content-type\": \"application/grpc\", \"date\": \"Fri, 06 Dec 2024 15:36:08 GMT\", \"content-length\": \"0\"} }")))
The text was updated successfully, but these errors were encountered: