• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

iotaledger / iota / 17963609663
63%

Build:
DEFAULT BRANCH: develop
Ran 24 Sep 2025 04:06AM UTC
Jobs 1
Files 1430
Run time 3min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

23 Sep 2025 01:13PM UTC coverage: 65.784% (+0.06%) from 65.729%
17963609663

push

github

web-flow
refactor(consensus): extract `dag_state` mutation from computation (#8061)

# Description of change

This pull request refactors the `BlockManager` to improve modularity and
maintainability by extracting the block suspension logic into a new
`BlockSuspender` struct and module. The changes enhance code
organization, reduce the complexity of `BlockManager`, and make the
suspension logic more reusable and testable.

### Key Changes:
1. **New `BlockSuspender` Module/Struct**:
- Created `src/block_manager/block_suspender.rs` to encapsulate block
suspension logic, including the `SuspendedBlockHeader` struct and
methods for accepting, suspending, and un-suspending headers.
- Manages suspended block headers, missing ancestors, and missing blocks
in a dedicated `BlockSuspender` struct.

2. **BlockManager Refactoring**:
- Renamed `block_manager.rs` to `block_manager/mod.rs` to support the
new module structure with `block_suspender.rs`.
- Replaced suspension-related fields in `BlockManager`
(`suspended_block_headers`, `missing_ancestors`, `missing_blocks`) with
a single `block_suspender: BlockSuspender` field.
- Simplified `try_accept_block_headers_internal` by delegating to
`BlockSuspender::accept_or_suspend_received_headers`.
- Added `find_missing_ancestors` and
`filter_out_already_processed_and_sort` helper methods to handle block
filtering and ancestor lookup.

3. **BlockHeader Enhancements**:
- Added `PartialOrd`, `PartialEq`, `Ord`, and `Eq` derive macros to
`BlockHeader`, `BlockHeaderV1`, `SignedBlockHeader`, and
`VerifiedBlockHeader` in `block_header.rs` to ensure consistent ordering
and comparison for `BTreeMap` and `BTreeSet` operations in
`BlockSuspender`.

4. **Test Updates**:
- Added `evaluate_block_headers` helper function that evaluates which
blocks should be suspended, and which should be missing, based on a list
of `block_headers` seen so far. Used in randomized test
`test_randomized_dag_and_decision_sequence` to make sure that after each
iterat... (continued)

352 of 362 new or added lines in 4 files covered. (97.24%)

1207 existing lines in 48 files now uncovered.

230475 of 350353 relevant lines covered (65.78%)

2387220.98 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
1
98.99
crates/starfish/core/src/block_manager/mod.rs
3
91.73
0.0% crates/starfish/core/src/block_header.rs
6
97.7
crates/starfish/core/src/block_manager/block_suspender.rs

Uncovered Existing Lines

Lines Coverage ∆ File
1
91.18
0.0% crates/iota-cluster-test/src/test_case/native_transfer_test.rs
1
69.69
-0.07% crates/iota-core/src/checkpoints/mod.rs
1
95.69
-0.27% crates/iota-core/src/signature_verifier.rs
1
74.72
-0.11% crates/iota-types/src/crypto.rs
1
72.51
-0.16% crates/starfish/core/src/commit_syncer.rs
1
90.68
-0.31% crates/starfish/core/src/storage/mem_store.rs
1
94.12
-0.42% iota-execution/latest/iota-adapter/src/gas_meter.rs
2
94.44
0.69% crates/iota-core/src/subscription_handler.rs
2
78.69
-3.28% crates/iota-core/src/traffic_controller/nodefw_test_server.rs
2
71.48
-0.06% external-crates/move/crates/move-compiler/src/typing/translate.rs
3
65.42
-1.4% crates/iota-core/src/test_authority_clients.rs
3
88.03
-0.25% crates/iota-genesis-builder/src/lib.rs
3
87.65
-3.7% crates/iota-genesis-builder/src/stardust/types/address_swap_split_map.rs
3
88.69
-1.79% crates/iota-surfer/src/surfer_state.rs
3
15.1
-0.28% external-crates/move/crates/move-compiler/src/expansion/ast.rs
4
66.25
-5.0% crates/iota-config/src/transaction_deny_config.rs
4
95.02
-1.42% crates/iota-core/src/authority/test_authority_builder.rs
4
47.44
-1.37% crates/iota-sdk/src/apis/read.rs
4
81.25
-3.13% crates/iota-surfer/src/surf_strategy.rs
4
64.46
-0.13% external-crates/move/crates/move-compiler/src/naming/translate.rs
5
98.1
-1.58% crates/transaction-fuzzer/src/account_universe/transfer_gen.rs
5
74.32
-0.8% external-crates/move/crates/move-transactional-test-runner/src/framework.rs
6
84.54
-0.99% crates/iota-core/src/traffic_controller/mod.rs
6
47.37
-5.26% crates/iota-genesis-builder/src/stardust/types/snapshot.rs
6
67.3
-1.9% external-crates/move/crates/move-compiler/src/shared/unique_map.rs
7
71.68
0.25% crates/iota-data-ingestion-core/src/reader/fetch.rs
7
92.38
0.0% crates/starfish/config/src/committee.rs
9
66.87
-0.42% external-crates/move/crates/move-compiler/src/typing/core.rs
10
79.09
-3.8% crates/iota-sdk/src/wallet_context.rs
11
40.37
-4.07% external-crates/move/crates/move-compiler/src/shared/files.rs
13
59.69
-1.67% crates/iota-core/src/authority/authority_store_pruner.rs
13
90.03
-3.78% crates/iota-core/src/connection_monitor.rs
15
82.73
0.74% crates/iota-swarm-config/src/node_config_builder.rs
18
84.51
-3.36% crates/iota-test-transaction-builder/src/lib.rs
18
38.14
-2.26% external-crates/move/crates/move-compiler/src/expansion/path_expander.rs
21
93.06
-0.32% crates/starfish/core/src/authority_node.rs
22
84.68
0.0% crates/starfish/core/src/base_committer.rs
29
71.02
-1.1% external-crates/move/crates/move-compiler/src/expansion/translate.rs
38
96.88
1.03% crates/starfish/core/src/dag_state.rs
40
46.76
0.5% crates/iota-data-ingestion-core/src/reader/v1.rs
41
90.32
0.04% crates/iota-core/src/checkpoints/checkpoint_executor/mod.rs
57
72.18
1.36% crates/iota-swarm/src/memory/swarm.rs
59
76.61
3.89% crates/test-cluster/src/lib.rs
97
81.91
0.59% crates/iota-config/src/node.rs
98
0.0
0.0% crates/iota-data-ingestion-core/src/reader/v2.rs
109
46.46
-0.1% crates/iota/src/iota_commands.rs
180
81.7
-0.04% crates/starfish/core/src/synchronizer.rs
219
81.03
-0.01% crates/iota-node/src/lib.rs
Jobs
ID Job ID Ran Files Coverage
1 nextest+simtest - 17963609663.1 24 Sep 2025 04:06AM UTC 1432
65.77
GitHub Action Run
Source Files on build 17963609663
  • Tree
  • List 1430
  • Changed 70
  • Source Changed 28
  • Coverage Changed 60
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #17963609663
  • 23ba1467 on github
  • Prev Build on develop (#17901950127)
  • Next Build on develop (#17994184723)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc