Repository navigation
chore: merge v1.7-dev into v1.8-dev - #1452
Conversation
…tension-count mismatch, patch grpc CVE (#1451) * fix(statesync): bound backfill fetch-ahead of verification blockQueue.nextHeight allocated the next height to fetch without reference to how far verification had progressed, tracking only what had been fetched. Fetching a light block costs a round trip while verifying one costs a BLS commit check on a single serialized loop, so peers serving faster than this node verifies grew the fetched-but-unverified backlog in the unbounded pending map across the entire backfill span - a memory-exhaustion vector on the long backfill a new node joining an established chain performs. Bound the heights that may be allocated but not yet verified, scaled to the fetcher count so the pipeline still saturates its workers. Heights needing a re-fetch are exempt: they are already counted against the bound and the verify loop cannot advance past them, so withholding one would deadlock the run the bound exists to protect. Measured with the backpressure probe over spans of 200, 800 and 3200: peak fetch-ahead depth falls from 159 to 16 at span 200 and stays at 16 for every larger span, where it previously tracked the span. Run duration and blocks served over the span are unchanged, so the happy path pays nothing. Co-Authored-By: Claude Sonnet 5 <[email protected]> * fix(statesync): don't disconnect a peer over a vote-extension count mismatch backfill treated every error from ValidatorSet.VerifyCommit as grounds to disconnect the peer that supplied the commit. types.ErrVoteExtensionCountMismatch does not deserve that: an honest peer relaying a commit whose vote-extension configuration differs from this node's reaches it, which is an application disagreement rather than a forged signature. verifyCommit already leaves that error untyped for exactly this reason, and internal/consensus evicts only on the typed ErrInvalidCommitSignature. Backfill is the error's only untrusted-input path, so disconnecting here defeated the whole carve-out. Score the peer down instead, matching the severity the neighbouring refusals already use for causes an honest peer can produce. The peer is still withdrawn from the run, which is what keeps the run healthy, and every other verification failure still costs the connection. Co-Authored-By: Claude Sonnet 5 <[email protected]> * chore(deps): update google.golang.org/grpc to v1.83.2 v1.82.1 is affected by CVE-2026-84304: internal/transport stores each fragmented HTTP/2 DATA frame as a separate recvMsg, so an unauthenticated peer multiplexing streams of one-byte frames exhausts heap while staying inside the flow-control windows. This repo exposes gRPC servers in abci/server and privval/grpc, so the path is reachable. Fixed upstream in v1.83.1 by receive-buffer compaction; v1.83.2 is the latest patch of that minor and adds rejection of requests carrying neither :authority nor Host. Release notes for v1.83.0 through v1.83.2 record no breaking API changes, and this repo uses only NewServer, NewClient and generated stubs. Pulls in transitive updates to golang.org/x/crypto, x/net and x/text. Co-Authored-By: Claude Sonnet 5 <[email protected]> --------- Co-authored-by: Claude Sonnet 5 <[email protected]>
* test(security): reproduce remote consensus vulnerabilities Add failing regression coverage for vote-extension recovery panics, proposal metadata malleability, validator-set state binding, and CoreChainLockedHeight omission from the header hash. Co-Authored-By: Claude GPT-6 <[email protected]> * fix(security): harden remote consensus inputs * fix(consensus): publish corrected proposal metadata safely Avoid mutating a proposal that may still be read by gossip workers, and address the static-analysis findings reported by CI. Co-Authored-By: Codex GPT-6 <[email protected]> * fix(consensus): address review findings Co-Authored-By: Codex GPT-6 <[email protected]> * fix: harden block delivery and state sync validation * fix(consensus): preserve connection ordering and authenticate backfill state * fix(statesync): load trusted params from current local state --------- Co-authored-by: Lukasz Klimek <[email protected]> Co-authored-by: Claude GPT-6 <[email protected]> Co-authored-by: Codex GPT-6 <[email protected]>
# Conflicts: # docs/nodes/state-sync.md # go.mod # go.sum
The Makefile comment claims it is kept in step with .github/workflows/lint.yml, but it was still pinned to v2.12 while CI uses v2.13. Under the repo's Go 1.27 toolchain, golangci-lint v2.12.2's staticcheck/honnef v0.7.0 panics in buildir on stdlib internal/poll, so `make lint` never completes locally. Co-Authored-By: Claude Sonnet 5 <[email protected]>
Every entry under the Unreleased heading landed after the v1.7.0 tag (2026-08-18): the four commits that touched CHANGELOG.md since the tag are 6278666, 98df1e8, e8a57b2 and edf4bab, all dated 2026-09-07..2026-09-09. The entries carry no per-entry dates, so commit dates decide, and they place the whole section in 1.8.0. The heading carries no release date because 1.8.0 is not tagged yet. scripts/release/release.sh regenerates CHANGELOG.md in full from git history via git-cliff, so the release itself supplies the date. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
🕓 Queued for automated review — 19th in line, estimated start in ~6 h (commit b609ca3)
|
TL;DR: Brings v1.7-dev's consensus/p2p security-hardening fixes into v1.8-dev, plus a lint-pin sync and a changelog reorg found while merging.
User story
As a node operator running v1.8-dev, I want the consensus and block-sync hardening already shipped on v1.7-dev, so that I get the same resilience against malformed remote input and slow/adversarial peers.
Scenario
Base flow
v1.8-dev branched off before v1.7-dev's hardening work landed, so the two lines diverged: v1.7-dev (PR #1442, #1451) fixed several consensus/p2p robustness issues that v1.8-dev never received.
Actual behavior
v1.8-dev lacks the proposal-metadata correction,
verifyCommitcontrol-flow fix, stricter light-block public-key-share validation, vote-extension canonical-voter binding, and the block-sync backpressure/backfill-bounding fixes present on v1.7-dev.Expected behavior
v1.8-dev carries all of the above, verified to not regress existing v1.8-dev behavior.
Detailed discussion
What was done
origin/v1.7-devinto this branch (forked fromv1.8-devtip). 3 conflicts resolved:docs/nodes/state-sync.md(both sides' prose combined, nothing dropped),go.mod/go.sum(kept the newer toolchain graph already present on this branch; its grpc v1.83.2 CVE-2026-84304 fix is preserved — verified viago mod tidy -diff).internal/statesync/reactor.goauto-merged (disjoint regions).Makefile'sGOLANGCI_LINT_VERSION(v2.12→v2.13) with.github/workflows/lint.yml, which it claims to track but had drifted from; the stale pin mademake lintpanic locally under Go 1.27 (staticcheck/honnef v0.7.0 bug inbuildir).CHANGELOG.md: filed all post-v1.7.0[Unreleased]entries under a new[1.8.0]heading (decided by commit date, since nov1.8.0tag/date exists yet and entries carry no per-entry dates).internal/blocksync/p2p_msg_handler.go) and the p2p delivery-notification machinery for concurrency issues — found none; see Testing.BlockSyncChannel.SendQueueCapacityreduction (1000 → 4) throttles catch-up throughput — it does not; see Testing.Testing
go build ./...,go vet ./...— clean.go test -p 1 -race -tags deadlock -count=3 ./internal/blocksync/... ./internal/p2p/...— 0 races.go test -p 1 -race -tags deadlock ./internal/statesync/... ./node/... ./dash/core/... ./light/...— all packages pass.[email protected] run --new-from-rev=origin/v1.8-dev(matching CI's pin) — 0 issues.MConnection, 256 KiB payloads, productionSendRate):SendQueueCapacity=4vs=1000— statistically identical throughput (~4.7–5.0 MiB/s), both pinned at theSendRateceiling; queue depth is a burst buffer in front of a rate-limited drain and doesn't set steady-state throughput.networks/dashcore.toml(one of the two CI matrix testnets): pass in 9m25s, all assertions green, 7 node perturbations (disconnect/restart/kill/pause) all recovering in 10–60s.Breaking changes
None expected.
verifyCommit, light-block public-key-share validation, and vote-extension canonical-voter binding are strictly stricter/more-correct versions of existing logic (see individual v1.7-dev PRs #1442/#1451 for rationale);BlockSyncChannel.SendQueueCapacity1000→4 is a p2p tuning change shown not to affect throughput.Checklist
For repository code-owners and collaborators only
Prior work
fix(consensus): harden remote input handling(source of the consensus-side changes brought in here)fix(statesync): bound backfill backpressure, spare honest peers on extension-count mismatch, patch grpc CVE(source of the statesync/p2p changes brought in here)Known issue (not fixed in this PR)
test/e2e/networks/ci.toml'sfull01node lacksprivval_protocol = "dashcore", so it won't start under this branch's full-node Core-RPC requirement. CI is unaffected — the workflow only runsdashcore.toml/rotate.toml, both of which set it correctly; only localmake runner/ciis affected. Left out of scope; flagging for a follow-up.Attribution
🤖 Generated with Claude Code