Skip to content

Fix contract tests balance checks + benchmarks#2783

Merged
sam0x17 merged 2 commits into
devnet-readyfrom
tx-ext-refactor-followup
Jun 23, 2026
Merged

Fix contract tests balance checks + benchmarks#2783
sam0x17 merged 2 commits into
devnet-readyfrom
tx-ext-refactor-followup

Conversation

@l0r1s

@l0r1s l0r1s commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Motivation

PR #2773 changed transaction extension behavior, which shifted the fees observed by the crowdloan precompile E2E balance smoke tests. The existing assertions used a 1_000_000 tolerance and now fail despite the intended balance flow still being preserved.

What Changed

  • Increased the post-withdraw balance tolerance in contract-tests/test/crowdloan.precompile.test.ts from 1_000_000 to 2_000_000 in both affected crowdloan precompile smoke paths.
  • Kept the rest of the create, contribute, refund, dissolve, and substrate-created crowdloan coverage unchanged.

Behavioral Impact

This is a test-only change. It does not alter runtime behavior, pallet logic, transaction extensions, precompile code, dependencies, or production configuration.

Migration / Spec Version

No runtime or pallet code is changed, so no storage migration or spec_version bump is required.

Testing

Validation is expected through the existing contract E2E test workflow that runs contract-tests/test/crowdloan.precompile.test.ts.

@github-actions

github-actions Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

🛡️ AI Review — Skeptic (security review)

VERDICT: SAFE

BASELINE scrutiny: l0r1s is an established write-permission contributor with substantial prior subtensor PR history; branch is tx-ext-refactor-followup -> devnet-ready.

Reviewed the prefetched PR metadata, prior Skeptic comment, contributor signals, changed-file list, and full patch. The PR only relaxes two balance-smoke thresholds in contract-tests/test/crowdloan.precompile.test.ts; it does not touch runtime/pallet code, dependencies, build scripts, workflows, .github/ai-review/*, or .github/copilot-instructions.md. No prior Skeptic findings were present.

Findings

No findings.

Conclusion

No malicious behavior or security vulnerability is apparent from this test-only diff. The loosened assertions do not alter chain/runtime behavior or introduce a supply-chain or CI execution path.


🔍 AI Review — Auditor (domain review)

VERDICT: 👍

Gittensor UNKNOWN; author is an established write-permission contributor with substantial prior subtensor history, so review focused on correctness of the test-only diff.

PR body was empty/trivial; the Auditor has auto-filled it. Please review.

No domain findings. This PR only relaxes two balance-smoke tolerances in contract-tests/test/crowdloan.precompile.test.ts; it does not touch runtime or pallet logic, dependencies, workflows, or spec-versioned code.

Overlap check: PR #2716 also touches this file, but as part of a broader contract E2E migration that deletes contract-tests/; it is not an alternative implementation of this immediate balance-threshold fix.

Findings

No findings.

Conclusion

The change is limited to contract-test assertions and does not affect chain behavior. No blocking correctness, migration, weight, origin, or spec-version issues were found.

@github-actions

Copy link
Copy Markdown
Contributor

🔄 AI review updated — Skeptic: SAFE Auditor: 👍

@l0r1s l0r1s added apply-benchmark-patch skip-cargo-audit This PR fails cargo audit but needs to be merged anyway labels Jun 23, 2026
@sam0x17 sam0x17 merged commit 37c7dde into devnet-ready Jun 23, 2026
227 of 233 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-cargo-audit This PR fails cargo audit but needs to be merged anyway

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants