-
Notifications
You must be signed in to change notification settings - Fork 3k
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: Persist synchroniser state #6105
Conversation
|
✅ Deploy Preview for opstack-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #6105 +/- ##
===========================================
+ Coverage 44.48% 44.78% +0.29%
===========================================
Files 443 307 -136
Lines 29058 23540 -5518
Branches 691 0 -691
===========================================
- Hits 12926 10542 -2384
+ Misses 15084 12019 -3065
+ Partials 1048 979 -69
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hey @ajsutton! This PR has merge conflicts. Please fix them before continuing review. |
7fe2f49
to
4352684
Compare
Improve commenting/organisation.
Log info about loaded sequencer state
@protolambda I've added some e2e tests in here. I was going to do it as a follow up but in implementing them I discovered that having the loading of persisted config mixed in with CLI option parsing made it impossible to test since the e2e tests don't do the CLI parsing. So I've moved it to a method on |
6610be1
to
4163278
Compare
This PR has been added to the merge queue, and will be merged soon. |
This PR is next in line to be merged, and will be merged as soon as checks pass. |
1 similar comment
This PR is next in line to be merged, and will be merged as soon as checks pass. |
Description
Adds a
--rpc.admin-state
CLI option to specify a file to persist config changes made via the RPC Admin APIs to. Currently that's just whether the sequencer is started or stopped.--sequencer.stopped
in particular)--sequencer.stopped
optionThe state is persisted as a JSON file so that we can extend it with additional options in the future if need be. The code for persistence has been kept simple and takes advantage of there only being one value currently - it can be refactored to be more complex and merge multiple values in the future if needed.
The file is written with maximal safety - updates are first written to a temp file, fsync'd and then renamed into place.
Tests
Unit tests added around the persistence code. Manual testing for the actual CLI interactions. Will investigate cli tests or e2e tests for this in a follow up PR.
Metadata