refactor(bridge-withdrawer)!: refactor startup to a separate subtask and remove balance check from startup#1190
Merged
itamarreif merged 46 commits intomainfrom Jul 9, 2024
Conversation
…idge-withdrawer-errorscleanup
…idge-withdrawer-errorscleanup
…idge-withdrawer-startup-fixes
…idge-withdrawer-startup-fixes
…idge-withdrawer-startup-fixes
…idge-withdrawer-startup-fixes
noot
reviewed
Jun 20, 2024
crates/astria-bridge-withdrawer/src/bridge_withdrawer/ethereum/watcher.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 20, 2024
crates/astria-bridge-withdrawer/src/bridge_withdrawer/submitter/tests.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 20, 2024
crates/astria-bridge-withdrawer/src/bridge_withdrawer/submitter/tests.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 20, 2024
crates/astria-bridge-withdrawer/src/bridge_withdrawer/submitter/tests.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 20, 2024
crates/astria-bridge-withdrawer/src/bridge_withdrawer/startup.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 20, 2024
crates/astria-bridge-withdrawer/src/bridge_withdrawer/startup.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 20, 2024
crates/astria-bridge-withdrawer/src/bridge_withdrawer/startup.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 20, 2024
Contributor
noot
left a comment
There was a problem hiding this comment.
overall looks good, only some minor comments!
…idge-withdrawer-startup-fixes
…idge-withdrawer-startup-fixes
SuperFluffy
approved these changes
Jul 8, 2024
quasystaty1
approved these changes
Jul 8, 2024
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 9, 2024
…and remove balance check from startup (#1190) ## Summary This refactors some of the startup logic into a separate startup subtask. It also removes the minimum expected balance check from the startup logic, as that is not necessary. ## Background The original startup logic had the `Submitter` running parts of the startup routine that weren't relevant to it. this moves that logic out to the `Startup` task. The balance check is removed because if a sequencer transaction with insufficient balance is submitted it will just fail execution and the service will restart. Requiring the check in the startup logic results in clunky operation of the service, since launching it before funding it will cause it to crash. ## Changes - Introduce `Startup` object and task - `Watcher` and `Submitter` now wait for the `Startup` to update the global state object with startup info before running their startup logic, whereas before we just had the `Watcher` wait on the `Submitter` to send a message on the `oneshot` channel. - Cleaned up some of the tryhard configs with helper funcs to be less confusing ## Breaking Changes - Remove the balance check from startup and the associated configs. issue linked below ## Testing - Updated some of the `Submitter`-specific tests to reflect changes to the startup logic. closes #1229
…idge-withdrawer-startup-fixes
steezeburger
added a commit
that referenced
this pull request
Jul 15, 2024
* main: feat(cli): add cmd to collect withdrawal events and submit as actions (#1261) fix(core, bridge, sequencer)!: dismabiguate return addresses (#1266) fix(withdrawer): support withdrawer address that differs from bridge address (#1262) (core, sequencer)!: generate serde traits impls for all protocol protobufs (#1260) fix(charts): add resources for sequencer/cometbft (#1254) chore(sequencer)!: add metrics (#1248) fix(sequencer-utils): fixes issue in `parse_blob` tests (#1243) feat(core, proto)!: make bridge unlock memo string (#1244) fix(conductor): don't panic during panic (#1252) feat(core)!: lowerCamelCase for protobuf json mapping (#1250) refactor(bridge-withdrawer)!: refactor startup to a separate subtask and remove balance check from startup (#1190) fix: rollup archive node configurations (#1249) refactor(core, bridge-withdrawer)!: move bridge-unlock memo to core (#1245) fix(sequencer)!: store native asset ibc->trace mapping in init_chain (#1242)
steezeburger
added a commit
that referenced
this pull request
Jul 19, 2024
* main: (24 commits) chore: update `bytes` and `ics23` crates (#1279) fix(sequencer): improve and fix instrumentation (#1255) feature(charts): hermes chart fixes, bech32 updates, ibc bridge test (#1130) chore(cli): remove unused rollup cli code (#1275) chore(test): use a temporary file to not pollute the workspace (#1269) chore(sequencer): add mempool benchmarks (#1238) fix(bridge-withdrawer)!: fix nonce handling (#1215) feat(cli, bridge-withdrawer)!: share code between cli and service (#1270) feat(cli): add cmd to collect withdrawal events and submit as actions (#1261) fix(core, bridge, sequencer)!: dismabiguate return addresses (#1266) fix(withdrawer): support withdrawer address that differs from bridge address (#1262) (core, sequencer)!: generate serde traits impls for all protocol protobufs (#1260) fix(charts): add resources for sequencer/cometbft (#1254) chore(sequencer)!: add metrics (#1248) fix(sequencer-utils): fixes issue in `parse_blob` tests (#1243) feat(core, proto)!: make bridge unlock memo string (#1244) fix(conductor): don't panic during panic (#1252) feat(core)!: lowerCamelCase for protobuf json mapping (#1250) refactor(bridge-withdrawer)!: refactor startup to a separate subtask and remove balance check from startup (#1190) fix: rollup archive node configurations (#1249) ...
bharath-123
pushed a commit
that referenced
this pull request
Jul 25, 2024
…and remove balance check from startup (#1190) ## Summary This refactors some of the startup logic into a separate startup subtask. It also removes the minimum expected balance check from the startup logic, as that is not necessary. ## Background The original startup logic had the `Submitter` running parts of the startup routine that weren't relevant to it. this moves that logic out to the `Startup` task. The balance check is removed because if a sequencer transaction with insufficient balance is submitted it will just fail execution and the service will restart. Requiring the check in the startup logic results in clunky operation of the service, since launching it before funding it will cause it to crash. ## Changes - Introduce `Startup` object and task - `Watcher` and `Submitter` now wait for the `Startup` to update the global state object with startup info before running their startup logic, whereas before we just had the `Watcher` wait on the `Submitter` to send a message on the `oneshot` channel. - Cleaned up some of the tryhard configs with helper funcs to be less confusing ## Breaking Changes - Remove the balance check from startup and the associated configs. issue linked below ## Testing - Updated some of the `Submitter`-specific tests to reflect changes to the startup logic. closes #1229
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This refactors some of the startup logic into a separate startup subtask. It also removes the minimum expected balance check from the startup logic, as that is not necessary.
Background
The original startup logic had the
Submitterrunning parts of the startup routine that weren't relevant to it. this moves that logic out to theStartuptask.The balance check is removed because if a sequencer transaction with insufficient balance is submitted it will just fail execution and the service will restart. Requiring the check in the startup logic results in clunky operation of the service, since launching it before funding it will cause it to crash.
Changes
Startupobject and taskWatcherandSubmitternow wait for theStartupto update the global state object with startup info before running their startup logic, whereas before we just had theWatcherwait on theSubmitterto send a message on theoneshotchannel.Breaking Changes
Testing
Submitter-specific tests to reflect changes to the startup logic.closes #1229