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
Discussion started in #326 which are about how to supply salt value to contract-creating transaction in Sharding where CREATE2 style contract creation is implemented. CREATE2 takes in a value salt and init code code, address of the new contract is derived from hashing these two values together: sha3(salt | code).
In the short term, we can simply add a salt field in transaction format, but this field is only useful in contract creation transactions. EIP232 provides a more elastic format which adopts the notion of a version(or format) number. With EIP232 we can assign different type of transaction with different version/format number which corresponds to different transaction format.
How can it be fixed
Implement EIP232 in Sharding. @pipermerriam provides a rough sketch of the possible implementation in the thread(#326 (comment)):
Quote:
We have an outer transaction class which contains a mapping of version numbers to inner transaction classes. Then, during initialization, we decode the outer data packet, and then lookup the appropriate inner transaction class and use it to decode the inner data packet. Then we put some convenience APIs on the outer class to allow direct property access to the inner transaction properties.
The text was updated successfully, but these errors were encountered:
What is wrong?
Discussion started in #326 which are about how to supply
salt
value to contract-creating transaction in Sharding whereCREATE2
style contract creation is implemented.CREATE2
takes in a valuesalt
and init codecode
, address of the new contract is derived from hashing these two values together:sha3(salt | code)
.In the short term, we can simply add a
salt
field in transaction format, but this field is only useful in contract creation transactions. EIP232 provides a more elastic format which adopts the notion of a version(or format) number. With EIP232 we can assign different type of transaction with different version/format number which corresponds to different transaction format.How can it be fixed
Implement EIP232 in Sharding.
@pipermerriam provides a rough sketch of the possible implementation in the thread(#326 (comment)):
Quote:
The text was updated successfully, but these errors were encountered: