-
Notifications
You must be signed in to change notification settings - Fork 7
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
modify (simplify) state_history plugin's thread logic; add get_status_request_v1
#96
Conversation
Note:start |
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 ship_streamer_if_test and ship_streamer_test and make sure they pass. Hopefully this resolves #20.
Also, besides that change, is this PR ready for review? Or is there more work still required?
Will be addressed in another PR (refactoring log code) that must be merged as a pair with this one.
078145e
to
18bea83
Compare
really sorry for the force push at the end; pushed the log changes here that I wanted to keep as a separate PR |
actually, since review hasn't started, I'm just going to reopen a PR without the force pushes... sorry about that... |
User Facing Changes
Add
get_status_request_v1
andget_status_result_v1
for completeness and consistency. It's a minor thing, this just provides access to the range of blocks with finality data available.Some state_history log messages have been removed, most notably the log that occurs on every block. That seemed rather unnecessary (and was not present in 2.0/3.1) but this change can certainly be revisited.
Internal Changes
The entirety of the connection code has been reworked to simplify the threading logic. This new design makes all decisions about what blocks to send on the main thread, and then conveys that information (while holding appropriate handles) to the ship thread which does the log reading, decompression, and websocket operations. This rework is expected to fix #275 because the prior implementation would sometimes not send forks properly due to thread timing.
Blocking Issues
Unfortunately with the way the log implementation relies on mutexes the new approach is currently subject to deadlocks. Log implementation will need to be refactored to be free of mutexes next.