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

iotaledger / iota / 28987808076
69%

Build:
DEFAULT BRANCH: develop
Ran 09 Jul 2026 02:28AM UTC
Jobs 1
Files 1110
Run time 2min
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

08 Jul 2026 11:26AM UTC coverage: 68.099% (+0.06%) from 68.04%
28987808076

push

github

web-flow
fix(core): use on-chain timestamps for smooth pruning (#12132)

# Description of change

Full nodes accumulated far more on-disk state than expected while
syncing (observed on testnet: ~840 GB perpetual store, ~400 GB
checkpoints store) even with pruning correctly configured.

Root cause: pruning was **smoothed against wall-clock time**.
`smoothed_max_eligible_checkpoint_number` advanced the prune watermark
by only `delta = (max_eligible - pruned) / num_intervals` per tick,
where `num_intervals = epoch_duration_ms / pruning_tick_duration_ms`
(e.g. `86_400_000 / 10_000 = 8640` for a 24h epoch). At equilibrium this
leaves an unpruned backlog of roughly `num_intervals ×
(eligible-growth-per-tick)`. At tip that is ~1 epoch (the intended
behavior — it spreads each epoch's delete burst to avoid I/O spikes),
but during catch-up sync execution races thousands of checkpoints ahead
per tick, so the backlog — and disk usage — balloons. The smoothing had
no notion of how far behind tip the node was.

This PR replaces wall-clock smoothing with a **chain-time sliding
window**. The prune loop already walks checkpoints forward from the
highest pruned checkpoint, loading each summary, so we simply stop when
a checkpoint is newer than a retention cutoff:

```
cutoff_ts = highest_executed_checkpoint.timestamp_ms - num_epochs_to_retain * epoch_duration_ms
prune while checkpoint.timestamp_ms <= cutoff_ts
```

Checkpoint `timestamp_ms` is consensus-agreed and monotonic, so the
cutoff lands on the same checkpoint whether history is replayed in an
hour or lived at tip — the retained span is bounded to one retention
window in all cases, and the deletes still slide smoothly (no per-epoch
burst) at tip. The change touches a single shared function, so both
object and checkpoint pruning benefit.

Notes:
- The existing epoch-count guard (`current_epoch < ckpt.epoch() +
num_epochs_to_retain`) is untouched and remains the hard correctness
bound (the state accumulator and epoch-scope... (continued)

115 of 124 new or added lines in 2 files covered. (92.74%)

96 existing lines in 21 files now uncovered.

161181 of 236688 relevant lines covered (68.1%)

463448.5 hits per line

Uncovered Changes

Lines Coverage ∆ File
9
77.25
13.13% crates/iota-core/src/authority/authority_store_pruner.rs

Coverage Regressions

Lines Coverage ∆ File
15
91.91
-1.66% crates/iota-core/src/epoch/randomness.rs
10
60.38
-0.5% crates/iota-json-rpc-types/src/iota_transaction.rs
8
76.3
1.08% crates/test-cluster/src/lib.rs
7
72.03
-1.98% crates/iota-transaction-builder/src/utils.rs
6
46.9
-5.31% crates/iota-genesis-builder/src/stardust/types/snapshot.rs
6
79.46
-5.36% crates/iota-genesis-builder/src/validator_info.rs
6
71.17
-3.68% crates/iota-json-rpc/src/lib.rs
5
73.88
-0.72% crates/iota-network/src/randomness/mod.rs
4
56.64
0.0% crates/iota-json-rpc-types/src/iota_object.rs
4
85.64
-0.66% crates/iota-transaction-builder/src/lib.rs
4
89.16
-0.99% crates/iota-types/src/base_types.rs
3
79.5
0.41% crates/iota-core/src/traffic_controller/mod.rs
3
88.46
-3.85% crates/iota-genesis-builder/src/stardust/types/address_swap_split_map.rs
3
75.73
-2.91% crates/iota-grpc-server/src/server.rs
3
21.37
-2.29% crates/iota-json-rpc-types/src/iota_checkpoint.rs
3
77.62
2.89% crates/iota-sdk/src/wallet_context.rs
2
89.35
-0.69% crates/iota-core/src/connection_monitor.rs
1
86.11
-2.78% crates/iota-cluster-test/src/test_case/native_transfer_test.rs
1
77.25
13.13% crates/iota-core/src/authority/authority_store_pruner.rs
1
98.5
-0.3% crates/iota-core/src/signature_verifier.rs
1
79.47
-0.12% crates/iota-types/src/crypto.rs
Jobs
ID Job ID Ran Files Coverage
1 nextest+simtest - 28987808076.1 09 Jul 2026 02:28AM UTC 1110
68.1
GitHub Action Run
Source Files on build 28987808076
  • Tree
  • List 1110
  • Changed 37
  • Source Changed 3
  • Coverage Changed 37
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #28987808076
  • 0aa83d8b on github
  • Prev Build on develop (#28910991576)
  • Next Build on develop (#29062660040)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc