-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OP node shutter state machine #7
Comments
Optionally we could also trigger a state change when we are in disabled and receive a decryption key. The op node could blindly trust the shutter node and assume that shutter got enabled. It would look like this stateDiagram
direction LR
s1: Disabled
note left of s1
success by engine API => Block could be produced
error by engine API => expects decryption key
end note
s2: Enabled
note right of s2
success by engine API => Block could be produced in time with decryption key
error by Engine API => expects vanilla block
timeout => did not receive decryption key during configured shutter timeout
end note
s1 --> s2: error / (1)
s1 --> s2: decryption key / (1)
s2 --> s1: error / (3)
s2 --> s1: timeout / (2)
s1 --> s1: success / (3)
s2 --> s2: success / (1)
|
Looks reasonable to me.
Both could work, the second saves one "cycle" (error returned from op-geth) which is negligible given that shutter hopefully won't be disabled and enabled very frequently. So I'd go with whatever is cleaner to implement (probably the original option). |
OP node state machine
The OP node is responsible for requesting the next block via the engine API. Which type of block in a shutter system is to be requested is determined by the state of the shutter system contracts.
From the OP node's perspective there are three different block types to be requested:
Requirements
Conditions
Internal State
The op node has different conditions to be met to request the the next block.
For that it needs to keep some internal state to know in which mode the rollup is running.
In its easiest form it's a flag of what the op node thinks the next block should be. Shutterized or unshutterized.
However, it is possible that the node's state is not equal to the actual state at any point in time, thus the node could accidentally request a different block type. This must result in an error being returned by op-geth.
This actually is the input to the internal op-node's shutter state transition.
The text was updated successfully, but these errors were encountered: