Skip to content

Commit

Permalink
implement recursive auto sync for grafts
Browse files Browse the repository at this point in the history
  • Loading branch information
dwerner committed Nov 13, 2024
1 parent 9458fc5 commit 0a452d2
Show file tree
Hide file tree
Showing 30 changed files with 1,581 additions and 98 deletions.
3 changes: 3 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion chain/ethereum/src/chain.rs
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ pub struct Chain {
reorg_threshold: BlockNumber,
polling_ingestor_interval: Duration,
pub is_ingestible: bool,
block_stream_builder: Arc<dyn BlockStreamBuilder<Self>>,
pub block_stream_builder: Arc<dyn BlockStreamBuilder<Self>>,
block_refetcher: Arc<dyn BlockRefetcher<Self>>,
adapter_selector: Arc<dyn TriggersAdapterSelector<Self>>,
runtime_adapter_builder: Arc<dyn RuntimeAdapterBuilder>,
Expand Down
3 changes: 2 additions & 1 deletion chain/ethereum/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ pub use buffered_call_cache::BufferedCallCache;

// ETHDEP: These concrete types should probably not be exposed.
pub use data_source::{
BlockHandlerFilter, DataSource, DataSourceTemplate, Mapping, MappingABI, TemplateSource,
BlockHandlerFilter, DataSource, DataSourceTemplate, DecoderHook, Mapping, MappingABI,
TemplateSource,
};

pub mod chain;
Expand Down
4 changes: 2 additions & 2 deletions core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ pub mod polling_monitor;
mod subgraph;

pub use crate::subgraph::{
SubgraphAssignmentProvider, SubgraphInstanceManager, SubgraphRegistrar, SubgraphRunner,
SubgraphTriggerProcessor,
create_subgraph_version, SubgraphAssignmentProvider, SubgraphInstanceManager,
SubgraphRegistrar, SubgraphRunner, SubgraphTriggerProcessor,
};
10 changes: 9 additions & 1 deletion core/src/subgraph/instance_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ impl<S: SubgraphStore> SubgraphInstanceManager<S> {
))
}

async fn start_subgraph_inner<C: Blockchain>(
pub async fn start_subgraph_inner<C: Blockchain>(
&self,
logger: Logger,
deployment: DeploymentLocator,
Expand Down Expand Up @@ -504,4 +504,12 @@ impl<S: SubgraphStore> SubgraphInstanceManager<S> {

Ok(())
}

pub fn subgraph_logger(&self, loc: &DeploymentLocator) -> Logger {
self.logger_factory.subgraph_logger(loc)
}

pub fn get_env_vars(&self) -> Arc<EnvVars> {
self.env_vars.cheap_clone()
}
}
2 changes: 1 addition & 1 deletion core/src/subgraph/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ mod trigger_processor;

pub use self::instance_manager::SubgraphInstanceManager;
pub use self::provider::SubgraphAssignmentProvider;
pub use self::registrar::SubgraphRegistrar;
pub use self::registrar::{create_subgraph_version, SubgraphRegistrar};
pub use self::runner::SubgraphRunner;
pub use self::trigger_processor::*;
Loading

0 comments on commit 0a452d2

Please sign in to comment.