-
Notifications
You must be signed in to change notification settings - Fork 1.2k
feat: various Asset Locks improvement #5527
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: various Asset Locks improvement #5527
Conversation
|
This pull request has conflicts, please rebase. |
Asset Lock tx is tested agains multiple outputs to platform
There's no more check when tx is accepted in mempool. Functional and unit tests updated accordingly
47211bc to
6875a4d
Compare
what happens if you invalidate the block with the original tx (both the original and the duplicate one should be in mempool at that point, right?) and try to mine another block after that? |
yes, both of them can be in mempool, right. They are validated agains at first look it may looks like transaction can be accepted, because:
But it is not true, because it's just simple basic validation of transaction. Proper validation happens on next step, when validated both "transaction index" and "credit pool unlock limits": So, index is tested against both list: list of indexes that have been ever used since Tip() and list of indexes that are freshly introduced in just this block. Unfortunately, I can't add a functional test for it because:
Any ideas how to test it otherwise? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK for squash merge (open to other thoughts by Udjin)
UdjinM6
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK
ogabrielides
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What was done?
How Has This Been Tested?
Run unit/functional tests
Breaking Changes
Slightly changes behaviour of TxMempool. Tx can be accepted in mempool even if Asset Unlock transaction with same index is already mined. But final consensus rules are same.
Checklist: