-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(channel): replace with a faster implementation (#252)
* channel: replace channel with a better implementation * start integrating channel * add some test cases for the channel * only look at the final `gossip_table` when the we've exited * fix even more races in the test suite * enable tsan in the test CI * remove all usages of `unordered` from the codebase * removing PacketBatch in favour of sending singular packets * choose better time units for benchmarks * don't use identifiers that start with a underscore * remove the old channel implementation * add some documentation and clean up the code * remove stale code and improve gossip value filtering * implement an exit order sync method * cleanup allocation even more * remove the last usages of close * clarify `CONTRIBUTING.md` and more `initial_capacity` from the channel initialization * gossip: revert filter optimization - Also don't take ownership of the pull request gossip values, they aren't ours to free. This was causing GPA double free detection to trigger * gossip: add back missing `clearRetainingCapacity` * grafana: fix overlapping timestamps * fix racy deinit for gossip service * add some comments * remove `.discard` flag and fix up some logic * remove unused variable * remove UAF from gossip So this one was really hard to find. In Zig, storing the pointer (and then using it) to a capture which was by-value is not well defined. LLVM is allowed to create induction stack space for optimizing loops and overwrite the stack space where the pointer was pointing at. Here we are storing a pointer to the capture, probably as an premature optimization, and it was getting overwriten. Storing a pointer to the prune message wouldn't have optimized anyways, since the capture is still a stack-copy. * remove unneeded free * fix shred collector exiting early * cmd: remember to join on errors so they don't keep running * fix(shred-collector): not processing shreds there was a bool being used to decide whether to pass packets to the shred verifier, and it was being negated too many times. i fixed the logic. i think the bug was introduced due to having the logic spread across too many scopes, which made it confusing. i tried to make it clearer by moving the logic into a narrower scope --------- Co-authored-by: Drew Nutter <[email protected]>
- Loading branch information
1 parent
9ccbaa9
commit 2cd4d3f
Showing
49 changed files
with
1,709 additions
and
1,613 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.