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

don't fail ingestor on net_version changed from zero #4692

Merged
merged 1 commit into from
Jun 14, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions store/postgres/src/block_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ use std::{
use graph::{
blockchain::ChainIdentifier,
components::store::BlockStore as BlockStoreTrait,
prelude::{error, BlockNumber, BlockPtr, Logger, ENV_VARS},
prelude::{error, warn, BlockNumber, BlockPtr, Logger, ENV_VARS},
};
use graph::{constraint_violation, prelude::CheapClone};
use graph::{
Expand Down Expand Up @@ -241,13 +241,21 @@ impl BlockStore {
return false;
}
if chain.net_version != ident.net_version {
error!(logger,
if chain.net_version == "0" {
warn!(logger,
"the net version for chain {} has changed from 0 to {} since the last time we ran, ignoring difference because 0 means UNSET and firehose does not provide it",
chain.name,
ident.net_version,
)
} else {
error!(logger,
"the net version for chain {} has changed from {} to {} since the last time we ran",
chain.name,
chain.net_version,
ident.net_version
);
return false;
return false;
}
}
if chain.genesis_block != ident.genesis_block_hash.hash_hex() {
error!(logger,
Expand Down