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

Node: Observation batching #3977

Conversation

bruce-riley
Copy link
Contributor

@bruce-riley bruce-riley commented Jun 10, 2024

This PR introduces the batching of observations by adding the SignedObservationBatch gossip message. It modifies the guardian to wait up to one second in order to batch as many observations as possible (up to 4000) into a single gossip message. This not only reduces gossip traffic but also the load on the guardians and applications that listen to observations.

This PR is meant to go hand-in-hand with PR #4000, which further improves gossip traffic by splitting it across different topics, allowing the guardians and gossip listeners (like spies and flies) to only subscribe to the topics they need.

NOTE: Once the gossip network cutover is complete, support for SignedObservation (individual observation) messages will be dropped, but in the meantime, applications that listen to observations need to support both message streams.

@bruce-riley bruce-riley force-pushed the node_observation_batching branch 3 times, most recently from 4e6c95b to fd94f23 Compare June 10, 2024 19:59
@bruce-riley bruce-riley force-pushed the node_observation_batching branch 5 times, most recently from be3eceb to a3a513a Compare July 1, 2024 17:09
@bruce-riley bruce-riley marked this pull request as ready for review July 1, 2024 17:49
@bruce-riley bruce-riley force-pushed the node_observation_batching branch 2 times, most recently from 4ca598b to 2bf941c Compare July 1, 2024 22:00
panoel
panoel previously approved these changes Jul 3, 2024
evan-gray
evan-gray previously approved these changes Jul 4, 2024
node/pkg/processor/broadcast.go Show resolved Hide resolved
@evan-gray evan-gray requested a review from panoel July 4, 2024 14:10
@bruce-riley
Copy link
Contributor Author

A concern has been raised regarding possible latency impacts of this change. Therefore I am converting this PR back to draft until those concerns can be addressed.

@bruce-riley bruce-riley marked this pull request as draft July 5, 2024 15:11
@aadam-10
Copy link
Contributor

The availability of Pyth's market data with as little latency as possible is a very strong usecase to warrant not being part of observation batching, and so they should be excluded from it.

@bruce-riley
Copy link
Contributor Author

This PR is being superseded by PR #4066, so this one is being closed.

@bruce-riley bruce-riley closed this Aug 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants