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

add substreams config provider #3897

Merged
merged 1 commit into from
Sep 6, 2022
Merged

Conversation

mangas
Copy link
Contributor

@mangas mangas commented Aug 31, 2022

Adds substreams as a provider type rather than a protocol.

@mangas mangas force-pushed the filipe/add-substreams-cfg-provider branch from e93862d to 1e94c0d Compare August 31, 2022 13:45
@evaporei
Copy link
Contributor

evaporei commented Sep 1, 2022

LGTM, is anything missing here?

@matthewdarwin
Copy link

See discussion here: https://forum.thegraph.com/t/substreams-into-subgraphs-a-simple-integration/3542

@mangas mangas force-pushed the filipe/add-substreams-cfg-provider branch from bcfda90 to 01b19c6 Compare September 5, 2022 12:17
@mangas mangas marked this pull request as ready for review September 5, 2022 14:23
node/src/main.rs Outdated Show resolved Hide resolved
@mangas mangas force-pushed the filipe/add-substreams-cfg-provider branch from 01b19c6 to 8590513 Compare September 6, 2022 08:32
@mangas mangas requested a review from evaporei September 6, 2022 08:46
@mangas mangas merged commit c1c7523 into master Sep 6, 2022
@mangas mangas deleted the filipe/add-substreams-cfg-provider branch September 6, 2022 13:50
@@ -334,10 +319,12 @@ async fn main() {
node_id.clone(),
metrics_registry.clone(),
firehose_networks_by_kind.get(&BlockchainKind::Ethereum),
substreams_networks_by_kind.get(&BlockchainKind::Ethereum),
Copy link
Contributor

Choose a reason for hiding this comment

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

This will start to be interesting because this force a substreams right not be for a "known" network. substreams brings the possibility to support an infinite number of chain as long as an substreams endpoint exist.

Going full free form raises interesting question though. I think it would be a good subject for Wednesday weekly call.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

For querying there are some aspects like block resolution that require the block cache to be populated. This is why we've gone this way. By being an endpoint type, we can require the chain to be ingested and thus we can rely on the ChainStore for block resolution and "close to head" status

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise we'd need a "substreams" ingestor if that makes sense

kaiwetlesen pushed a commit to kaiwetlesen/graph-node that referenced this pull request Sep 7, 2022
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