feat: wire recent blocks tracker into event subscriber#3616
feat: wire recent blocks tracker into event subscriber#3616kevindeforth wants to merge 2 commits into
Conversation
7be74e6 to
d0a6a4d
Compare
|
PR Review for 3616. See findings below. |
|
Pull request overview — This PR wires |
|
Changes: (1) |
|
Blocking — must fix before merge. |
|
Non-blocking nits and follow-ups. (1) |
|
Non-blocking nits (cont.) (5) |
|
There is so much wrong with what Claude is spewing here, I don't even know where to start. One thing that seems worth addressing is the blocking item: As for some other pearls of wisdom:
The event stream tracks optimistic events, whereas the viewer tracks finalized events. If this test is flaky due to that, then it means the finalized state view updates before we see the optimistic event, which would be pretty bad and force us to re-think our architecture.
Nah, thie usefulness of this comment kind of died when we moved the |
resolves #3608
Uses the
RecentBlocksTrackerinside the chain gateway crate, such that block events are accompanied by a block status handle (indicating their finality status).Because
RecentBlocksTrackernow lives in the chain gateway, we can avoid sending empty block updates to the consumer, sending only in case a matching block event was found.This PR adds two integration tests: one for checking back pressure works as expected, the other for verifying that finality status is eventually updated.