feat(bridge-withdrawer): bridge withdrawer startup#1160
Merged
itamarreif merged 13 commits intomainfrom Jun 8, 2024
Merged
Conversation
noot
reviewed
Jun 7, 2024
| // The fee asset denomination to use for the bridge account's transactions. | ||
| pub fee_asset_denomination: String, | ||
| // The minimum expected balance of the fee asset in the bridge account. | ||
| // TODO: This should be a u128, but the test fails to parse it as such. |
noot
reviewed
Jun 7, 2024
| .call() | ||
| .await | ||
| .wrap_err("failed to get asset withdrawal decimals")?; | ||
| let asset_withdrawal_divisor = 10u128.pow(base_chain_asset_precision); |
Contributor
There was a problem hiding this comment.
Suggested change
| let asset_withdrawal_divisor = 10u128.pow(base_chain_asset_precision); | |
| let asset_withdrawal_divisor = 10u128.pow(18u32.checked_sub(base_chain_asset_precision).expect("base_chain_asset_precision must be <= 18, as the contract constructor enforces \ | |
| this")); |
noot
reviewed
Jun 7, 2024
crates/astria-bridge-withdrawer/src/withdrawer/ethereum/watcher.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 7, 2024
crates/astria-bridge-withdrawer/src/withdrawer/ethereum/watcher.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 7, 2024
crates/astria-bridge-withdrawer/src/withdrawer/ethereum/watcher.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 7, 2024
crates/astria-bridge-withdrawer/src/withdrawer/ethereum/watcher.rs
Outdated
Show resolved
Hide resolved
noot
reviewed
Jun 7, 2024
noot
reviewed
Jun 7, 2024
crates/astria-bridge-withdrawer/src/withdrawer/submitter/mod.rs
Outdated
Show resolved
Hide resolved
noot
suggested changes
Jun 7, 2024
Contributor
noot
left a comment
There was a problem hiding this comment.
please fix asset_withdrawal_divisor calculation, otherwise nothing major!
…r.rs Co-authored-by: noot <36753753+noot@users.noreply.github.com>
…idge-withdrawer-startup
Contributor
|
All these startup logics completely ignore shutdown signals. |
joroshiba
approved these changes
Jun 8, 2024
Member
joroshiba
left a comment
There was a problem hiding this comment.
infra approval, lean on janis & elizabeth for rust side.
steezeburger
added a commit
that referenced
this pull request
Jun 10, 2024
* main: fix: ignore RUSTSEC-2021-0139 (#1171) chore(sequencer-relayer)!: remove functionality to restrict relaying blocks to only those proposed by a given validator (#1168) chore(metrics): update `metric_name` macro to handle a collection of names (#1163) fix(bridge-withdrawer): skip linting generated contract code (#1172) fix(core, sequencer): prefix removal source non-refund ics20 packet (#1162) chore(docs): add sequencer-relayer doc to specs (#1126) feat(bridge-withdrawer): sync logic (#1165) chore(withdrawer): replace contracts with `astria-bridge-contracts` submodule (#1164) feat(sequencer)!: implement bridge sudo and withdrawer addresses (#1142) feat(sequencer): implement refund to rollup logic upon ics20 transfer refund (#1161) feat(bridge-withdrawer): bridge withdrawer startup (#1160) feat(core, proto)!: add bech32m addresses (#1124) feat(withdrawer): bridged ERC20 token withdrawals (#1149) feat(sequencer-relayer)!: add chain IDs for sequencer and Celestia to config env vars (#1063) test(bridge-withdrawer): add submitter tests (#1133) chore: bump penumbra deps (#1159) feat(sequencer): implement `bridge/account_last_tx_hash` abci query (#1158) fix(withdrawer): use block subscription in batcher; send to destination_chain_address (#1157) fix(withdrawer): update AstriaWithdrawer to check that withdrawal value is sufficient (#1148) chore(ci): build bridge withdrawer images (#1156)
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
We need to validate config and balance before starting to process transactions.
a. watcher startup: connecting to geth, confirming contract addr, getting decimals from contract, making the batcher object
b. submitter startup: confirming chain_id against sequencer node, making sure the fee asset is valid, checking that it meets a minimum balance (also passed from config)
Background
Need to implement startup routine for bridge withdrawer.
Changes
submitter
watcher
fix
set_ready()calls to be at the end ofstartup()Testing
Metrics
Breaking Changelist
Related Issues
Link any issues that are related, prefer full github links.
closes