Two questions about segwit implementation



Summary:

In a discussion about segwit-enabled inputs in transactions, Johnson Lau explains that validators have no way of knowing which inputs are segwit until they look up the UTXO set. The information given to validators about an input is limited to the 36-byte outpoint, which does not indicate whether it is segwit-enabled or not. Therefore, there needs to be a way to inform the validator that "the witness for this input is empty," and this is where the "00" comes in.Aymeric Vitte responds by suggesting that the "00" may not be necessary. He argues that the person creating the transaction knows which inputs are segwit-enabled and can therefore associate the correct input with the correct witness data without using "00." However, upon further reflection, Aymeric realizes that he had not phrased his initial statement correctly. If the validator sees an empty or witness script in scriptSig, then this is a segwit input. By doing this one-by-one, the validator can associate the correct segwit data to the correct segwit input, making the use of "00" unnecessary.


Updated on: 2023-06-13T19:09:25.736833+00:00