Skip to content

chore(e2e): remove the unused ci network - #1655

Draft
lklimek wants to merge 64 commits into
fix/consensus-single-validator-proposerfrom
chore/e2e-remove-ci-network
Draft

lklimek wants to merge 64 commits into
fix/consensus-single-validator-proposerfrom
chore/e2e-remove-ci-network

Conversation

@lklimek

@lklimek lklimek commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

TL;DR: Removes an end-to-end test network definition that no longer loads and is never run, so contributors are no longer pointed at a broken example.

User story

As a Tenderdash contributor, I want the e2e documentation and Makefile to point only at networks that work, so I do not waste time on a manifest that cannot start.

Scenario

Base flow

  1. A contributor follows the e2e README or runs make runner/ci.

Actual behavior

The default example, networks/ci.toml, fails to load (toml: line 6 (last key "initial_state"): incompatible types). CI never runs it, and it describes scenarios Dash Platform does not use.

Expected behavior

The README examples use networks/dashcore.toml, which CI runs, and the broken network is gone.

Detailed discussion

What was done

  • Removed test/e2e/networks/ci.toml and the runner/ci Makefile target.
  • test/e2e/README.md examples and the commented example in test/e2e/tests/e2e_test.go now use networks/dashcore.toml. A comment in networks/statesync-backfill.toml no longer mentions ci.toml.
  • No workflow, script or generator references the file (git grep is clean).

Stacked on the single-validator proposer fix PR (below it in the stack).

Out of scope: other manifests. Known limitations: None.

Testing

  • git grep -n 'ci.toml\|networks/ci\|runner/ci': no matches.
  • go vet ./test/e2e/tests: pass.
  • CI's e2e jobs use dashcore.toml and rotate.toml, which are unchanged.

Breaking changes

None. The make runner/ci target is removed.

🤖 Co-authored by Claudius the Magnificent AI Agent

🤖 Generated with Claude Code

lklimek and others added 30 commits November 9, 2026 13:26
…t in its round

A validator that saw a polka for a block it never received precommits nil
and, once its peers move to a later round, can no longer obtain the block:
block parts are served only from the proposal part set, which entering a
new round clears, while the valid and locked part sets that still hold the
block are never gossiped. Even when the block does arrive, one completed in
the prevote or precommit step is not processed, so an application that
verifies vote extensions against its last processed proposal, like Drive,
rejects every precommit for the block. Rejected precommits are not stored
and do not count towards the +2/3 of any kind that start the precommit
wait, so the validator stays in its round for good and a network without
spare voting power stalls with it.

Serve a validator peer at this height, in an earlier round, the complete
valid or locked part set whose header it is collecting, from the gossip
snapshot. Process the round's polka block when it completes too late for
the round to vote on it, so that the precommits for it verify; the node
casts no vote again, and a failure is not retried.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
A polka block the application rejects is processed once and not retried
on the precommits for it or on its parts arriving again; a block completing
in the prevote wait is processed there and not again in the precommit step;
one completing in the propose step with its proposal takes the usual path
and is processed once; a block completing without being the round's polka
block is not processed; an incomplete held part set is not served.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
A block completing while the round's polka is for another block is not
processed; a nil polka alone let the identity check go unexercised. The
rejected-block test no longer redelivers parts the part set already holds,
which completes nothing.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
… set is incomplete

heldBlockPartsFor skipped the held-block fallback whenever the round's
ProposalBlockParts carried the peer's part set header, even when that set
was incomplete and had nothing left to send. A complete current set still
suppresses the fallback, which would send nothing new anyway.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ommit step

A block that completed in the precommit step before its polka was never
processed: ProposalCompletedAction found no polka, and the prevote that
formed it later only updated the valid block, as the node had already
precommitted. The application then rejected every precommit for the block
and the node never started its precommit wait.

