Skip to content

Commit e204180

Browse files
yiweichimattsseshekhirin
authored
feat: import zstd encoder crate from da-codec repository (#303)
* feat: import zstd encoder from da-codec * fix: ci * address comment * deny allow da-codec * chore: fix clippy docs (paradigmxyz#17726) Co-authored-by: Alexey Shekhirin <[email protected]> * ignore da-codec license check * cargo update --------- Co-authored-by: Matthias Seitz <[email protected]> Co-authored-by: Alexey Shekhirin <[email protected]>
1 parent eb020e1 commit e204180

File tree

15 files changed

+65
-81
lines changed

15 files changed

+65
-81
lines changed

Cargo.lock

Lines changed: 42 additions & 34 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,6 +613,7 @@ mini-moka = "0.10"
613613
tar-no-std = { version = "0.3.2", default-features = false }
614614
miniz_oxide = { version = "0.8.4", default-features = false }
615615
chrono = "0.4.41"
616+
encoder-standard = { git = "https://github.com/scroll-tech/da-codec", default-features = false }
616617

617618
# metrics
618619
metrics = "0.24.0"

crates/engine/tree/src/tree/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2582,8 +2582,8 @@ pub enum BlockStatus {
25822582

25832583
/// How a payload was inserted if it was valid.
25842584
///
2585-
/// If the payload was valid, but has already been seen, [`InsertPayloadOk::AlreadySeen(_)`] is
2586-
/// returned, otherwise [`InsertPayloadOk::Inserted(_)`] is returned.
2585+
/// If the payload was valid, but has already been seen, [`InsertPayloadOk::AlreadySeen`] is
2586+
/// returned, otherwise [`InsertPayloadOk::Inserted`] is returned.
25872587
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
25882588
pub enum InsertPayloadOk {
25892589
/// The payload was valid, but we have already seen it.

crates/net/downloaders/src/bodies/bodies.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ where
143143
/// Max requests to handle at the same time
144144
///
145145
/// This depends on the number of active peers but will always be
146-
/// [`min_concurrent_requests`..`max_concurrent_requests`]
146+
/// `min_concurrent_requests..max_concurrent_requests`
147147
#[inline]
148148
fn concurrent_request_limit(&self) -> usize {
149149
let num_peers = self.client.num_connected_peers();

crates/net/downloaders/src/headers/reverse_headers.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ where
148148
/// Max requests to handle at the same time
149149
///
150150
/// This depends on the number of active peers but will always be
151-
/// [`min_concurrent_requests`..`max_concurrent_requests`]
151+
/// `min_concurrent_requests..max_concurrent_requests`
152152
#[inline]
153153
fn concurrent_request_limit(&self) -> usize {
154154
let num_peers = self.client.num_connected_peers();

crates/net/network/src/test_utils/testnet.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,9 +788,9 @@ impl NetworkEventStream {
788788
peers
789789
}
790790

791-
/// Ensures that the first two events are a [`NetworkEvent::Peer(PeerEvent::PeerAdded`] and
792-
/// [`NetworkEvent::ActivePeerSession`], returning the [`PeerId`] of the established
793-
/// session.
791+
/// Ensures that the first two events are a [`NetworkEvent::Peer`] and
792+
/// [`PeerEvent::PeerAdded`][`NetworkEvent::ActivePeerSession`], returning the [`PeerId`] of the
793+
/// established session.
794794
pub async fn peer_added_and_established(&mut self) -> Option<PeerId> {
795795
let peer_id = match self.inner.next().await {
796796
Some(NetworkEvent::Peer(PeerEvent::PeerAdded(peer_id))) => peer_id,

crates/node/core/src/args/pruning.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ pub struct PruningArgs {
6161
pub receipts_before: Option<BlockNumber>,
6262
// Receipts Log Filter
6363
/// Configure receipts log filter. Format:
64-
/// <`address`>:<`prune_mode`>[,<`address`>:<`prune_mode`>...] Where <`prune_mode`> can be
65-
/// 'full', 'distance:<`blocks`>', or 'before:<`block_number`>'
64+
/// <`address`>:<`prune_mode`>... where <`prune_mode`> can be 'full', 'distance:<`blocks`>', or
65+
/// 'before:<`block_number`>'
6666
#[arg(long = "prune.receiptslogfilter", value_name = "FILTER_CONFIG", conflicts_with_all = &["receipts_full", "receipts_pre_merge", "receipts_distance", "receipts_before"], value_parser = parse_receipts_log_filter)]
6767
pub receipts_log_filter: Option<ReceiptsLogPruneConfig>,
6868

crates/prune/types/src/target.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,9 +156,9 @@ impl PruneModes {
156156
/// left in database after the pruning.
157157
///
158158
/// 1. For [`PruneMode::Full`], it fails if `MIN_BLOCKS > 0`.
159-
/// 2. For [`PruneMode::Distance(distance`)], it fails if `distance < MIN_BLOCKS + 1`. `+ 1` is
160-
/// needed because `PruneMode::Distance(0)` means that we leave zero blocks from the latest,
161-
/// meaning we have one block in the database.
159+
/// 2. For [`PruneMode::Distance`], it fails if `distance < MIN_BLOCKS + 1`. `+ 1` is needed because
160+
/// `PruneMode::Distance(0)` means that we leave zero blocks from the latest, meaning we have one
161+
/// block in the database.
162162
#[cfg(any(test, feature = "serde"))]
163163
fn deserialize_opt_prune_mode_with_min_blocks<
164164
'de,

crates/rpc/rpc-e2e-tests/src/rpc_compat.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ pub struct RpcTestCase {
2525
/// Action that runs RPC compatibility tests from execution-apis test data
2626
#[derive(Debug)]
2727
pub struct RunRpcCompatTests {
28-
/// RPC methods to test (e.g., ["`eth_getLogs`"])
28+
/// RPC methods to test (e.g. `eth_getLogs`)
2929
pub methods: Vec<String>,
3030
/// Path to the execution-apis tests directory
3131
pub test_data_path: String,

crates/scroll/alloy/evm/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ scroll-alloy-hardforks = { workspace = true, default-features = false }
3131
# misc
3232
auto_impl = { workspace = true, default-features = false }
3333
serde = { workspace = true, default-features = false, features = ["derive"], optional = true }
34-
zstd = { version = "=0.13.3", features = ["experimental"], default-features = false, optional = true }
34+
encoder-standard = { workspace = true, default-features = false, optional = true }
3535

3636
[dev-dependencies]
3737
alloy-hardforks.workspace = true
@@ -69,4 +69,4 @@ serde = [
6969
"scroll-alloy-hardforks/serde",
7070
"alloy-hardforks/serde",
7171
]
72-
zstd_compression = ["zstd"]
72+
zstd_compression = ["encoder-standard"]

0 commit comments

Comments
 (0)