-
Notifications
You must be signed in to change notification settings - Fork 710
Add hashed address filter #4235
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?
Add hashed address filter #4235
Conversation
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## s3-scensorship-resistant #4235 +/- ##
=============================================================
+ Coverage 32.36% 56.96% +24.60%
=============================================================
Files 477 476 -1
Lines 56865 56808 -57
=============================================================
+ Hits 18402 32363 +13961
+ Misses 35228 19597 -15631
- Partials 3235 4848 +1613 |
ae96608 to
9f01974
Compare
❌ 17 Tests Failed:
View the top 3 failed tests by shortest run time
📣 Thoughts on this report? Let Codecov know! | Powered by Codecov |
9f01974 to
041fbdf
Compare
041fbdf to
e5eb39c
Compare
635f047 to
f0ee6c2
Compare
# Conflicts: # arbnode/node.go
6235f36 to
064f48a
Compare
e0c620d to
d996b94
Compare
d996b94 to
2370090
Compare
addressfilter/address_checker.go
Outdated
| // Default parameters for HashedAddressChecker, used in NewDefaultHashedAddressChecker | ||
| const ( | ||
| restrictedAddrWorkerCount = 4 | ||
| restrictedAddrQueueSize = 1024 |
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: I think their names could be suffixed/prefixed by "default" which make them clearer.
addressfilter/address_checker.go
Outdated
| // queue full: drop check (fail-open, false negative possible) | ||
| s.pending.Done() |
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.
why fail-open here? is there a policy or something allows false negatives here ?
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.
Good question. This kind of trade off: block the whole execution vs. miss some addresses. After reconsideration, I think missing some addresses is not acceptable here so I've changed it to block instead. I also increased queue size to 8192, assuming address lookups should be fast enough .
@tristan fyi
…ransaction-address-filter-hashed-address-filter
Tristan-Wilson
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.
Please take a look at the StopWaiter utility we're using elsewhere in the code for managing spawning goroutines and graceful shutdown.
|
@Tristan-Wilson II added StopWaiter, but now I think the checker instance should be moved to FilterService. I will wait until FilterService is merged with the master, and then I will make the final fixes. Also, i removed the previous implementation |
Close NIT-4299
Waits: #4234
Changes: