contracts
contracts copied to clipboard
feat: Use standard RLP transactions
Description
Updates our sequencer entrypoint and ECDSA contracts to use the standard RLP encoding that we're using in geth now.
Metadata
Fixes
- Fixes roadmap#754
Contributing Agreement
- [x] I have read and understood the Optimism Contributing Guide and Code of Conduct and am following those guidelines in this pull request.
Overall good changes. The abi is changing, we need to make sure to not break everything when we publish these changes. Also we dont have hardhat deploy so there are no deployment artifacts in this repo so we need to be mindful about this change.
The calldata size of using a RLP encoded tx is about ~250 gas more than using the custom serialization. Trading a bit of cost for simplicity, but its possible that the gas usage was decreased elsewhere in these changes. We really need automated gas metering in CI
Note that this change must be done in a way that is backwards compatible with the current ctc elements. From the point of view of geth, the old contract must be used when syncing the initial set of transactions. This makes me lean towards not changing the contract and adding a new one that is OVM_SequencerEntrypointv2. This way geth can use the old sequencer entrypoint to sync and switch out at a certain point.
This means that geth needs the old serialization logic still and we need a way to selectively set rawTransaction in the data transport layer based on the how the transaction is serialized
CI Fails at:
h_l2_1 | DEBUG[03-16|01:02:16.924] Calling Known Contract ID=85f757a4 Name=OVM_ExecutionManager Method=run
geth_l2_1 | DEBUG[03-16|01:02:16.924] Calling Known Contract ID=85f757a4 Name=OVM_StateManager Method=isAuthenticated
geth_l2_1 | DEBUG[03-16|01:02:16.924] Calling Known Contract ID=85f757a4 Name=OVM_StateManager Method=hasAccount
geth_l2_1 | DEBUG[03-16|01:02:16.924] Calling Known Contract ID=85f757a4 Name=OVM_StateManager Method=testAndSetAccountLoaded
geth_l2_1 | DEBUG[03-16|01:02:16.924] Calling Known Contract ID=85f757a4 Name=OVM_StateManager Method=getAccountEthAddress
geth_l2_1 | DEBUG[03-16|01:02:16.924] Calling Known Contract ID=85f757a4 Name=OVM_SequencerEntrypoint Message="no method with id: 0x00dede53"
geth_l2_1 | DEBUG[03-16|01:02:16.924] Calling Known Contract ID=85f757a4 Name=OVM_ExecutionManager Method=ovmCHAINID
geth_l2_1 | DEBUG[03-16|01:02:16.925] Reached the end of an OVM execution ID=85f757a4 Return Data=0x Error="ovm execution failed"
geth_l2_1 | INFO [03-16|01:02:16.925] New block index=5 l1-timestamp=1615856583 l1-blocknumber=64 tx-hash=0x40483b4c114a3330ce0afb10500ad4ca304c1a327c5fcab06f0b9b19353074de queue-orign=0 type=0 gas=294814 fees=0 elapsed=4.505ms
Converting to draft until checks pass.
Is this dead?