Skip to content

Pass expected_sender in verify_miner_fulfillment source check#418

Open
kiannidev wants to merge 2 commits into
entrius:testfrom
kiannidev:fix/388-fulfillment-expected-sender
Open

Pass expected_sender in verify_miner_fulfillment source check#418
kiannidev wants to merge 2 commits into
entrius:testfrom
kiannidev:fix/388-fulfillment-expected-sender

Conversation

@kiannidev
Copy link
Copy Markdown

Summary

Fixes #388SwapVerifier.verify_miner_fulfillment verified the source tx with recipient and amount only, omitting expected_sender=swap.user_from_address. Axon confirm, forward pending drain, and miner fulfillment all bind the source sender; fulfillment confirm could pass a mismatched/empty sender.

Related Issue

Fixes #388

Change Type

  • Bug fix
  • Regression tests
  • New feature
  • Refactor

What Changed

  • Pass swap.user_from_address as expected_sender on the source verify_tx call in verify_miner_fulfillment
  • Added TestVerifyMinerFulfillmentSourceSender — asserts call kwargs and rejects empty sender when user is bound

Files Changed

File Change
allways/validator/chain_verification.py Source fulfillment verify binds user_from_address
tests/test_chain_verification.py Regression tests for #388

Validation

cd allways
pytest tests/test_chain_verification.py -v

Test Plan

  • pytest tests/test_chain_verification.py::TestVerifyMinerFulfillmentSourceSender -v
  • Full validator test suite green on test branch
  • No behavior change when source tx sender matches swap.user_from_address

Pass expected_sender=swap.user_from_address on the source verify_tx
call so FULFILLED confirm matches axon, forward drain, and miner paths.
Fixes entrius#388
@xiao-xiao-mao xiao-xiao-mao Bot added the bug Something isn't working label May 28, 2026
…us#388)

Keep TestVerifyMinerFulfillmentSourceSender alongside upstream
TestSnapshotPersistence after merging origin/test.

Please enter the commit message for your changes. Lines starting
@kiannidev kiannidev force-pushed the fix/388-fulfillment-expected-sender branch from b48b9aa to d184c22 Compare May 28, 2026 20:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] verify_miner_fulfillment omits expected_sender on source tx — inconsistent with axon/miner paths

1 participant