segregated witness - How Does A Node Get Infomation From The TxID - that is, isn't the TxID the SHA^2(256) of various transaction components?

segregated witness – How Does A Node Get Infomation From The TxID – that is, isn’t the TxID the SHA^2(256) of various transaction components?

 

Yes, all TXIDs are only calculated from non-witness data. While many nodes have a complete copy of the blockchain, which does contain all transactions, most nodes do not have a full transaction index.


via https://developer.bitcoin.org/reference/p2p_networking.html

Nodes will advertise unconfirmed transactions. These are then available to be shared upon a getdata tx request which will be responded to with a tx message.

If the transaction is already confirmed, the peer should know in which block the transaction was included (from the context in which it heard about the transaction in the first place), and would either request the whole block, or a Merkle branch in the form of a merkleblock message.

You can read more about the P2P messages for example here: https://developer.bitcoin.org/reference/p2p_networking.html



Source link

Leave a Comment

Your email address will not be published.