Skip to content

Darkside TXIDs are incorrect #456

@AloeareV

Description

@AloeareV

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions