Skip to content
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

fix: zmq reorg handler #395

Merged
merged 18 commits into from
Aug 28, 2023
Merged

fix: zmq reorg handler #395

merged 18 commits into from
Aug 28, 2023

Conversation

lgalabru
Copy link
Contributor

@lgalabru lgalabru commented Aug 21, 2023

As recently experienced, the zmq channel can behave differently in presence of re-orgs.
This PR is tweaking the zmq code site to support the following scenario.

 // Handle a behaviour specific to ZMQ usage in bitcoind.
 // Considering a simple re-org:
 // A (1) - B1 (2) - C1 (3)
 //       \ B2 (4) - C2 (5) - D2 (6)
 // When D2 is being discovered (making A -> B2 -> C2 -> D2 the new canonical fork)
 // it looks like ZMQ is only publishing D2.
 // Without additional operation, we end up with a block that that we
 // can't append.

The reorg handler can support blocks out of order and these situations are pretty well unit tested, but in this situation, we never received the missing block.

We are also revisiting the anatomy of the integration with Ordhook, by introducing a new ObserverSidecar struct providing more context to layers built on top of Chainhook.

Copy link
Contributor

@MicaiahReid MicaiahReid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand how this fixes the zmq reorg handler, but I'm cool with the changes 😅

@lgalabru lgalabru merged commit db7e087 into develop Aug 28, 2023
@lgalabru lgalabru deleted the fix/reorg-handler branch August 28, 2023 20:05
@github-actions
Copy link

🎉 This PR is included in version 1.1.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants