Implement engine_signalSuperchainV1 #148
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implementation for engine_signalSuperchainV1 method.
RPC Spec: See https://github.com/ethereum-optimism/specs/blob/main/specs/protocol/exec-engine.md#engine_signalsuperchainv1
none
, defaultpatch
minor
major
When
rollup.halt
is set to a specific version diff-level, the node will halt when the version difference is more significant than the diff-level specified. More specific examples of this behavior is explained in the testing section below.When
rollup.halt
is not set, but there is a significant version difference, the node will leave logs with corresponding severity as well.Based on ethereum-optimism/op-geth#128 with minimal changes.
Testing
I haven't found any traces of Engine API testing in the op-erigon repo, so I did manual testings by triggering
engine_signalSuperchainV1
under different circumstances.Start Node: RPC running at port 8545:
Scenario 1: Up-to-date engine protocol version
Node version: 3.1.1
Required version: 3.0.0
Recommended version: 3.1.0
Result is same for up-to-date engine for all flags
RPC Sent:
Result:
Scenario 2: Recommanded patch-outdated engine protocol version
Node version: 3.1.1
Required version: 3.1.0
Recommended version: 3.1.2
RPC Sent:
Result:
Scenario 3: Required patch-outdated engine protocol version
Node version: 3.1.1
Required version: 3.1.2
Recommended version: 3.1.2
RPC Sent:
Result:
Halting is ignored for rollup.halt=minor/major when the version diff is only patch-level.
./build/bin/erigon OTHER_FLAGS --rollup.halt=minor|major
RPC Sent:
Result:
Scenario 4: Required minor-outdated engine protocol version
Node version: 3.1.1
Required version: 3.2.0
Recommended version: 3.2.0
./build/bin/erigon OTHER_FLAGS --rollup.halt=patch|minor
RPC Sent:
Result:
Halting is ignored for rollup.halt=major when the version diff is only minor-level.
RPC Sent:
Result:
Scenario 5: Required major-outdated engine protocol version
Node version: 3.1.1
Required version: 4.0.0
Recommended version: 4.0.0
RPC Sent:
Result:
Halting is ignored for rollup.halt=none.
RPC Sent:
Result: