-
Notifications
You must be signed in to change notification settings - Fork 11
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
Bringing back 1 x filters #281
Bringing back 1 x filters #281
Conversation
7034382
to
81ea06d
Compare
3ef97c6
to
651ff9f
Compare
pub(crate) fn new( | ||
config: Config, | ||
storage_path: PathBuf, | ||
enable_legacy_filters: bool, |
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.
A nit, but I'd rather avoid a bool flag here, as I can imagine that our "standard" filters will become legacy and the legacy ones will become "legacier" :)
How about an enum Filters { V1_x, V2_x }
or something along these lines?
// `EventFilter::Signatures` should filter out everything except `ApiVersion`s and | ||
// `FinalitySignature`s. |
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.
// `EventFilter::Signatures` should filter out everything except `ApiVersion`s and | |
// `FinalitySignature`s. | |
// `EventFilter::Signatures` should filter out everything except `ApiVersion`s, | |
// `FinalitySignature`s and `Shutdown`s. |
However, I'd consider removing these comments completely because they usually rot and the code is self explanatory.
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.
you're right
Plase consider adding the new flag to the example configs and perhaps a readme file. |
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.
LGTM 👍
…r now it provides 2.x SSE events. Applying code review suggestions
e32da8d
to
f382467
Compare
Rationale
As a user of sidecar that's used to consume 1.x style sse events I want to be still able to listen to events after 2.0 changes.
Notes
The goal of this effort is to recreate the sse filter endpoints from 1.x. For now the endpoints will be satureated with 2.x style SSE events, but before release we need to translate them to 1.x format.
Work done
Sidecars SSE server has 3 more endpoints:
/main
-> transmitsApiVersion
,FinalitySignature
andShutdown
events/deploys
-> transmitsApiVersion
,TransactionAccepted
andShutdown
events/sigs
-> transmitsApiVersion
,BlockAdded
,TransactionProcessed
,TransactionExpired
,Fault
,Step
andShutdown
events