Skip to content

docs: clock inventory for #821 step 1 (100 sites, 886463ef) - #825

Closed
Hero-Gamer wants to merge 3 commits into
reardencode:masterfrom
Hero-Gamer:clock-inventory-821-step1
Closed

Hero-Gamer wants to merge 3 commits into
reardencode:masterfrom
Hero-Gamer:clock-inventory-821-step1

Conversation

@Hero-Gamer

@Hero-Gamer Hero-Gamer commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

Step 1 of #821 - inventory only, no prod change.

HEAD: 886463e Merge #823 - latest master Sep 27, includes #822/#813/#773/#769/#746
Command: rg -n "SystemTime::now()" crates/ --type rust -g '!tests' = 100 sites
Verified: rg | cut -d: -f1,2 vs docs table = 100/100 match, comm -23 empty, comm -13 empty after fix 923->928, cargo fmt --all --check=0, no trailing WS, 120 lines total

Breakdown (100 rows):

  • 35 MIGRATE (consensus header.rs/lib.rs/params.rs, net peers.rs:1249 3 sites, service.rs 3, peer.rs 4, seeds.rs 3, tx_relay.rs:928 manual mock, mempool accept.rs/orphanage.rs, rpc mine.rs etc)
  • 65 LEAVE (store bulk_io 10 bdz 5 spender_table etc use unwrap_or(0) not unwrap, log api_log, query, esplora, cli, tmp uniqueness tx_relay.rs:3753)
  • clock.rs:44 root wall source = LEAVE (impl NodeClock::now() - the atomic clock)

Adversarial findings for Step 2/3:

  • peers.rs:1249 mock_now AtomicU64 Acquire/Release + set_mock_now() bypasses hub.clock
  • tx_relay.rs:625 mock_now AtomicU64 Relaxed + note_mock_now() bypasses hub.clock
  • chain.rs: hub.clock.set_mock() third clock = split-brain
  • tx_relay.rs:925 if mock!=0 tape + 928 SystemTime::now() = 0-sentinel prevents mock to epoch 0, Relaxed vs Acquire race on ARM (M4), INV freeze risk if mock set for chain but not relay (mempool bloat / peer timeout bypass hides eclipse test)

All LEAVE marked log/perf per OPERATOR.md #688 item 2.1.

Unblocks Step 2 PeerManager NodeClock injection and Step 3 TxRelay shared NodeClock.

Ref #740 unified-clock-api, part of #821, tracks #688 item 2.1

HEAD: 886463e Merge reardencode#823 (latest master)
- clock.rs:44 root wall source = LEAVE
- tx_relay.rs:928 manual mock check = node-time MIGRATE to NodeClock
- tx_relay.rs:3753 tmp uniqueness = log/perf LEAVE
- bulk_io 10, bdz 5, etc = log/perf LEAVE
- peers.rs 3, service.rs 3, peer.rs 4 = node-time MIGRATE for Steps 2/3

No prod change. Tracks reardencode#688 item 2.1, part of reardencode#821, follows reardencode#740
- peers.rs:1249 AtomicU64 0=wall, Acquire/Release
- tx_relay.rs:625 AtomicU64 0=wall, Relaxed/Relaxed
- chain.rs: hub.clock.set_mock() third clock
- split-brain enables INV freeze and peer timeout bypass

No prod change, adversarial review for reardencode#821
…6463e

repro: rg -n SystemTime::now crates/ --type rust -g '!*tests*' | cut -d: -f1,2 = 100/100 match
@rearden-grok

rearden-grok Bot commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Closing as superseded by #837. #837 already includes docs/clock-inventory.md along with the Step 2 implementation, so the inventory can land with that PR and does not need a separate pull request. Please keep the inventory there and continue review on #837.

@rearden-grok rearden-grok Bot closed this Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant