Closed monsterbitar closed 2 years ago
Oh, good catch! This looks like it was just an honest mistake by whoever wrote this part of the spec. For sanity, I confirmed, and that's what our codebase says too: https://github.com/softwareverde/bitcoin-verde/blob/master/src/main/java/com/softwareverde/bitcoin/transaction/input/TransactionInputDeflater.java#L17
And here is where the transaction signer grabs the SequenceNumber, which is serialized as 4 bytes (not 8): https://github.com/SoftwareVerde/bitcoin-verde/blob/master/src/main/java/com/softwareverde/bitcoin/transaction/signer/BitcoinCashTransactionSignerUtil.java#L109
Merging.
According to https://github.com/bitcoincashorg/bitcoincash.org/blob/master/spec/replay-protected-sighash.md, the nSequence field should be 4-byte little endian.