-
Notifications
You must be signed in to change notification settings - Fork 39
feat: add external data source framework for non-composable hooks #251
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
base: main
Are you sure you want to change the base?
Conversation
898c1be to
caeca20
Compare
This commit introduces a comprehensive framework for integrating external data sources into the Tycho simulation system, specifically designed to support non-composable hooks like Sorella's Angstrom integration. Key features: - Unified trait system for pull-based and push-based external data sources - Block synchronization strategies (Conservative, LatestOnly) - Speculative update handling with revert capability - Integration with ProtocolStreamExtension for seamless data flow - Support for both oracle-style and high-frequency data sources The framework enables protocols to provide off-chain data that enriches the main chain simulation with additional context such as signatures, oracle prices, or hook-specific data.
caeca20 to
cb1346f
Compare
|
|
||
| /// Error types for external data source operations | ||
| #[derive(Debug, thiserror::Error)] | ||
| pub enum ExternalDataError { |
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.
can we split these into several files please? 🥺 we can make a dir called external_data
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.
Sure, this is just a draft. Unfortunaty we already have an integration based on it so if you need to move things I will ask you to take that into consideration (communicate what they need to change)
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.
oh boy 😬 you mean angstrom?? how complete is the implementation currently?
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.
It's pretty much done: #294
| let main_stream = ReceiverStream::new(rx).then({ | ||
| let decoder = decoder.clone(); // Clone the decoder for the closure | ||
| move |msg| { | ||
| // TODO: fix this clone workaround once we update tycho-common |
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.
update tycho-common with what?
Summary