-
Notifications
You must be signed in to change notification settings - Fork 88
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
feat(proto, conductor, cd)!: changes for Forma migration #1843
Conversation
|
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.
OK, I thought about this code some more and I still think that regular operation should not be conflated with errors.
At the same time I think we are not being good citizens in that we keep hitting an endpoint (Sequencer) and then just throwing away the data as is currently the case in execute_soft
. Instead, Conductor should actively shut down the channels to the sequencer and celestia tasks after having reached the stop-height.
Then you can have a fall-through case where the executor task just shuts down normally if both channels are closed.
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.
Attempted to do so via dropping in 00b10a4. Let me know if this works!
self.state.sequencer_stop_block_height(), | ||
)) | ||
.wrap_err( | ||
"soft height met or exceeded sequencer stop height, attempting restart with new \ |
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.
Executor does not get to decide this. The decision on whether or not to restart lies with the conductor task one level up.
@@ -457,19 +505,36 @@ impl Executor { | |||
err, | |||
))] | |||
async fn execute_firm(&mut self, block: ReconstructedBlock) -> eyre::Result<()> { |
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.
This should be done in this PR. The current restart logic is with respect to an error encountered from an RPC. This new restart logic is due to regular operation.
I don't think a cancellation token is necessary here. I think it's sufficient to have the executor task actively close its channel to the celestia/sequencer tasks. Then you get those 2 tasks to shut down for free while maintaining a consistent view. Only need to remember to not kill the entire conductor if one of those goes down
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.
Should we add a field here to indicate to conductor whether or not it should stop or restart on having reached the stop height?
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 don't think it's strictly necessary, but I wonder if it may be better UX. I'll confer with @mycodecrafting to see what he thinks
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.
Surfacing offline discussion with @mycodecrafting that this would be better UX. Noting that the changes required in Geth to accomplish this involve peeking at the next fork in the Geth genesis to see whether halt: true
, and then including that information in GenesisInfo
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.
&mut self, | ||
block: ReconstructedBlock, | ||
) -> eyre::Result<Option<StopHeightExceded>> { | ||
if self.is_firm_block_height_exceded(&block) { |
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.
Should we also close the firm block channel here, similar to how we close the soft block channel?
Closing in favor of #1928. |
Summary
Makes the changes necessary in the monorepo to migrate Forma to Mainnet.
Background
Migrating Forma to mainnet necessitates introducing stop and start logic into the Conductor. This makes the proto and Conductor changes necessary for that. In addition to this, this will allow for future needs to stop and start EVMs on our networks. These changes will also need to be reflected in the
GenesisInfo
sent by rollups to the conductor.The shutdown and restart logic for the Conductor should be as follows:
GenesisInfo
with new start/stop heights (and potentially chain IDs).The aforementioned rollup changes to be made in
astria-geth
necessitate changing our current charts config for the following. "Forks" now describes a set of instructions for when and how to stop and restart the EVM at different heights, such that changes (such as network migration) can be made.Changes
sequencer_genesis_block_height
tosequencer_start_block_height
inGenesisInfo
(in the execution API).sequencer_stop_block_height
,rollup_start_block_height
,sequencer_chain_id
, andcelestia_chain_id
, andhalt_at_stop_height
toGenesisInfo
.rollup_start_block_height
inGenesisInfo
, so that Conductor doesn't start from rollup height 1 again after restarting.astriaForks
to EVM rollup config, to reflect changes inastria-geth
: https://github.com/astriaorg/astria-geth/pull/59/files.halt_at_stop_height
istrue
, and restart otherwise.Testing
check_for_restart_ok
unit test.SoftAndFirm
mode to ensure the conductor shuts down at the stop height ifGenesisInfo.halt_at_stop_height
istrue
.Changelogs
Changelogs updated
Breaking Changelist
sequencer_stop_block_height
being read from wire format as 0). Thus, rollups will need to provide an updatedGenesisInfo
to conductor (includingastria-geth
).GenesisInfo
Related Issues
closes #1841