Skip to content

Conversation

@dannywillems
Copy link
Member

@dannywillems dannywillems commented Oct 30, 2025

Cherry-picked from #1553

Summary

Adds new test cases for account creation scenarios in transaction logic:

  • test_apply_payment_creates_receiver_account: Tests payment transactions
    that automatically create receiver accounts, verifying that the account
    creation fee is deducted from the payment amount.
  • test_apply_coinbase_with_fee_transfer_creates_account: Tests coinbase
    transactions with fee transfers to nonexistent accounts, verifying account
    creation and fee deduction.

These tests ensure correct handling of account creation fees during the first
pass of two-phase transaction application.

Test plan

  • Tests added for payment transactions creating receiver accounts
  • Tests added for coinbase transactions with fee transfer to new accounts
  • Run tests with: cargo test --test test_transaction_logic_first_pass
  • Run tests with: cargo test --test test_transaction_logic_first_pass_coinbase --release

Source: Tests ported from #1553

Adds new test cases for account creation scenarios:
- test_apply_payment_creates_receiver_account: Tests payment
  transactions that automatically create receiver accounts,
  verifying that the account creation fee is deducted from
  the payment amount.
- test_apply_coinbase_with_fee_transfer_creates_account: Tests
  coinbase transactions with fee transfers to nonexistent
  accounts, verifying account creation and fee deduction.

These tests ensure correct handling of account creation fees
during the first pass of two-phase transaction application.
@github-actions
Copy link

github-actions bot commented Oct 30, 2025

OCaml Reference Validation Results

Repository: https://github.com/MinaProtocol/mina.git
Branch: compatible
Status: ✓ Validation passed

Click to see full validation output
Checking OCaml references against https://github.com/MinaProtocol/mina.git (branch: compatible)
Fetching current commit from compatible...
Current OCaml commit: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2

Validating references...
========================
✓ VALID: ledger/src/account/account.rs -> src/lib/mina_base/account.ml L:201-224
  ⚠ STALE COMMIT: fc6be4c58091c761f827c858229c2edf9519e941 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/for_tests.rs -> src/lib/transaction_logic/mina_transaction_logic.ml L:2285-2285
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/for_tests.rs -> src/lib/transaction_logic/mina_transaction_logic.ml L:2351-2356
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/for_tests.rs -> src/lib/transaction_logic/mina_transaction_logic.ml L:2407
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/transaction_status.ml L:9-51
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/transaction_status.ml L:452-454
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/with_status.ml L:6-10
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/fee_transfer.ml L:76-80
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/fee_transfer.ml L:68-69
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/mina_base/coinbase.ml L:17-21
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/mod.rs -> src/lib/transaction/transaction.ml L:8-11
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:34-48
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/stake_delegation.ml L:11-13
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:179-181
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:239-243
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)
✓ VALID: ledger/src/scan_state/transaction_logic/signed_command.rs -> src/lib/mina_base/signed_command_payload.ml L:352-362
  ⚠ STALE COMMIT: 5da42ccd72e791f164d4d200cf1ce300262873b3 (current: ea6244d30c67283a7c4fcf28cdebf96ab5c3ede2)

Summary
=======
Total references found: 16
Valid references: 16
Invalid references: 0
Stale commits: 16

⚠ Warning: 16 reference(s) have stale commits
Run with --update to update them automatically

@dannywillems dannywillems self-assigned this Oct 30, 2025
@github-actions
Copy link

✓ Code Reference Verification Passed

All code references in the documentation have been verified successfully!

Total references checked: 1
Valid references: 1

The documentation is in sync with the codebase on the develop branch.

@dannywillems dannywillems disabled auto-merge October 31, 2025 05:14
@dannywillems dannywillems merged commit 156d79e into develop Oct 31, 2025
72 of 73 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

3 participants