-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(core, proto): migrate byte slices from Vec to Bytes (#1319)
## Summary Changed protobuf, astria-core, and dependent code to utilize generic `Bytes` instead of the default `Vec<u8>` to utilize zero-copy deserialization from Protobuf and make type conversion cheaper. ## Background Previously, some components were utilizing `Bytes` and some were utilizing `Vec<u8>` as the generated Rust types when converting from Protobuf `bytes`. ## Changes - Adjusted Protobuf compiler to use `Bytes` for all Astria paths. - Edited conversions to/from `Raw` in `astria-core` to utilize `prost::bytes::Bytes`. - Adjusted code which relied on `Vec<u8>`. ## Testing Passing all tests. ## Related Issues closes #674
- Loading branch information
1 parent
da49e40
commit 00714ab
Showing
35 changed files
with
199 additions
and
159 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
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.
20 changes: 10 additions & 10 deletions
20
crates/astria-core/src/generated/astria.execution.v1alpha1.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 2 additions & 2 deletions
4
crates/astria-core/src/generated/astria.protocol.bridge.v1alpha1.rs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
12 changes: 6 additions & 6 deletions
12
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.
42 changes: 21 additions & 21 deletions
42
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.
Oops, something went wrong.