Skip to content

Commit

Permalink
change DataItem encoding to protobuf
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraser999 committed Jan 30, 2025
1 parent 8609199 commit ad1a8ff
Show file tree
Hide file tree
Showing 11 changed files with 398 additions and 89 deletions.
41 changes: 41 additions & 0 deletions crates/astria-core/src/generated/astria.sequencerblock.v1.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

233 changes: 233 additions & 0 deletions crates/astria-core/src/generated/astria.sequencerblock.v1.serde.rs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 3 additions & 8 deletions crates/astria-core/src/protocol/test_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,8 @@ impl ConfigureSequencerBlock {

let mut data = if use_data_items {
vec![
DataItem::RollupTransactionsRoot(rollup_transactions_tree.root())
.encode()
.unwrap(),
DataItem::RollupIdsRoot(rollup_ids_root).encode().unwrap(),
DataItem::RollupTransactionsRoot(rollup_transactions_tree.root()).encode(),
DataItem::RollupIdsRoot(rollup_ids_root).encode(),
]
} else {
vec![
Expand Down Expand Up @@ -279,9 +277,7 @@ pub fn upgrade_change_hashes() -> Vec<ChangeHash> {

#[must_use]
pub fn upgrade_change_hashes_bytes() -> Bytes {
DataItem::UpgradeChangeHashes(upgrade_change_hashes())
.encode()
.unwrap()
DataItem::UpgradeChangeHashes(upgrade_change_hashes()).encode()
}

#[must_use]
Expand All @@ -305,7 +301,6 @@ pub fn minimal_extended_commit_info_bytes() -> Bytes {
.into(),
)
.encode()
.unwrap()
}

#[must_use]
Expand Down
Loading

0 comments on commit ad1a8ff

Please sign in to comment.