Skip to content

test: withdraw above the protocol 14 minimum in the JS withdrawal tests - #4781

Merged
QuantumExplorer merged 1 commit into
v4.2-devfrom
fix/js-withdrawal-tests-min-amount
Sep 16, 2026
Merged

QuantumExplorer merged 1 commit into
v4.2-devfrom
fix/js-withdrawal-tests-min-amount

Conversation

@QuantumExplorer

Copy link
Copy Markdown
Member

Issue being fixed or feature implemented

Since eaf5d4c (withdrawal transaction accounting) the Core fee of the asset unlock transaction is carved out of the withdrawn amount, so identity credit withdrawal structure v2 requires at least min_withdrawal_amount plus that fee: 1,190,000 credits at 1 duff per byte. The wasm-sdk functional test and the platform-test-suite e2e withdrawal test still withdrew exactly the old minimum of 1,000,000 credits, so the "Packages functional tests" and "Test Suite" jobs fail on every pull request against v4.2-dev (for example on #4613 and #4780) with:

Credit withdrawal amount 1000000 must be greater or equal to 1190000 and less than 50000000000000

What was done?

Both tests withdraw 2,000,000 credits, leaving headroom above the new minimum, with the comments updated to explain where the minimum comes from. No production code changes.

How Has This Been Tested?

Amounts checked against min_withdrawal_amount_with_core_fee (SystemLimits::min_withdrawal_amount 1,000,000 plus ASSET_UNLOCK_TX_SIZE times the fee rate times CREDITS_PER_DUFF). The identities in both tests are funded with far more than the new amounts. CI on this PR runs the affected suites.

Breaking Changes

None.

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 added "!" to the title and described breaking changes in the corresponding section if my code contains any
  • I have made corresponding changes to the documentation if needed

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

🤖 Generated with Claude Code

Since eaf5d4c the Core fee of the asset unlock transaction is carved out
of the withdrawn amount, so identity credit withdrawal structure v2 requires
at least min_withdrawal_amount plus that fee (1190000 credits at 1 duff per
byte). The wasm-sdk functional test and the platform-test-suite e2e test still
withdrew exactly the old minimum of 1000000 credits and failed on every pull
request against v4.2-dev with "Credit withdrawal amount 1000000 must be
greater or equal to 1190000".

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 16, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 36 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f17499d1-1f36-49d1-b080-21cafe0c0830

📥 Commits

Reviewing files that changed from the base of the PR and between 11a921d and f9ad556.

📒 Files selected for processing (2)
  • packages/platform-test-suite/test/e2e/withdrawals.spec.js
  • packages/wasm-sdk/tests/functional/transitions/identity.spec.ts

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.

@github-actions github-actions Bot added this to the v4.2.0 milestone Sep 16, 2026
@QuantumExplorer
QuantumExplorer merged commit 7114656 into v4.2-dev Sep 16, 2026
16 checks passed
@QuantumExplorer
QuantumExplorer deleted the fix/js-withdrawal-tests-min-amount branch September 16, 2026 18:31
@thepastaclaw

thepastaclaw commented Sep 16, 2026

Copy link
Copy Markdown
Collaborator

🕓 Queued for automated review — 15th in line, estimated start in ~3 h (commit f9ad556)
Estimated review time once started: ~25 min (two-phase automated review; median of recent runs).

  • Request priority review — click to move this review to the front of the queue.

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