Skip to content

fix substreams info endpoint #5851

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

Merged
merged 1 commit into from
Mar 3, 2025
Merged

Conversation

mangas
Copy link
Contributor

@mangas mangas commented Feb 25, 2025

No description provided.

@mangas mangas force-pushed the filipe/fix-substreams-info-endpoint branch 3 times, most recently from cc96be6 to 082de01 Compare February 25, 2025 23:18
@mangas mangas requested a review from isum February 25, 2025 23:21
@mangas mangas force-pushed the filipe/fix-substreams-info-endpoint branch from 082de01 to b627dd3 Compare February 25, 2025 23:27
@mangas mangas marked this pull request as ready for review February 25, 2025 23:43
Comment on lines 84 to 90
let pred = if info.chain_name.contains("arbitrum") {
|x| x == "extended" || x == "hybrid"
} else {
|x| x == "extended"
};

Ok(info.block_features.iter().all(|x| x == "extended"))
Ok(info.block_features.iter().all(pred))
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure if this will work as expected. For example, arbone.firehose.pinax.network:443 returns only block_features: ["hybrid"] which is fine, but arb-one.streamingfast.io:443 returns block_features: ["hybrid", "extended@22207818"] which will not pass the test.

You can replace the .all() call with .any(), or update the check to |x| x == "hybrid" || x == "extended" || x.starts_with("extended@") but event this may not cover all the differences in the Firehose responses.

@mangas mangas force-pushed the filipe/fix-substreams-info-endpoint branch from b627dd3 to 1934881 Compare February 26, 2025 09:48
@mangas mangas force-pushed the filipe/fix-substreams-info-endpoint branch 2 times, most recently from 5740f22 to 8815786 Compare February 26, 2025 13:57
@mangas mangas force-pushed the filipe/fix-substreams-info-endpoint branch from 8815786 to c599f70 Compare February 26, 2025 14:20
@mangas mangas merged commit 6d46576 into master Mar 3, 2025
6 checks passed
@mangas mangas deleted the filipe/fix-substreams-info-endpoint branch March 3, 2025 16:20
encalypto added a commit that referenced this pull request Mar 28, 2025
encalypto added a commit that referenced this pull request Mar 28, 2025
encalypto added a commit that referenced this pull request Mar 31, 2025
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.

2 participants