Pass expected_sender in verify_miner_fulfillment source check#418
Open
kiannidev wants to merge 2 commits into
Open
Pass expected_sender in verify_miner_fulfillment source check#418kiannidev wants to merge 2 commits into
kiannidev wants to merge 2 commits into
Conversation
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
…us#388) Keep TestVerifyMinerFulfillmentSourceSender alongside upstream TestSnapshotPersistence after merging origin/test. Please enter the commit message for your changes. Lines starting
b48b9aa to
d184c22
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #388 —
SwapVerifier.verify_miner_fulfillmentverified the source tx with recipient and amount only, omittingexpected_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
What Changed
swap.user_from_addressasexpected_senderon the sourceverify_txcall inverify_miner_fulfillmentTestVerifyMinerFulfillmentSourceSender— asserts call kwargs and rejects empty sender when user is boundFiles Changed
allways/validator/chain_verification.pyuser_from_addresstests/test_chain_verification.pyValidation
cd allways pytest tests/test_chain_verification.py -vTest Plan
pytest tests/test_chain_verification.py::TestVerifyMinerFulfillmentSourceSender -vtestbranchswap.user_from_address