-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sequencer)!: implement bridge sudo and withdrawer addresses (#1142)
## Summary we want bridge accounts to be "upgradable"; ie. we want to be able to change the key which can control the bridge account without changing the bridge address from the rollup's point of view. with this change, we have a sudo key and a withdrawer key for each bridge account, which is set when the bridge account is initialized. the sudo key is able to change the sudo key and withdrawer key. the withdrawer key is the only key allowed to withdraw funds from the bridge account. ## Background see above ## Changes - change `InitBridgeAccountAction` to contain a `sudo_address` and `withdrawer_address` which are set in state - change `BridgeUnlockAction` to have a `bridge_address` field which is the bridge address withdrawn from; it also checks if the signer of the tx is the bridge `withdrawer_address` and fail if not - implement `BridgeSudoChangeAction` which allows the bridge sudo key to change the bridge sudo and/or withdrawer keys - `Ics20Withdrawal`s from bridge now also do a withdrawer key check like `BridgeUnlockAction`; `bridge_address` was added to the action in the case that the withdrawer differs from the bridge address - disallow `Transfer` from a bridge account, as `BridgeUnlockAction` or `Ics20Withdrawal` must be used. ## Testing unit tests ## Breaking Changelist - `InitBridgeAccount` stores two new keys in state: the bridge sudo key and the bridge withdrawer key - a new action, `BridgeSudoChangeAction` is added - this is breaking on the sequencer state machine level. - however it should NOT be breaking on the protobuf level as nothing was removed, only new fields/messages were added, and the new fields added are allowed to be unset. if the fields are unset, it gets converted to a `None` in the native rust type.
- Loading branch information
Showing
27 changed files
with
1,323 additions
and
150 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
70 changes: 68 additions & 2 deletions
70
crates/astria-core/src/generated/astria.protocol.transactions.v1alpha1.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.