blockExecutor.processPolkaBlock now owns the condition (current-round
non-nil polka, matching proposal block, not yet processed) and is called
both on block completion and when the current round's polka forms in the
Precommit or PrecommitWait step. The polka path runs once per round, as
the valid round is set there, so a failed ProcessProposal is not retried.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…s nil for it

When the polka formed in the prevote steps and enterPrecommit precommitted
nil because the round's proposal was missing or its timestamp differed from
the block's, the held polka block was never processed: the valid round was
already set and the block had completed earlier. The application then
rejected every precommit for it and the node never started its precommit
wait. Both nil branches now call processPolkaBlock before signing; it is a
no-op unless the held block is the unprocessed polka block, and
enterPrecommit runs once per round.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…h nil precommit

With no proposal held, a polka block can only be held unprocessed after
ProposalCompletedAction already tried and failed to process it, so the call in
that branch was a silent retry that contradicted the no-retry contract and was
not covered by any test. The timestamp-mismatch branch alone closes the stall.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use a 16x multiplier so the per-peer outbound queue keeps 512 envelopes,
enough for a full block's parts plus a vote burst, while channel queues
stay far below the previous size-squared bound.

Replace the 10ms ticker and signal channel with a send case that is
enabled only while the heap is non-empty, so the run loop sleeps when
idle and forwards envelopes as soon as the consumer has room.

