From a43e1078519afbc5d55b5ca56540b0f2f911f2ef Mon Sep 17 00:00:00 2001 From: The Code Learner <142033899+the-code-learner@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:39:10 +0100 Subject: [PATCH 1/2] test: identify exact missing tx IDs in strict seven-validator fanout failures --- internal/api/performance_lab_test.go | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/internal/api/performance_lab_test.go b/internal/api/performance_lab_test.go index fd663ce2..58220d9a 100644 --- a/internal/api/performance_lab_test.go +++ b/internal/api/performance_lab_test.go @@ -47,8 +47,9 @@ type labNode struct { } type labCluster struct { - tb testing.TB - nodes []*labNode + tb testing.TB + nodes []*labNode + lastSubmitted []string } type labFaultTransport struct { @@ -200,6 +201,10 @@ func (c *labCluster) submitTransactions(transactions []tx.Envelope, workers int) if len(transactions) == 0 { return } + c.lastSubmitted = c.lastSubmitted[:0] + for _, envelope := range transactions { + c.lastSubmitted = append(c.lastSubmitted, tx.ID(envelope)) + } if workers <= 0 { workers = 1 } @@ -266,7 +271,19 @@ func (c *labCluster) waitForMempools(size int, timeout time.Duration) { for _, node := range c.nodes { counts = append(counts, node.server.ledger.MempoolSize()) } - c.tb.Fatalf("mempools did not converge to %d before timeout: %v", size, counts) + missing := make(map[int][]string, len(c.nodes)) + for index, node := range c.nodes { + seen := make(map[string]struct{}) + for _, entry := range node.server.ledger.Snapshot().Mempool { + seen[entry.ID] = struct{}{} + } + for _, id := range c.lastSubmitted { + if _, found := seen[id]; !found { + missing[index] = append(missing[index], id) + } + } + } + c.tb.Fatalf("mempools did not converge to %d before timeout: counts=%v missingTxIDsByNode=%v", size, counts, missing) } func (c *labCluster) driveUntilHeight(indices []int, height uint64, timeout time.Duration) time.Duration { From 28ca8bb3f9a7b11ccc624e30b770698941d9e229 Mon Sep 17 00:00:00 2001 From: The Code Learner <142033899+the-code-learner@users.noreply.github.com> Date: Fri, 13 Nov 2026 22:39:33 +0100 Subject: [PATCH 2/2] ci: repeat strict seven-validator mempool convergence with race and missing IDs --- .../legacy-seven-validator-fanout.yml | 60 +++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .github/workflows/legacy-seven-validator-fanout.yml diff --git a/.github/workflows/legacy-seven-validator-fanout.yml b/.github/workflows/legacy-seven-validator-fanout.yml new file mode 100644 index 00000000..4cee205e --- /dev/null +++ b/.github/workflows/legacy-seven-validator-fanout.yml @@ -0,0 +1,60 @@ +name: Legacy 7-Validator Mempool Fanout Diagnostic + +on: + pull_request: + paths: + - '.github/workflows/legacy-seven-validator-fanout.yml' + - 'internal/api/performance_lab_test.go' + - 'internal/api/peer_sync.go' + - 'internal/api/server.go' + - 'internal/api/peer_transport.go' + workflow_dispatch: + +permissions: + contents: read + +concurrency: + group: legacy-fanout-${{ github.ref }} + cancel-in-progress: true + +jobs: + strict-fanout-stress: + name: Strict 3s mempool convergence (20 repeats, race) + runs-on: ubuntu-latest + timeout-minutes: 30 + steps: + - uses: actions/checkout@v6 + - uses: actions/setup-go@v7 + with: + go-version-file: go.mod + cache: false + - name: Record precise runner and commit + shell: bash + run: | + set -euo pipefail + mkdir -p evidence + { + echo "commit=$GITHUB_SHA" + echo "run_id=$GITHUB_RUN_ID" + echo "runner_os=$RUNNER_OS" + echo "runner_arch=$RUNNER_ARCH" + echo "cpu_count=$(nproc)" + echo "go_version=$(go version)" + echo "topology=seven-in-process-legacy-httptest-validators-one-GitHub-runner" + echo "acceptance=24-tx-on-all-seven-within-original-3s-no-timeout-change" + } > evidence/environment.txt + - name: Repeat strict mempool lab with race instrumentation + shell: bash + run: | + set -euo pipefail + go test -race ./internal/api \ + -run '^TestLabSevenValidatorsCertifiedFinality$' \ + -count=20 -timeout=14m -v 2>&1 | tee evidence/fanout-stress.log + - name: Upload strict diagnostics even on failure + if: always() + uses: actions/upload-artifact@v6 + with: + name: legacy-fanout-${{ github.sha }}-${{ github.run_attempt }} + path: evidence/ + if-no-files-found: warn + retention-days: 30