Skip to content
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

Darkside TXIDs are incorrect #456

Open
AloeareV opened this issue Sep 14, 2023 · 2 comments
Open

Darkside TXIDs are incorrect #456

AloeareV opened this issue Sep 14, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@AloeareV
Copy link

AloeareV commented Sep 14, 2023

What is the bug?
Darkside txids are incorrect

Additional context
In a production server, the txid issue is bypassed according to this comment:

func getBlockFromRPC(height int) (*walletrpc.CompactBlock, error) {
// `block.ParseFromSlice` correctly parses blocks containing v5
// transactions, but incorrectly computes the IDs of the v5 transactions.
// We temporarily paper over this bug by fetching the correct txids via a
// verbose getblock RPC call, which returns the txids.
//

This doesn't help on darkside, though

func darksideSetTxID(tx *parser.Transaction) {
// SHA256d
// This is correct for V4 transactions, but not for V5, but in this test
// environment, it's harmless (the incorrect txid calculation can't be
// detected). This will be fixed when lightwalletd calculates txids correctly .

Zingo, and I believe some other lightwallets (although I haven't investigated this), when it sends a transaction, it calculates the transaction ID of the transaction it's submitting, and is then confused when the on-chain txid doesn't match what it deterministically should be.

@zancas
Copy link
Contributor

zancas commented Sep 14, 2023

Hi @LarryRuane are you aware of this issue where there's a discrepancy between the TxID that's produced for Version 5 transactions, and the one that's specified in the protocol?

@LarryRuane
Copy link
Collaborator

Hi @zancas, yes, I'm aware of this problem, see #392. As I said in the comment quoted above, I didn't think it matters in darkside mode (and we have a workaround for regular (production) mode). But if it does matter (that is, if it's a problem for some wallet testing), we should bump up the priority of getting this fixed.

Can someone give me a sense for the urgency to fix this?

I did look into fixing it recently, but the official blake2b Golang package support "personalization" which is required. See #392 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants