Skip to content

test(e2e): check large transaction batches without assuming order - #1493

Merged
lklimek merged 3 commits into
v1.8-devfrom
fix/e2e-large-tx-order
Sep 22, 2026
Merged

lklimek merged 3 commits into
v1.8-devfrom
fix/e2e-large-tx-order

Conversation

@lklimek

@lklimek lklimek commented Sep 21, 2026 •

Copy link
Copy Markdown
Collaborator

Fix the timing-dependent large-transaction E2E check so valid out-of-order propagation does not fail CI.

Issue being fixed or feature implemented

The rotate job on #1478 failed because TestApp_TxTooBig assumes the first and last submissions must occupy different blocks. The node logs show the proposer received transactions 0–80 and 100 before building block 1478, while 81–99 arrived later. Both endpoints legitimately landed in the same block.

Failure: https://github.com/dashpay/tenderdash/actions/runs/35583746184/job/106282198652

This PR is based directly on v1.8-dev and is independent of #1478.

What was done?

Retain all 101 transaction hashes, wait for every transaction to be committed, and assert that the minimum and maximum committed block heights differ. Successfully checked hashes are removed from the pending set to avoid repeated RPC queries. Broadcast errors now fail immediately.

How Has This Been Tested?

  • A temporary local HTTP JSON-RPC fixture replayed the observed CI block assignments through the actual E2E test and RPC client. It failed on the base revision and passed after the fix, with all 101 transactions checked.
  • The same fixture passed with a temporarily unavailable transaction and correctly failed when all transactions were assigned to one block.
  • Replay runs used go test -race -tags=deadlock -p 1 ./test/e2e/tests -run '^TestLargeTxCIRepro$' -count=1 -v. The temporary fixture is not part of this PR.
  • gofmt, git diff --check, and focused golangci-lint v2.13.2 passed (zero lint issues).
  • The full Docker E2E suite was not run locally.

Breaking Changes

None; test-only change.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation (test contract comment)

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Co-authored by Claudius the Magnificent AI Agent

PR Hygiene · de6cefc

  • Bots — thepastaclaw ✓
  • Self-review — posted; again after any push
  • Within your 5 open PRs
  • Build green
  • Approvals — you own every area touched; none needed

When every box is checked the PR Hygiene check passes and this can merge.

Wait for all submitted transactions and compare their minimum and maximum block heights. Async propagation can deliver the last submission before intermediate transactions.

Co-Authored-By: Codex <[email protected]>

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

coderabbitai Bot commented Sep 21, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: dashpay/tenderdash/.coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: 4c78dce5-88d5-4035-aac4-1584e3c23a88

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@thepastaclaw

thepastaclaw commented Sep 21, 2026 •

Copy link
Copy Markdown

⚠️ DEGRADED — Final review complete — no blockers (commit de6cefc) · triage: low · stand-in models (primary models out of quota)

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟢 Approval recommended

The change is test-only, directly addresses the stated flakiness cause, and the updated logic correctly verifies all transactions commit while avoiding order assumptions.

Review effort: Lite
Findings: None

What changed in this PR

This PR updates the TestApp_TxTooBig E2E test to avoid timing-dependent assumptions about transaction arrival order at the proposer, while still verifying that a batch exceeding block capacity spans multiple blocks.

Changes:

  • Track and verify inclusion of all submitted transaction hashes (instead of only first/last).
  • Make the inclusion check order-independent by collecting min/max committed heights across the whole batch.
  • Fail immediately on broadcast errors and avoid repeated RPC queries by removing confirmed transactions from the pending set.
File Description
test/​e2e/​tests/​app_test.go Makes TestApp_TxTooBig robust to out-of-order propagation by verifying all txs commit and the batch spans multiple heights.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

TestApp_TxTooBig no longer asserts submission order, only that every
transaction commits across multiple blocks. Reword the comment so it does
not claim the test depends on preserved ordering.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
@lklimek
lklimek marked this pull request as ready for review September 21, 2026 13:11
@github-actions github-actions Bot added the waiting-bots Waiting for the review bots to report on this head label Sep 21, 2026

@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.

⚠️ DEGRADED — Final validation — Phase 1 + Phase 2

⚠️ DEGRADED review. The primary review models were unavailable (gpt-6-astra unavailable: All credentials for model gpt-6-astra are cooling down (last error: usage_limit_reached: The usage limit has been reache), so this review ran on stand-in models: gpt-5.6-luna → muse-spark-1.3-contributor, gpt-5.6-sol → muse-spark-1.3-contributor, gpt-5.6-terra → muse-spark-1.3-contributor, gpt-6-astra → muse-spark-1.3-contributor. Both review phases and the independent verifiers still ran, but on weaker models, with Phase 1 capped at high effort. Treat the verdict as provisional; a full-strength re-review will run on the next push once the primary models are back.

Test-only fix for flaky TestApp_TxTooBig verified against the diff: order-dependent first-vs-last assertion replaced with wait-for-all-101 plus min<max height span. Map-delete-during-range, minHeight sentinel, require-on-broadcast, surviving imports, and gofmt are all sound. No defects found.

Review provenance

Source: reviewer 1: glm-5.3-flash (agent: phase1-reviewer, role: general); reviewer 2: muse-spark-1.3-contributor (standing in for gpt-6-astra) (agent: phase2-reviewer, role: general); final verifier: muse-spark-1.3-contributor (standing in for gpt-6-astra) (agent: astra-verifier, role: final-verifier)

  • Degraded mode: gpt-6-astra unavailable: All credentials for model gpt-6-astra are cooling down (last error: usage_limit_reached: The usage limit has been reache (detected by probe, since 2026-09-20T20:45:34Z); stand-ins gpt-5.6-luna → muse-spark-1.3-contributor, gpt-5.6-sol → muse-spark-1.3-contributor, gpt-5.6-terra → muse-spark-1.3-contributor, gpt-6-astra → muse-spark-1.3-contributor; Phase 1 effort capped at high
  • Triage: low by muse-spark-1.3-contributor (standing in for gpt-6-astra) (effort low) — Test-only fix to large-transaction E2E ordering assertion is small, contained, and does not touch consensus or other critical surfaces.
  • Phase 1 reviewers: glm-5.3-flash — general (completed, effort high); agent phase1-reviewer
  • Phase 1 model: glm-5.3-flash — zai quota: 5h 85% left, weekly 93% left; passed over gemini-3.8-flash-high (lane failed)
  • Fresh verifier: muse-spark-1.3-contributor (standing in for gpt-6-astra) — final-verifier; agent astra-verifier
  • Phase 2 reviewers: muse-spark-1.3-contributor (standing in for gpt-6-astra) — general (completed, effort medium); agent phase2-reviewer

@github-actions

Copy link
Copy Markdown

Bots are done — your move: post /self-reviewed.
Full checklist in the description.

@github-actions github-actions Bot added waiting-self-review Waiting for the author to post /self-reviewed and removed waiting-bots Waiting for the review bots to report on this head labels Sep 21, 2026
@lklimek

lklimek commented Sep 22, 2026

Copy link
Copy Markdown
Collaborator Author

/self-reviewed

@lklimek
lklimek enabled auto-merge (squash) September 22, 2026 07:19
@github-actions

Copy link
Copy Markdown

Policy satisfied — this can merge.
Full checklist in the description.

@github-actions github-actions Bot removed the waiting-self-review Waiting for the author to post /self-reviewed label Sep 22, 2026
@lklimek
lklimek merged commit 4f566ca into v1.8-dev Sep 22, 2026
22 checks passed
@lklimek
lklimek deleted the fix/e2e-large-tx-order branch September 22, 2026 07:20
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.

3 participants