<sub>🤖 Co-authored by [Claudius the Magnificent](https://github.com/lklimek/claudius) AI Agent</sub>

Co-Authored-By: Claude Opus 5.5 <[email protected]>
PartSet.IsComplete read count without the part set mutex that AddPart
writes it under. Consensus gossip checks the completeness of the
proposal part set the consensus state is filling, so the read raced
with AddPart.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A block that completed before its polka must be processed when the
polka forms after +2/3 precommits started the precommit wait, so that
the precommits for it verify. The valid-block middleware test passes a
real block executor rather than nil to the polka processing it calls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
processPolkaBlock also runs before the node votes, and on the nil
precommit over a mismatched proposal timestamp, so its doc and log
messages no longer say the block arrived too late to vote on. The debug
log drops the step, which on the timestamp path is the step before
precommit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The node's own step never becomes RoundStepPrecommitWait: entering the
precommit wait only sets TriggeredTimeoutPrecommit and leaves the step
at RoundStepPrecommit, which the polka-block hook already checks.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…o a block

Drive verifies a vote extension against the block it accepted in the
precommit's round or, failing that, the same block accepted in another
round of the height; the polka-block recovery matters when it accepted
the block in neither. Other applications may require the same round.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Clear rejected connections before mirroring them and report ErrEndpointClosed from waiting acquisition. Stop ensureConnection from waiting again after shutdown rejects a hand-off. Cover availability, waiting, ensuring, and direct assignment in the regression test.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…hout a proposal

A node whose signed proposal was dropped (its BlockID did not describe the
completed block) keeps the block but precommits nil without a proposal.
When +2/3 prevoted that block, the application never processed it in the
round, so peer precommits carrying extensions for it failed verification
and the precommit wait never started. Process the held polka block before
the nil precommit, as the timestamp-mismatch branch already does.

The test application's comment now describes the strict same-round
contract it enforces, which Drive relaxes to the same block accepted in
another round of the height.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…t on stop

SignerServer.OnStop closed the endpoint while an idle ReadMessage held its connection lock, so stopping waited for the read deadline, and a dial racing the stop published an unclosed connection. Interrupt the connection first, as the listener endpoint does.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A caller blocked in WaitConnection with its own context kept the listener's instance lock until maxWait, so OnStop waited too. Return ErrEndpointClosed once the endpoint stops, closing a connection handed over meanwhile.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ing shutdown

SubscribeWS subscribed upstream, then returned an error without unsubscribing when the client or the websocket session was already stopping; the unread upstream subscription could stall delivery to other subscribers of a caller-owned client.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…Info

UnsubscribeWS and UnsubscribeAllWS bound the backend call to one second,
still ending with the session, so a reconnecting upstream no longer keeps
the retired subscription's forwarders running. Forwarders are retired
only for a known WebSocket connection, so direct Go calls without
CallInfo return the backend result instead of panicking.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ptions

The node removes subscriptions by canonical query, and treats a query it
cannot parse as a subscription ID, which removes every subscription of
the client. Orphan cleanup now skips queries that do not parse and keeps
the upstream subscription while a canonically equal query still has a
local owner.

Tests wait for tracked orphan cleanup before synchronizing with the
upstream, so they no longer assert before the cleanup has started.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A recorded query always has a subscriber: the last leave deletes it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
… client's lifetime

SubscribeWS contacted the upstream before its forwarder was admitted. When
shutdown rejected the forwarder, the rollback Unsubscribe ran outside any
joined worker, so a caller-owned upstream could receive it after the light
client's Wait returned. Admit the whole subscription transaction, including
its rollback, as a worker before contacting the upstream.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Squashed net change of fix/base-service-stop up to 90226b4, restacked
linearly on fix/p2p-simple-queue-limits (#1627). The original commits
(including the dev merges) remain reachable from 90226b4.

Conflict resolved in internal/p2p/rqueue.go: keeps #1627's queue loop
(nil-channel send, no polling ticker, priority function, metrics) and this
change's closed() contract (closeCh is closed only after run returns).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
STYLE_GUIDE.md asks to track work in an issue or PR, not a TODO comment.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Squashed net change of this branch up to 9734246, restacked linearly on
its parent layer. The original commits (including the merges) remain
reachable from 9734246.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Unsubscribing scanned every connection's forwarders under the registry lock; a client sending unsubscribe frames for unknown queries could keep that lock busy. Look the forwarder up by connection and query, and drop a connection's map once empty.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@lklimek
lklimek added this pull request to stack #1658 November 26, 2026 16:19

@lklimek lklimek left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/self-reviewed

@thepastaclaw thepastaclaw left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Final validation — Phase 1 + Phase 2

Changes requested: 1 blocker

  • The documented manual E2E command cannot find the Dash Core manifest — test/e2e/README.md:94-95 (new)
    Impact: Contributors who start the Dash Core testnet and run the next command as written get a file-not-found error before the tests reach any running node.

PR #1655 removes the unused ci.toml manifest and runner/ci target and switches the E2E examples to dashcore.toml. Both E2E jobs (dashcore and rotate), the build, vet, and lint passed; tests (01) failed because TestReactorValidatorSetChanges timed out waiting for blocks in unchanged consensus code, and the review check is still pending.

🔴 1 blocking

Review provenance

Source: reviewer 1: muse-spark-1.3-contributor (agent: phase1-reviewer, role: general); reviewer 2: gpt-6.2-sol (agent: phase2-reviewer, role: general); final verifier: gpt-6.2-sol (agent: sol-verifier, role: final-verifier)

  • Triage: low by gpt-6.2-sol (effort low) — The diff removes an unusable e2e manifest and its Makefile target and updates examples, making it a small tooling change with an easy-to-check scope.
  • Phase 1 reviewers: muse-spark-1.3-contributor — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: muse-spark-1.3-contributor — not quota-gated; passed over gemini-3.8-flash-high (antigravity quota lookup failed), glm-5.3-flash (zai below 15% reserve: 5h 100% left, weekly 0% left)
  • Fresh verifier: gpt-6.2-sol — final-verifier; agent sol-verifier
  • Phase 2 reviewers: gpt-6.2-sol — general (completed, effort medium); agent phase2-reviewer
🤖 Prompt for all review comments with AI agents
These findings are from an automated code review (PastaClaw). How to work through them:
- Verify each finding against the code; fix only what is real, as narrowly as the finding.
- If a finding is wrong, decline it on its thread in one or two sentences; the bot answers once and stops.
- To defer one, link a tracking issue on its thread (or reply asking the bot to file one).
- Suggestions don't block the merge, but most are worth fixing in this PR; judge each on its merits.
- Keep the PR's scope; don't grow it to satisfy hardening suggestions.
- Carried items were raised in an earlier round: read the thread first, and don't re-fix what you already fixed, declined or deferred there. Disputed and deferred items are already handled and are not listed.

In `test/e2e/README.md`:
- [BLOCKING] test/e2e/README.md:94-95: The documented manual E2E command cannot find the Dash Core manifest
  Impact: Contributors who start the Dash Core testnet and run the next command as written get a file-not-found error before the tests reach any running node.
  The replacement manual workflow still stops before it runs any checks against the network. From `test/e2e`, the runner finds `networks/dashcore.toml`, but `go test -v ./tests/...` launches the test binary in `test/e2e/tests`. The test helper passes `E2E_MANIFEST` unchanged to the loader, which tries to open the nonexistent `test/e2e/tests/networks/dashcore.toml`. Pass an absolute path from the shell and update the prose above the command to match. The IDE snippet at line 106 and the matching comment in `test/e2e/tests/e2e_test.go:26` should also use an absolute path or explicitly use `../networks/dashcore.toml` when the test process starts in `test/e2e/tests`.

Comment thread test/e2e/README.md
Comment on lines +94 to +95
./build/runner -f networks/dashcore.toml start
E2E_MANIFEST=networks/dashcore.toml go test -v ./tests/...

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔴 Blocking: The documented manual E2E command cannot find the Dash Core manifest
Impact: Contributors who start the Dash Core testnet and run the next command as written get a file-not-found error before the tests reach any running node.

The replacement manual workflow still stops before it runs any checks against the network. From test/e2e, the runner finds networks/dashcore.toml, but go test -v ./tests/... launches the test binary in test/e2e/tests. The test helper passes E2E_MANIFEST unchanged to the loader, which tries to open the nonexistent test/e2e/tests/networks/dashcore.toml. Pass an absolute path from the shell and update the prose above the command to match. The IDE snippet at line 106 and the matching comment in test/e2e/tests/e2e_test.go:26 should also use an absolute path or explicitly use ../networks/dashcore.toml when the test process starts in test/e2e/tests.

Suggested change
./build/runner -f networks/dashcore.toml start
E2E_MANIFEST=networks/dashcore.toml go test -v ./tests/...
./build/runner -f networks/dashcore.toml start
E2E_MANIFEST="$PWD/networks/dashcore.toml" go test -v ./tests/...

source: gpt-6.2-sol (phase2-reviewer: general)

lklimek and others added 25 commits November 27, 2026 12:45
Co-Authored-By: Claude Opus 5.5 <[email protected]>

# Conflicts:
#	internal/consensus/block_executor.go
#	internal/consensus/polka_block_delivery_test.go
Merging dev renamed the Unreleased section to v2.0.0, which left this PR's
additions under an already released version.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Apply the reduced simple queue heap limit to inbound channel queues.
Preserve the existing capacity of outbound peer queues and clear
discarded heap slots after accounting and delivery notification.

Cover both queue limits, mixed-priority overflow in both arrival
orders, and complete draining of the small queue under backpressure.

Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Count dequeued envelopes and eviction notifications in both occupancy
tests. Fail at the test deadline if any offer remains unaccounted for.

Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Account for the rounded input buffer when checking how many envelopes
can survive an undrained burst.

Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Set the simple priority queue heap limit to 32 times the configured
buffer size in both directions. Drop the direction flag from queue
construction and pin the shipped inbound and per-peer outbound limits.

Co-Authored-By: OpenAI Codex <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
The merge resolved internal/p2p/rqueue.go and rqueue_regression_test.go to
dev's #1627 version, but #1515's surviving fix(service)! change makes
Router.OpenChannel require a running router. Dev's regression test does not
start the router, so it fails with "router is not running". Restore #1515's
versions of both files, which start the router and carry the matching simple
queue close semantics.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
# Conflicts:
#	test/e2e/networks/ci.toml

This branch has not been deployed

No deployments
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.

2 participants