Skip to content

Conversation

@kayibal
Copy link
Collaborator

@kayibal kayibal commented Jul 7, 2025

Summary

  • Introduces comprehensive framework for integrating external data sources into Tycho simulation
  • Supports non-composable hooks like Sorella's Angstrom integration
  • Provides unified trait system for pull-based and push-based data sources
  • Includes block synchronization strategies and speculative update handling

@github-project-automation github-project-automation bot moved this to Todo in Tycho Jul 7, 2025
@kayibal kayibal changed the base branch from main to release/hooks July 7, 2025 08:58
@kayibal kayibal changed the title Add external data source framework for non-composable hooks feat: add external data source framework for non-composable hooks Jul 7, 2025
@kayibal kayibal force-pushed the ah/external-data-framework branch from 898c1be to caeca20 Compare July 7, 2025 12:40
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.
@kayibal kayibal force-pushed the ah/external-data-framework branch from caeca20 to cb1346f Compare July 7, 2025 14:09

/// Error types for external data source operations
#[derive(Debug, thiserror::Error)]
pub enum ExternalDataError {
Copy link
Collaborator

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

Copy link
Collaborator Author

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)

Copy link
Collaborator

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?

Copy link
Collaborator Author

@kayibal kayibal Aug 19, 2025

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
Copy link
Collaborator

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?

Base automatically changed from release/hooks to main August 28, 2025 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

4 participants