fix: unify edition to 2024 via workspace inheritance#1261
Conversation
All crate Cargo.toml files now use `edition.workspace = true` instead of hardcoding their own edition. This also fixes edition 2024 migration issues: reserved `gen` keyword, collapsible if-let chains, pattern matching changes, and impl Trait lifetime capture rules.
📝 WalkthroughWalkthroughThis PR standardizes workspace configuration by updating multiple crate manifests to inherit Rust edition from workspace settings, refactors numerous imports for consistency, and simplifies control flow by combining nested conditionals throughout the codebase using compound boolean expressions. Changes
Sequence Diagram(s)No sequence diagrams generated—this PR is primarily composed of homogeneous import reordering, control flow simplification patterns, and manifest standardization without introducing new features or significantly altering multi-component interactions. Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes While the diff is large in line count, the changes are predominantly homogeneous: workspace edition standardization across manifests, repetitive import reordering across many files following consistent patterns, and standardized control-flow simplification (combining nested conditionals). These patterns require minimal per-file reasoning. The exception is signature changes in Possibly related PRs
Suggested reviewers
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
There was a problem hiding this comment.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
crates/reth-node-bridge/src/adapter.rs (1)
63-77:⚠️ Potential issue | 🟠 MajorAvoid unbounded polling that can hang forever.
On Line 71, the loop exits only when
latest_block.header.number == block_number. If the head moves past that height before this check, the condition never recovers, and with the unbounded loop on Line 63 this can stall indefinitely.🔧 Proposed fix (timeout + deterministic target lookup)
pub async fn assert_new_block_irys( &self, block_hash: B256, block_number: BlockNumber, ) -> eyre::Result<()> { - loop { + let start = tokio::time::Instant::now(); + let timeout = std::time::Duration::from_secs(15); + loop { + if start.elapsed() > timeout { + eyre::bail!( + "timed out waiting for block {} (expected hash {:?})", + block_number, + block_hash + ); + } + // wait for the block to commit tokio::time::sleep(std::time::Duration::from_millis(20)).await; + + // Query the exact target height to avoid missing it when head advances quickly. + if let Some(target_block) = self + .reth_node + .inner + .provider + .block_by_number_or_tag(BlockNumberOrTag::Number(block_number))? + { + assert_eq!(target_block.hash_slow(), block_hash); + break; + } + if let Some(latest_block) = self .reth_node .inner .provider .block_by_number_or_tag(BlockNumberOrTag::Latest)? && latest_block.header.number == block_number { // make sure the block hash we submitted via FCU engine api is the new latest // block using an RPC call assert_eq!(latest_block.hash_slow(), block_hash); break; } } Ok(()) }crates/chain-tests/src/utils.rs (1)
2633-2686:⚠️ Potential issue | 🟠 MajorFail when a required publish chunk is missing.
With
enable_full_ingress_proof_validationenabled, this helper is expected to send every publish chunk before delivering the block. The current guarded path silently skips missing cache entries orchunk: None, sosend_full_blockcan returnOk(())even though the peer never received a full block.🧩 Proposed fix
- if let Ok(Some((_meta, cached_chunk))) = self.node_ctx.db.view_eyre(|tx| { - irys_database::cached_chunk_by_chunk_offset( - tx, - tx_header.data_root, - tx_chunk_offset, - ) - }) && let Some(bytes) = cached_chunk.chunk - { + let (_meta, cached_chunk) = self + .node_ctx + .db + .view_eyre(|tx| { + irys_database::cached_chunk_by_chunk_offset( + tx, + tx_header.data_root, + tx_chunk_offset, + ) + })? + .ok_or_else(|| { + eyre!( + "missing cached chunk for data_root {} at tx_offset {:?} while sending full block", + tx_header.data_root, + tx_chunk_offset + ) + })?; + let data_path = cached_chunk.data_path.0.clone(); + let bytes = cached_chunk.chunk.ok_or_else(|| { + eyre!( + "cached chunk for data_root {} at tx_offset {:?} has no bytes while sending full block", + tx_header.data_root, + tx_chunk_offset + ) + })?; + { let unpacked = irys_types::UnpackedChunk { data_root: tx_header.data_root, data_size: tx_header.data_size, - data_path: irys_types::Base64(cached_chunk.data_path.0.clone()), + data_path: irys_types::Base64(data_path), bytes, tx_offset: tx_chunk_offset, }; let verify_data_root = unpacked.data_root; let verify_tx_offset = unpacked.tx_offset;🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@crates/chain-tests/src/utils.rs` around lines 2633 - 2686, The code currently silently skips when a required cached chunk is missing (the guarded if using self.node_ctx.db.view_eyre -> irys_database::cached_chunk_by_chunk_offset and checking cached_chunk.chunk), which lets send_full_block succeed even if a peer never received a publish chunk; change that behavior so send_full_block fails immediately when a required cache entry is absent or cached_chunk.chunk is None. Concretely, in the function that builds/sends the full block (the code around send_full_block / enable_full_ingress_proof_validation), replace the guarded if-let that requires Ok(Some((_meta, cached_chunk))) && let Some(bytes) = cached_chunk.chunk with explicit error handling: when view_eyre returns Err or None, or cached_chunk.chunk is None, return an Err (or propagate a descriptive error) indicating the missing cached chunk (include tx_header.data_root and tx_chunk_offset in the error message), instead of silently skipping; keep the existing path that sends via peer.node_ctx.service_senders.chunk_ingress with ChunkIngressMessage::IngestChunk when the chunk is present.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@crates/chain-tests/src/utils.rs`:
- Around line 1769-1779: The code currently swallows errors from
get_block_by_hash and treats them as a "tx not found" timeout; instead propagate
or surface the error immediately. Replace the conditional pattern using if let
Ok(block) = self.get_block_by_hash(&block_hash) ... with code that calls let
block = self.get_block_by_hash(&block_hash)? (or explicitly match Err and return
Err with context) so that a missing/corrupt canonical block from canonical_chain
fails fast rather than turning into a slow timeout; reference get_block_by_hash
and canonical_chain to locate the change.
In `@crates/chain/src/chain.rs`:
- Around line 2132-2143: The PackingRequest::new call is currently inside an
if-let that ignores construction failures, so construct the request explicitly
and handle its Result: call PackingRequest::new(sm.clone(),
PartitionChunkRange(interval)) into a local (e.g., let req_res = ...), match or
if let Err(e) => log the constructor error with context (include
storage_module.id and packing.interval) and return or propagate as appropriate,
and on Ok(req) attempt sender.send(req).await and keep the existing error
handling for send failures (the tracing::event for channel closed). This ensures
constructor errors from PackingRequest::new are not silently dropped.
In `@crates/p2p/src/tests/integration/mod.rs`:
- Around line 2-3: This file imports (GossipServiceTestFixture,
create_test_chunks, generate_test_tx, poll_until, wait_until_listening) may be
misformatted or lint-violating; run cargo fmt --all and cargo clippy --workspace
--tests --all-targets locally, fix any formatter or clippy warnings/errors
(reorder or group imports, adjust code to satisfy lints, add allow attributes
where justified), re-run the commands until they pass, then update the commit so
the tests and formatting are clean before merging.
---
Outside diff comments:
In `@crates/chain-tests/src/utils.rs`:
- Around line 2633-2686: The code currently silently skips when a required
cached chunk is missing (the guarded if using self.node_ctx.db.view_eyre ->
irys_database::cached_chunk_by_chunk_offset and checking cached_chunk.chunk),
which lets send_full_block succeed even if a peer never received a publish
chunk; change that behavior so send_full_block fails immediately when a required
cache entry is absent or cached_chunk.chunk is None. Concretely, in the function
that builds/sends the full block (the code around send_full_block /
enable_full_ingress_proof_validation), replace the guarded if-let that requires
Ok(Some((_meta, cached_chunk))) && let Some(bytes) = cached_chunk.chunk with
explicit error handling: when view_eyre returns Err or None, or
cached_chunk.chunk is None, return an Err (or propagate a descriptive error)
indicating the missing cached chunk (include tx_header.data_root and
tx_chunk_offset in the error message), instead of silently skipping; keep the
existing path that sends via peer.node_ctx.service_senders.chunk_ingress with
ChunkIngressMessage::IngestChunk when the chunk is present.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 505200ba-bfa8-4a96-8e1c-aa247cd7d7b1
📒 Files selected for processing (171)
crates/api-client/Cargo.tomlcrates/api-client/src/ext.rscrates/api-client/src/lib.rscrates/api-server/Cargo.tomlcrates/api-server/src/error.rscrates/api-server/src/lib.rscrates/api-server/src/metrics.rscrates/api-server/src/routes/anchor.rscrates/api-server/src/routes/balance.rscrates/api-server/src/routes/block.rscrates/api-server/src/routes/block_index.rscrates/api-server/src/routes/block_tree.rscrates/api-server/src/routes/commitment.rscrates/api-server/src/routes/config.rscrates/api-server/src/routes/get_chunk.rscrates/api-server/src/routes/index.rscrates/api-server/src/routes/ledger.rscrates/api-server/src/routes/mempool.rscrates/api-server/src/routes/mining.rscrates/api-server/src/routes/peer_list.rscrates/api-server/src/routes/post_chunk.rscrates/api-server/src/routes/price.rscrates/api-server/src/routes/proxy.rscrates/api-server/src/routes/storage.rscrates/api-server/src/routes/supply.rscrates/api-server/src/routes/tx.rscrates/chain-tests/Cargo.tomlcrates/chain-tests/src/api/api.rscrates/chain-tests/src/api/client.rscrates/chain-tests/src/api/hardfork_tests.rscrates/chain-tests/src/api/pricing_endpoint.rscrates/chain-tests/src/api/tx.rscrates/chain-tests/src/api/tx_commitments.rscrates/chain-tests/src/api/tx_duplicates.rscrates/chain-tests/src/block_production/basic_contract.rscrates/chain-tests/src/block_production/block_production.rscrates/chain-tests/src/block_production/block_rebuilding.rscrates/chain-tests/src/block_production/block_validation.rscrates/chain-tests/src/block_production/difficulty_adjustment.rscrates/chain-tests/src/block_production/reset_seed.rscrates/chain-tests/src/block_production/test_double_spend.rscrates/chain-tests/src/block_production/testing_primitives.rscrates/chain-tests/src/block_production/treasury_tracking.rscrates/chain-tests/src/block_production/unpledge_refund.rscrates/chain-tests/src/block_production/unstake_refund.rscrates/chain-tests/src/data_sync/sync_partition_data_tests.rscrates/chain-tests/src/ema_pricing/ema_pricing.rscrates/chain-tests/src/external/api.rscrates/chain-tests/src/external/block_production.rscrates/chain-tests/src/external/programmable_data_basic.rscrates/chain-tests/src/external/sync_partition_data_remote.rscrates/chain-tests/src/external/utils/monitoring.rscrates/chain-tests/src/external/utils/signer.rscrates/chain-tests/src/external/utils/types.rscrates/chain-tests/src/integration/cache_service.rscrates/chain-tests/src/multi_node/ema_forks.rscrates/chain-tests/src/multi_node/epoch_replay.rscrates/chain-tests/src/multi_node/fork_recovery.rscrates/chain-tests/src/multi_node/fork_recovery_epoch.rscrates/chain-tests/src/multi_node/mempool_tests.rscrates/chain-tests/src/multi_node/peer_discovery.rscrates/chain-tests/src/multi_node/sync_chain_state.rscrates/chain-tests/src/multi_node/validation.rscrates/chain-tests/src/packing/remote_packing.rscrates/chain-tests/src/partition_assignments/sm_reassignment_tests.rscrates/chain-tests/src/perm_ledger_expiry/mod.rscrates/chain-tests/src/programmable_data/basic.rscrates/chain-tests/src/promotion/data_promotion_basic.rscrates/chain-tests/src/promotion/data_promotion_double.rscrates/chain-tests/src/promotion/promotion_with_multiple_proofs.rscrates/chain-tests/src/startup/auto_stake.rscrates/chain-tests/src/startup/genesis.rscrates/chain-tests/src/synchronization/mod.rscrates/chain-tests/src/term_ledger_expiry/mod.rscrates/chain-tests/src/term_ledger_expiry/perm_refund.rscrates/chain-tests/src/utils.rscrates/chain-tests/src/validation/anchor_canonical_reorg.rscrates/chain-tests/src/validation/blobs_rejected.rscrates/chain-tests/src/validation/data_tx_pricing.rscrates/chain-tests/src/validation/ingress_proof_reanchor_dedup.rscrates/chain-tests/src/validation/ingress_proof_validation.rscrates/chain-tests/src/validation/invalid_perm_fee_refund.rscrates/chain-tests/src/validation/ledger_expiry_with_unstake.rscrates/chain-tests/src/validation/mempool_ingress_proof_dedup.rscrates/chain-tests/src/validation/mod.rscrates/chain-tests/src/validation/unpledge_partition.rscrates/chain-tests/src/validation/unstake_edge_cases.rscrates/chain/Cargo.tomlcrates/chain/src/chain.rscrates/chain/src/genesis_utilities.rscrates/chain/src/main.rscrates/chain/src/peer_utilities.rscrates/efficient-sampling/Cargo.tomlcrates/efficient-sampling/src/lib.rscrates/p2p/Cargo.tomlcrates/p2p/src/block_pool.rscrates/p2p/src/block_status_provider.rscrates/p2p/src/cache.rscrates/p2p/src/chain_sync.rscrates/p2p/src/gossip_client.rscrates/p2p/src/gossip_data_handler.rscrates/p2p/src/gossip_fixture_tests.rscrates/p2p/src/gossip_service.rscrates/p2p/src/lib.rscrates/p2p/src/peer_network_service.rscrates/p2p/src/rate_limiting.rscrates/p2p/src/server.rscrates/p2p/src/tests/block_pool/mod.rscrates/p2p/src/tests/integration/mod.rscrates/p2p/src/tests/util.rscrates/p2p/src/types.rscrates/p2p/src/wire_types/block.rscrates/p2p/src/wire_types/block_index.rscrates/p2p/src/wire_types/chunk.rscrates/p2p/src/wire_types/commitment_transaction.rscrates/p2p/src/wire_types/data_transaction.rscrates/p2p/src/wire_types/gossip_data.rscrates/p2p/src/wire_types/handshake.rscrates/p2p/src/wire_types/ingress_proof.rscrates/p2p/src/wire_types/node_info.rscrates/p2p/src/wire_types/test_helpers.rscrates/p2p/src/wire_types/tests.rscrates/price-oracle/Cargo.tomlcrates/reth-node-bridge/Cargo.tomlcrates/reth-node-bridge/src/adapter.rscrates/reth-node-bridge/src/dump.rscrates/reth-node-bridge/src/node.rscrates/types/Cargo.tomlcrates/types/src/address.rscrates/types/src/arbiter_handle.rscrates/types/src/block.rscrates/types/src/block_production.rscrates/types/src/canonical.rscrates/types/src/chainspec.rscrates/types/src/chunk.rscrates/types/src/commitment_common.rscrates/types/src/commitment_v1.rscrates/types/src/commitment_v2.rscrates/types/src/config/consensus.rscrates/types/src/config/mod.rscrates/types/src/config/node.rscrates/types/src/difficulty_adjustment_config.rscrates/types/src/gossip.rscrates/types/src/hardfork_config.rscrates/types/src/ingress.rscrates/types/src/irys.rscrates/types/src/lib.rscrates/types/src/merkle.rscrates/types/src/partition.rscrates/types/src/peer_list.rscrates/types/src/range_specifier.rscrates/types/src/remote_packing.rscrates/types/src/serialization.rscrates/types/src/signature.rscrates/types/src/storage.rscrates/types/src/storage_pricing.rscrates/types/src/time.rscrates/types/src/transaction.rscrates/types/src/transaction/fee_distribution.rscrates/types/src/version.rscrates/types/tests/commitment_signing_tests.rscrates/types/tests/transaction_signing_versioned_tests.rscrates/types/tests/versioned_compact_roundtrip_tests.rscrates/types/tests/versioned_json_serde_tests.rscrates/utils/nextest-monitor/Cargo.tomlcrates/utils/nextest-monitor/src/bin/nextest-report.rscrates/utils/nextest-monitor/src/bin/nextest-wrapper.rscrates/utils/nextest-monitor/src/memory_monitor.rsxtask/Cargo.tomlxtask/src/failures.rsxtask/src/main.rs
| if let Ok(block) = self.get_block_by_hash(&block_hash) | ||
| && block.data_ledgers[ledger].tx_ids.0.contains(&txid) | ||
| { | ||
| tracing::info!( | ||
| "found block containing tx {} on {} after {} attempt(s)", | ||
| txid, | ||
| self.name.clone().unwrap_or_else(|| "genesis".to_string()), | ||
| attempt | ||
| ); | ||
| return Ok(block); | ||
| } |
There was a problem hiding this comment.
Don't hide missing canonical blocks behind a timeout.
A hash coming from canonical_chain should always resolve in get_block_by_hash. Swallowing that error turns an invariant break into a slow “tx not found” timeout, which makes chain-test failures much harder to diagnose.
🩹 Proposed fix
- if let Ok(block) = self.get_block_by_hash(&block_hash)
- && block.data_ledgers[ledger].tx_ids.0.contains(&txid)
- {
- tracing::info!(
- "found block containing tx {} on {} after {} attempt(s)",
- txid,
- self.name.clone().unwrap_or_else(|| "genesis".to_string()),
- attempt
- );
- return Ok(block);
- }
+ match self.get_block_by_hash(&block_hash) {
+ Ok(block) if block.data_ledgers[ledger].tx_ids.0.contains(&txid) => {
+ tracing::info!(
+ "found block containing tx {} on {} after {} attempt(s)",
+ txid,
+ self.name.clone().unwrap_or_else(|| "genesis".to_string()),
+ attempt
+ );
+ return Ok(block);
+ }
+ Ok(_) => {}
+ Err(err) => {
+ return Err(eyre!(
+ "canonical block {} could not be loaded while searching for tx {}: {err:#}",
+ block_hash,
+ txid
+ ));
+ }
+ }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/chain-tests/src/utils.rs` around lines 1769 - 1779, The code currently
swallows errors from get_block_by_hash and treats them as a "tx not found"
timeout; instead propagate or surface the error immediately. Replace the
conditional pattern using if let Ok(block) = self.get_block_by_hash(&block_hash)
... with code that calls let block = self.get_block_by_hash(&block_hash)? (or
explicitly match Err and return Err with context) so that a missing/corrupt
canonical block from canonical_chain fails fast rather than turning into a slow
timeout; reference get_block_by_hash and canonical_chain to locate the change.
| if let Ok(req) = PackingRequest::new(sm.clone(), PartitionChunkRange(interval)) | ||
| && let Err(e) = sender.send(req).await | ||
| { | ||
| if let Err(e) = sender.send(req).await { | ||
| tracing::event!( | ||
| target: "irys::packing", | ||
| tracing::Level::ERROR, | ||
| storage_module.id = %sm.id, | ||
| packing.interval = ?interval, | ||
| "Packing channel closed - {e}; failed to enqueue repacking request" | ||
| ); | ||
| return; // assume this is unrecoverable | ||
| } | ||
| tracing::event!( | ||
| target: "irys::packing", | ||
| tracing::Level::ERROR, | ||
| storage_module.id = %sm.id, | ||
| packing.interval = ?interval, | ||
| "Packing channel closed - {e}; failed to enqueue repacking request" | ||
| ); | ||
| return; // assume this is unrecoverable | ||
| } |
There was a problem hiding this comment.
Handle PackingRequest::new errors explicitly to avoid silent dropped intervals.
At Line 2132, request-construction failures are currently ignored, so an uninitialized interval can be skipped without any signal. Please log (or propagate) constructor errors explicitly.
🔧 Proposed fix
runtime_handle.spawn(async move {
for interval in uninitialized {
- if let Ok(req) = PackingRequest::new(sm.clone(), PartitionChunkRange(interval))
- && let Err(e) = sender.send(req).await
- {
- tracing::event!(
- target: "irys::packing",
- tracing::Level::ERROR,
- storage_module.id = %sm.id,
- packing.interval = ?interval,
- "Packing channel closed - {e}; failed to enqueue repacking request"
- );
- return; // assume this is unrecoverable
- }
+ let req = match PackingRequest::new(sm.clone(), PartitionChunkRange(interval)) {
+ Ok(req) => req,
+ Err(e) => {
+ tracing::event!(
+ target: "irys::packing",
+ tracing::Level::ERROR,
+ storage_module.id = %sm.id,
+ "Failed to build repacking request: {e}"
+ );
+ continue;
+ }
+ };
+
+ if let Err(e) = sender.send(req).await {
+ tracing::event!(
+ target: "irys::packing",
+ tracing::Level::ERROR,
+ storage_module.id = %sm.id,
+ packing.interval = ?interval,
+ "Packing channel closed - {e}; failed to enqueue repacking request"
+ );
+ return; // assume this is unrecoverable
+ }
}
});📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| if let Ok(req) = PackingRequest::new(sm.clone(), PartitionChunkRange(interval)) | |
| && let Err(e) = sender.send(req).await | |
| { | |
| if let Err(e) = sender.send(req).await { | |
| tracing::event!( | |
| target: "irys::packing", | |
| tracing::Level::ERROR, | |
| storage_module.id = %sm.id, | |
| packing.interval = ?interval, | |
| "Packing channel closed - {e}; failed to enqueue repacking request" | |
| ); | |
| return; // assume this is unrecoverable | |
| } | |
| tracing::event!( | |
| target: "irys::packing", | |
| tracing::Level::ERROR, | |
| storage_module.id = %sm.id, | |
| packing.interval = ?interval, | |
| "Packing channel closed - {e}; failed to enqueue repacking request" | |
| ); | |
| return; // assume this is unrecoverable | |
| } | |
| let req = match PackingRequest::new(sm.clone(), PartitionChunkRange(interval)) { | |
| Ok(req) => req, | |
| Err(e) => { | |
| tracing::event!( | |
| target: "irys::packing", | |
| tracing::Level::ERROR, | |
| storage_module.id = %sm.id, | |
| "Failed to build repacking request: {e}" | |
| ); | |
| continue; | |
| } | |
| }; | |
| if let Err(e) = sender.send(req).await { | |
| tracing::event!( | |
| target: "irys::packing", | |
| tracing::Level::ERROR, | |
| storage_module.id = %sm.id, | |
| packing.interval = ?interval, | |
| "Packing channel closed - {e}; failed to enqueue repacking request" | |
| ); | |
| return; // assume this is unrecoverable | |
| } |
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/chain/src/chain.rs` around lines 2132 - 2143, The PackingRequest::new
call is currently inside an if-let that ignores construction failures, so
construct the request explicitly and handle its Result: call
PackingRequest::new(sm.clone(), PartitionChunkRange(interval)) into a local
(e.g., let req_res = ...), match or if let Err(e) => log the constructor error
with context (include storage_module.id and packing.interval) and return or
propagate as appropriate, and on Ok(req) attempt sender.send(req).await and keep
the existing error handling for send failures (the tracing::event for channel
closed). This ensures constructor errors from PackingRequest::new are not
silently dropped.
| GossipServiceTestFixture, create_test_chunks, generate_test_tx, poll_until, | ||
| wait_until_listening, |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
cargo fmt --all -- --check
cargo clippy --workspace --tests --all-targetsRepository: Irys-xyz/irys
Length of output: 435
🏁 Script executed:
cat -n crates/p2p/src/tests/integration/mod.rs | head -20Repository: Irys-xyz/irys
Length of output: 813
Run cargo fmt --all and cargo clippy --workspace --tests --all-targets locally before submitting.
This is a Rust file requiring workspace checks per coding guidelines. The import reordering at lines 2-3 suggests formatting may have been addressed, but workspace verification tools (cargo fmt and cargo clippy) cannot execute in this environment. Please confirm these commands were run locally and passed before merging.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@crates/p2p/src/tests/integration/mod.rs` around lines 2 - 3, This file
imports (GossipServiceTestFixture, create_test_chunks, generate_test_tx,
poll_until, wait_until_listening) may be misformatted or lint-violating; run
cargo fmt --all and cargo clippy --workspace --tests --all-targets locally, fix
any formatter or clippy warnings/errors (reorder or group imports, adjust code
to satisfy lints, add allow attributes where justified), re-run the commands
until they pass, then update the commit so the tests and formatting are clean
before merging.
|
Benchmark results: https://irys-xyz.github.io/irys/dev/bench/fix%2Fedition-unify/index.html |
Describe the changes
All crate Cargo.toml files now use
edition.workspace = trueinstead of hardcoding their own edition. This also fixes edition 2024 migration issues: reservedgenkeyword, collapsible if-let chains, pattern matching changes, and impl Trait lifetime capture rules.Related Issue(s)
Please link to the issue(s) that will be closed with this PR.
Checklist
Additional Context
Add any other context about the pull request here.
Summary by CodeRabbit
Refactor
Style