You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current p2sh address implementation itself doesn't depend on ErgoTree version. Means the actual script can include anything supported by current (at the time of spending) network protocol. For example it can contain codes not yet implemented in v5.0, but those to be implemented in v6.0. In this case the box will be unspendable until v6.0 is activated.
The actual scriptbytes come from the context variable at the time of spending. Those are not ErgoTree (but serialized Value expression), thus don't have header and version. They can contain any bytes as long as deserialization is successfull. When a p2sh box is created, there is no check of those scriptbytes.
[by kushti in Discord]
I think tree version should be fixed for P2SH script.
Otherwise, with having the same P2SH I will get payments to different scripts before and after ErgoTree update.
Trackers will have to check all the tree versions then.
Another option is to include tree version byte to P2SH address, but then all the documentation around to be updated.
The text was updated successfully, but these errors were encountered:
Motivation
The current p2sh address implementation itself doesn't depend on ErgoTree version. Means the actual script can include anything supported by current (at the time of spending) network protocol. For example it can contain codes not yet implemented in v5.0, but those to be implemented in v6.0. In this case the box will be unspendable until v6.0 is activated.
The actual scriptbytes come from the context variable at the time of spending. Those are not ErgoTree (but serialized Value expression), thus don't have header and version. They can contain any bytes as long as deserialization is successfull. When a p2sh box is created, there is no check of those scriptbytes.
[by kushti in Discord]
The text was updated successfully, but these errors were encountered: