-
Notifications
You must be signed in to change notification settings - Fork 8
feat: enable random anti-fee sniping #5
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
base: master
Are you sure you want to change the base?
feat: enable random anti-fee sniping #5
Conversation
6a39ba9 to
94237e8
Compare
|
Thanks @aagbotemi I'm still in the process of reviewing. I agree it would be nice to resolve the clippy error - my other suggestion would be to globally allow the lints in |
Thank you @ValuedMammal. Clippy error and large enum variant error in the CI build has been fixed. For subsequent ones(if there is), I'll open another for it. |
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.
I have some review notes
- For imports, prefer
allocoverstd. This way we can actually support no-std. - I want to see a test of some kind that creates a PSBT with
enable_anti_fee_snipingand checks the expected values of the locktime and/or sequence.
Noted. |
42fe314 to
cfe7b5b
Compare
cfe7b5b to
9041b2f
Compare
|
We should also be able to remove the clippy allow attributes in |
Alright, I will remove the clippy allow attributes in |
|
I'm still in favor of using |
Fixed! I've updated the code to use |
5506018 to
9fde5c1
Compare
ff19f53 to
c4dd696
Compare
|
In general I think the git history would be cleaner if we didn't merge with merge commits but instead rebase the commits in this PR. |
feat: bip326 anti-fee sniping made compatible with new current library fix(clippy): fixing clippy CI build error with Box due to large enum variant example to test anti fee snipping, extracted the height from tx checking expected range of values
- Rename MAX_SEQUENCE_VALUE to MAX_RELATIVE_HEIGHT for clarity - Use Script::is_p2tr() for more robust taproot input detection - Replace fallible LockTime::from_height with expect for valid Height - Remove unnecessary clippy allow attributes in lib.rs - Remove Box usage from error and enums - Rename anti_fee_snipping example to anti_fee_sniping
c4dd696 to
cfa9826
Compare
cfa9826 to
4649e8d
Compare
Alright, I've done the cleanup |
|
Approach ACK. |
This PR implements Anti-Fee-Sniping with randomization as discussed in issue #4
Notes to the reviewers
The implementation adds randomization to anti-fee-sniping behavior:
cargo fmtandcargo clippybefore committingCloses #4