-
Notifications
You must be signed in to change notification settings - Fork 86
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
Implement ZIP 244 txid logic for v5 transactions #392
Comments
#367 had test vectors that include txids; these passed because the test conditional was backwards, and checking that the derived txid didn't match the test vector. lightwalletd/parser/transaction_test.go Lines 88 to 90 in ab4c0fe
|
This is a shortcut fix. Instead of replicating the zip244 transaction logic that's implemented in librustzcash: zcash_primitives/src/transaction/components/orchard.rs cheat by calling getblock with verbose level 1, which prints the txid of each transaction. This currently requires calling getblock twice, once for the raw hex (as we have always done), and again to get the transaction IDs. An easy improvement would be to add the raw hex to verbosity 1 result. (Or have a new verbosity that shows both.)
This is a shortcut fix. Instead of replicating the zip244 transaction logic that's implemented in librustzcash: zcash_primitives/src/transaction/components/orchard.rs cheat by calling getblock with verbose level 1, which prints the txid of each transaction. This currently requires calling getblock twice, once for the raw hex (as we have always done), and again to get the transaction IDs. An easy improvement would be to add the raw hex to verbosity 1 result. (Or have a new verbosity that shows both.)
This is a shortcut fix. Instead of replicating the zip244 transaction logic that's implemented in librustzcash: zcash_primitives/src/transaction/components/orchard.rs cheat by calling getblock with verbose level 1, which prints the txid of each transaction. This currently requires calling getblock twice, once for the raw hex (as we have always done), and again to get the transaction IDs. An easy improvement would be to add the raw hex to verbosity 1 result. (Or have a new verbosity that shows both.)
This is a shortcut fix. Instead of replicating the zip244 transaction logic that's implemented in librustzcash: zcash_primitives/src/transaction/components/orchard.rs cheat by calling getblock with verbose level 1, which prints the txid of each transaction. This currently requires calling getblock twice, once for the raw hex (as we have always done), and again to get the transaction IDs. An easy improvement would be to add the raw hex to verbosity 1 result. (Or have a new verbosity that shows both.)
Now "go test ./..." passes, it had broken due to the V5 transaction (NU5) changes in zcash#392. I didn't have time to fix the tests at the time. Also, this fixes a few lint problems.
Now "go test ./..." passes, it had broken due to the V5 transaction (NU5) changes in #392. I didn't have time to fix the tests at the time. Also, this fixes a few lint problems.
Reopening because this shouldn't have been closed by #393 (which only partially fixed the problem, the internal code still derives the wrong txid and needs fixing). |
@str4d, prompted by your recent comment, I began looking into this and discovered that the Golang version of Since this has still not been implemented, I went ahead and wrote a patch to Think of it as a short-term improvement until Golang can implement The lightwalletd PR is #449 and the corresponding zcashd PR is zcash/zcash#6747. (These can be merged and deployed in either order.) |
Support for parsing v5 transactions (as specified in ZIP 225) was added in #367. However, the txid computation for v5 transactions (as specified in ZIP 244) was not implemented. This means that at present,
lightwalletd
returns incorrect txids for v5 transactions in compact blocks:lightwalletd/common/common.go
Lines 261 to 274 in ab4c0fe
lightwalletd/parser/block.go
Lines 108 to 127 in ab4c0fe
lightwalletd/parser/transaction.go
Lines 379 to 383 in ab4c0fe
lightwalletd/parser/transaction.go
Lines 346 to 365 in ab4c0fe
The text was updated successfully, but these errors were encountered: