-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow to create filtering policy rules by conditional order id or transaction hashes #146
Conversation
3b56f1f
to
af3c3c8
Compare
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.
Minor nits. Additionally, I'm not sure why we are introducing different variable naming within this PR (which seems orthogonal, and should be done across the entire repo).
config.json.example
Outdated
"defaultAction": "ACCEPT" | ||
"defaultAction": "ACCEPT", | ||
"conditionalOrderIds": { | ||
"0xd3338f21c89745e46af56aeaf553cf96ba9bc66f": "DROP", |
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.
nit: full-length example order id
"0xd3338f21c89745e46af56aeaf553cf96ba9bc66f": "DROP", | ||
}, | ||
"transactions": { | ||
"0x33ef06af308d1e4f94dd61fa8df43fe52b67e8a485f4e4fff75235080e663bfa": "DROP", |
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.
nit: we should warn on this as a single transaction may actually spawn multiple conditional order ids (and therefore kill multiple)
1ced1d5
to
c00234b
Compare
Description
It's possible that we need to quickly ignore one specific order, but we don't want to neither ignore the whole handler (i.e. all TWAP orders), nor a whole user.
For this reason, I included in this PR support for creating rules to ignore or drop orders by ID.
Test
One way to test this is to check how, current version of watch tower shows a ton of errors and can't process blocks in Sepolia with this config:
However, with this config it works: