-
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(proto, core, sequencer)!: add traceability to rollup deposits (#…
…1410) ## Summary Added `id_of_source_transaction` and `position_in_source_transaction` to `Deposit`. ## Background Previous deposit events had no information about the deposit source, so rollups could not trace if their deposits had landed without checking the balance. Additionally, this could result in deposit txs having the same hash in the EVM. ## Changes - Created primitive proto type `TransactionId` for identifying source transaction in deposits. - Added `id_of_source_transaction` and `position_in_source_transaction` to `Deposit`. - Included tx id in the ephemeral state via `current_source()` so that it can be accessed by actions. - Added accessors/mutators for deposit index to `StateReadExt` and `StateWriteExt` traits in `transaction`. - Updated `bridge_lock` and `ics20_transfer` actions to populate `Deposit` events with transaction id and index based on the state. ## Testing Added test to ensure `position_in_source_transaction` is incremented correctly. ## Breaking Changelist - App hash changed because of increasing block fees due to longer length of `Deposit`. - Changed SequencerBlock API `Deposit` event, having two new mandatory fields `source_transaction_id` and `source_action_index`. `source_transaction_id` uses a new primitive proto type `TransactionId`. ## Related Issues with astriaorg/astria-geth#42, closes #1402 --------- Co-authored-by: Jordan Oroshiba <[email protected]> Co-authored-by: Fraser Hutchison <[email protected]> Co-authored-by: jesse snyder <[email protected]>
- Loading branch information
1 parent
64b9106
commit f543222
Showing
42 changed files
with
640 additions
and
209 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
91 changes: 91 additions & 0 deletions
91
crates/astria-core/src/generated/astria.primitive.v1.serde.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
crates/astria-core/src/generated/astria.sequencerblock.v1alpha1.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
crates/astria-core/src/generated/astria.sequencerblock.v1alpha1.serde.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.