0

I am stuck in developing an understanding of how a node could go from SegWit TXID to lookup Witness data, or vice-versa.

I see that eventually a witness TXID is calculated and included in a Merkle Tree of all SegWit transactions for a block but I'm unsure if:

(a) this creates the link I'm looking for or...

(b) how you would do so before that Merkle Tree of SegWit transactions is appended to the block.

1 Answer 1

0

I am stuck in developing an understanding of how a node could go from SegWit TXID to lookup Witness data, or vice-versa.

This is not a problem that occurs. Unconfirmed transactions (ones not yet in blocks, or kept in the mempool) are indexed by their txid, and the witness data is stored along with the transaction. When a node needs to find the witness data for a given txid, it just looks in its index.

1
  • Understood, your time is much appreciated - thank you. Sep 7, 2023 at 17:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.