-
Notifications
You must be signed in to change notification settings - Fork 132
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
Add mempool notifier sub #2529
Closed
ecioppettini
wants to merge
23
commits into
add-blockchain-event-notifier-service
from
add-mempool-notifier-sub
Closed
Add mempool notifier sub #2529
ecioppettini
wants to merge
23
commits into
add-blockchain-event-notifier-service
from
add-mempool-notifier-sub
Conversation
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
ecioppettini
added
enhancement
New feature or request
subsys-rest
issues or PRs for the REST interface
labels
Sep 8, 2020
the serialization can change, but use json for now
add also setting to configuration builder, in order to test it, and improve the panic handling of the notifier client
in order to avoid platform specific dependencies in Cargo.lock
the new connection requests are handled through a new message tip changes are handled with tokio::watch because we only care about the latest state, but block changes use a broadcast to keep old ones too
ecioppettini
force-pushed
the
add-blockchain-event-notifier-service
branch
from
September 10, 2020 16:55
5c7253c
to
10afb4e
Compare
ecioppettini
force-pushed
the
add-mempool-notifier-sub
branch
from
September 10, 2020 19:40
68ab462
to
8a91afd
Compare
Comment on lines
+95
to
+98
mempool_sender.send(MemPoolMessage::FragmentRejected(fragment_id)) | ||
{ | ||
() | ||
} |
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 don't really understand the purpose of the if let
block here. Can't we use map_err
or something else?
ecioppettini
force-pushed
the
add-blockchain-event-notifier-service
branch
from
October 30, 2020 23:01
941a3f0
to
7c6c721
Compare
ecioppettini
force-pushed
the
add-blockchain-event-notifier-service
branch
from
November 25, 2020 15:33
7c6c721
to
5c92bf8
Compare
ecioppettini
force-pushed
the
add-blockchain-event-notifier-service
branch
from
March 3, 2021 19:50
5c92bf8
to
1cc7bf3
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
base branch is #2378 to show changes more clearly (and it would have to be merged first anyway).
Motivation
To be able to know about fragment rejection or acceptance asynchronously.
Summary
This basically sends a message each time a fragment status is modified in the logs, to anyone with an open connection on the
api/v1/notifier/mempool
endpoint. For now rejection reason is not added, only the id.This also moves the previous endpoint from
api/v1/notifer
toapi/v1/notifier/blocks
.Other
TODO: update the tests
To think about: graphql has subscriptions which can be used with websockets, so we could have a little schema instead of multiple endpoints. I'm not sure if it's worth it, especially considering that juniper doesn't have them finished.