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
In #1518 we saw that with updates from external dependencies, bincode serialization on things we commit to the state sometimes change, enforcing us to implement weird workarounds.
I am going to admit that we were in the wrong by not implementing such a system for everything we write to state / accessory state:
No encoding raw bytes StateValue / StateVec / StateMap
Using existing ethereum encoding (e.g. RLP) after reading from such State*
For example, the serialization of header structure in alloy::consensus changes, and it will change, because it's not something you should commit to. It's for RPC implementations...
However, the encode/decode function of the header on the other hand, won't ever change, and always has to be backwards compatible. Because no one will go back and change what's committed in Ethereum. Those encode / decode functions abide by Ethereum spec.
If we were to implement such a thing, we wouldn't worry about updating reth or alloy, because we would always pull the encoded bytes from state and decode in to the new versions struct. (BTW we can have a "CustomCodec" which calls a trait function of a type, which we hook to these encode/decode functions. BUT WE CAN'T IMPLEMENT TRAITS FOR EXTERNAL DEPENDENCIES SO A LITTLE BIT OF UGLIER CODE AND HANDLING ENCODING FOR STATE* MANUALLY EVERYWHERE IS FINE)
This will be very very very hard to implement on testnet probably, however, we can do it right before mainnet, and worry about updating the testnet later.
The text was updated successfully, but these errors were encountered:
In #1518 we saw that with updates from external dependencies, bincode serialization on things we commit to the state sometimes change, enforcing us to implement weird workarounds.
I am going to admit that we were in the wrong by not implementing such a system for everything we write to state / accessory state:
For example, the serialization of header structure in alloy::consensus changes, and it will change, because it's not something you should commit to. It's for RPC implementations...
However, the encode/decode function of the header on the other hand, won't ever change, and always has to be backwards compatible. Because no one will go back and change what's committed in Ethereum. Those encode / decode functions abide by Ethereum spec.
If we were to implement such a thing, we wouldn't worry about updating reth or alloy, because we would always pull the encoded bytes from state and decode in to the new versions struct. (BTW we can have a "CustomCodec" which calls a trait function of a type, which we hook to these encode/decode functions. BUT WE CAN'T IMPLEMENT TRAITS FOR EXTERNAL DEPENDENCIES SO A LITTLE BIT OF UGLIER CODE AND HANDLING ENCODING FOR STATE* MANUALLY EVERYWHERE IS FINE)
This will be very very very hard to implement on testnet probably, however, we can do it right before mainnet, and worry about updating the testnet later.
The text was updated successfully, but these errors were encountered: