chore(deps): bump malachite pin to current main — hardens no-peer sync branch - #227
chore(deps): bump malachite pin to current main — hardens no-peer sync branch#227ygd58 wants to merge 1 commit into
Conversation
osr21
left a comment
There was a problem hiding this comment.
Verified every claim in the PR body independently before reviewing — all check out:
circlefin/malachitecompare8ee5d998...5cd137fb: exactly 2 commits, and the second is the merge commit of malachite#1567 itself; the only other content is a CI-only chore (GitHub Actions Node 24 bump, #1564) with zero runtime code. This is about as tight as a git-pin bump gets — no unrelated behavior rides along.- malachite#1567 merged 2026-06-22 and is the current
maintip, as stated. Its mechanism matches the wedge in #214 precisely: the unconditionalset_sync_height(range.end + 1)insend_and_track_request_to_peerclobbering a concurrent rewind from the peer-exhaustion path is exactly the "skipped height below sync_height, never re-requested" state we captured in follower logs. The upstream fix also lands with a regression test that reconstructs the two-pending-range interleaving, so the fix is pinned by a test, not just a code change. - The malachite#1543 claim is correct too: it merged 2026-04-08, well before the old pin's 2026-05-22 commit, so it's already in the current build — good that the PR body pre-empts that question rather than leaving reviewers to chase it.
- All 13
Cargo.tomlrev entries and all 19Cargo.locksources move to the same rev — no split-pin risk where some malachite crates resolve to the old commit.
Two operational notes for whoever merges and for operators watching #214:
-
The fix is preventive, not curative. A follower currently wedged stays wedged until restarted — the bad state (skipped height below
sync_height, request slots full of undeliverable later heights) lives in memory, not on disk, so the binary upgrade's restart clears it as a side effect. Worth one line in the release notes so operators don't wait for an in-place recovery that won't come. -
The ~2x/day repro rate is an asset for validation. Since #214 reproduces roughly twice daily per follower on testnet, a 48–72h soak on one follower running this build gives strong empirical confirmation cheaply — zero wedges in that window is meaningful signal, not luck. Happy to run that soak on my follower once a build is available and report back on #214 before this is tagged into a release.
The stated testing (cargo build -p arc-node-consensus to regenerate the lock) is appropriate scope for a pin bump — the behavioral test lives upstream in malachite's suite where it belongs. LGTM.
|
I built malachite at the exact commit this PR pins ( What #1567 changedIt added a // only reached when random_peer_with_except(...) returns None
set_sync_height(state, min(state.sync_height, *entry.range.start()));That fires only when there is no eligible peer for the failed range. The branch that actually wedges is the peer-available one
// state.rs — else branch: no peer has the whole range
.map(|(peer, status)| (*peer, *range.start()..=status.tip_height))The caller then requests only that trimmed sub-range: // handle.rs:933 re_request_values_from_peer_except
send_and_track_request_to_peer(&co, state, metrics, peer, peer_range, entry.excluded_peers).await?;
The identical trim-and-drop exists on the partial-response path NetThis pin bump looks necessary but not sufficient: it stops the no-peers-at-all stall but not the reported one (peers present, none covering the full failed range). @arjun215-eng's fork commit ( Happy to help verify a repro — the trigger is any failed multi-height fetch where the replacement peer's |
|
Agreed — this matches what I flagged over on #214 after realizing the same thing. To be precise about scope: this PR only hardens the no-peer branch (#1567), it does not close #214 on its own. I have re-titled my mental model of this PR as "necessary but not sufficient" and left #214 open rather than closing it via this PR's description. Given your trace confirms @arjun215-eng's suffix-loop fix is the actual fix for the wedge, I will hold off on bumping the pin further until that lands in circlefin/malachite:main, then update this PR (or open a follow-up) to point at that commit so #214 can close for real. Also asked on #214 whether external node operators can get onboarded as P2P/gossip sentries on testnet to help soak-test it once it's in — no path for that today as far as I can tell, so verification is currently limited to the unit-test level (which your and arjun215-eng's analysis already covers well). |
|
One mechanical item to fix before a maintainer picks this up: the PR body still says Suggest editing the body to My APPROVED review stands for the bump itself under the corrected scope; the trace in my earlier comment documents exactly what it does and doesn't cover. |
|
Good catch, fixed — retitled and rescoped the body to "Contributes to #214" so merging this will not auto-close it while the suffix-loop fix is still outstanding upstream. |
|
Verified the rescope at
One last mechanical detail for merge time: the branch's single commit still carries the old message — With that, this is merge-ready from my side — APPROVED review stands under the corrected scope. |
…c branch Bumps the pinned circlefin/malachite git rev from 8ee5d998 (2026-05-22) to 5cd137fb (current main tip), pulling in circlefin/malachite#1567. Scope: this is a strict improvement and pulls in no unrelated commits, but it does not close circlefin#214 on its own. #1567 only hardens the no-peer-available branch (re_request_values_from_peer_except's rollback when no peer covers the failed range at all). The branch that actually causes the reported wedge -- a peer is available but only covers a prefix of the failed range, and the untried suffix is silently dropped -- is untouched by this bump. That fix (suffix-loop, drafted by arjun215-eng, fork commit 378b0e5) has not yet landed in circlefin/malachite. Contributes to circlefin#214, does not fix it.
10d5a22 to
bb5e517
Compare
|
Hi @ygd58, thanks for the detailed write-up — the root cause breakdown on the sync_height wedge and the honest scope note ("contributes to, does not fix #214") are exactly the kind of due diligence we appreciate in external contributions. We're going to close this one. Malachite is being updated holistically as part of the upcoming v0.8 release, which will include both the no-peer-available hardening from #1567 and the suffix-gap fix. Thanks again for the effort on this! |
|
Thanks @melekes — closing both this and #283 in favor of a holistic v0.8 Malachite update is a coherent disposition, and since both fixes already sit on Three small things worth pinning down so the wedge doesn't lose its paper trail once both PRs close:
The full trace of both branches (what #1567 covers, what the suffix-gap fix covers, and the termination argument for the loop) is preserved in this thread and on #214, so nothing else is needed from our side. Thanks for the clear call on direction. |
Summary
Bumps the pinned
circlefin/malachitegit rev from8ee5d998(2026-05-22) to5cd137fb(currentmaintip). Pulls in circlefin/malachite#1567.Scope — please read before merging
This is a strict improvement and pulls in no unrelated commits, but it does not close #214 on its own. Per the trace in review comments below: #1567 only hardens the no-peer-available branch (
re_request_values_from_peer_except's rollback when no peer covers the failed range at all). The branch that actually causes the reported wedge — a peer is available but only covers a prefix of the failed range, and the untried suffix is silently dropped — is untouched by this bump. That fix (suffix-loop, drafted by @arjun215-eng, fork commit 378b0e5) has not yet landed in circlefin/malachite.Contributes to #214, does not fix it. Recommend merging this as a standalone hardening change, then tracking the pin retarget to the suffix-loop fix as a separate follow-up once it lands upstream.
Root cause of the (still-open) wedge
A batched sync fetch that partially fails advances
sync_heightpast the entire failed range, but the peer-available retry path only re-requests the prefix the replacement peer can serve. The dropped suffix sits belowsync_heightwith no covering pending request and is never re-issued.Testing
Cargo.lockregenerated against the new rev viacargo build -p arc-node-consensus.