-
Notifications
You must be signed in to change notification settings - Fork 30
Conversation
Maybe we should rename |
Also @tynes you might want to add to this PR & delete all the newly dead code in the |
rollup/sync_service.go
Outdated
@@ -640,5 +642,92 @@ func (s *SyncService) ApplyTransaction(tx *types.Transaction) error { | |||
if err != nil { | |||
return fmt.Errorf("invalid transaction: %w", err) | |||
} | |||
|
|||
// Set the raw transaction data in the meta | |||
txRaw, err := getRawTransaction(*tx) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Assuming the upgrade to use standard RLP serialization, this will be able to be removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just tried this branch against my WIP encoding PR (https://github.com/ethereum-optimism/contracts/pull/300/files) and replaced getRawTransaction(*tx)
with rlp.EncodeToBytes(tx)
and it worked first try. Woot!
go-ethereum/internal/ethapi/api.go Line 1201 in bfa3007
Update: |
This results in mismatched state roots. To reproduce: $ ./scripts/start.sh --rollup.clienthttp http://127.0.0.1:7878 --verifier --datadir $HOME/.ethereum --rollup.statedumppath https://raw.githubusercontent.com/ethereum-optimism/regenesis/master/mainnet/1.json From https://github.com/ethereum-optimism/scripts $ VERIFIER_ENDPOINT=http://127.0.0.1:8545 SEQUENCER_ENDPOINT=https://mainnet.optimism.io node scripts/verifier/compare-verifier-sequencer.js The |
I've updated a branch in the contracts repo based on the contracts that are currently deployed to production to include the fixes required to get this to work. The branch is found here: $ yarn serve Then when starting geth, use the flag: --rollup.statedumppath http://127.0.0.1:8081/state-dump.latest.json Doing a state root check will not be sufficient since the genesis state roots will be different since this involves a change to the contract code of a predeploy. Working towards syncing mainnet and then will do a state diff to see if there are any differences. The only difference should be the codeHash for the sequencer entrypoint |
With the addition of 3319556 then ethereum-optimism/contracts#303 is not needed to be merged and it will also prevent more difficulties in managing versions and we can move towards ethereum-optimism/contracts#300 |
f2114cb adds a safety check with an error log if a transaction with no raw is detected. This should never happen but will prevent a panic in case it does |
Description
Makes L2Geth operate on raw tx data!
Metadata
Fixes
Contributing Agreement