Skip to content

Commit

Permalink
fix(hubble): improve reorg handling
Browse files Browse the repository at this point in the history
  • Loading branch information
qlp committed Sep 17, 2024
1 parent 0ddbf5a commit 4acbfa8
Show file tree
Hide file tree
Showing 40 changed files with 2,403 additions and 12 deletions.
5 changes: 3 additions & 2 deletions Cargo.lock

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

1 change: 1 addition & 0 deletions hubble/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ path = "src/main.rs"

[dependencies]
alloy = { version = "0.1", features = ["full"] }
async-trait = "0.1.82"
axum = { workspace = true, features = ["macros", "tokio"] }
backon = "0.4.4"
base64 = { workspace = true }
Expand Down
20 changes: 19 additions & 1 deletion hubble/hubble.nix
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,24 @@
indexers = mkOption {
type = types.listOf (
types.submodule {
options.indexer_id = mkOption {
type = types.nullOr types.str;
description = "Id of the indexer which is used by the internal administration of Hubble. Should never change.";
example = "amazing-testnet";
default = null;
};
options.internal_chain_id = mkOption {
type = types.nullOr types.number;
description = "Hubble internal chain id, used to fetch the current height when migrating to fetchers.";
example = "4";
default = null;
};
options.new_chain_override = mkOption {
type = types.nullOr types.bool;
description = "Indicator that this is a new chain, so the current height must not be used when migrating to fetchers.";
example = "false";
default = null;
};
options.label = mkOption { type = types.str; example = "something-custom"; };
options.filter = mkOption {
type = types.nullOr types.str;
Expand Down Expand Up @@ -97,7 +115,7 @@

options.chain_id = mkOption { type = types.nullOr types.str; example = "union-testnet-8"; default = null; };
options.grpc_url = mkOption { type = types.nullOr types.str; example = "https://grpc.example.com"; default = null; };
options.type = mkOption { type = types.enum [ "tendermint" "ethereum" "beacon" "bera" "ethereum-fork" "arb" "scroll" ]; };
options.type = mkOption { type = types.enum [ "tendermint" "ethereum" "beacon" "bera" "ethereum-fork" "arb" "scroll" "eth-fetcher" ]; };
options.start_height = mkOption { type = types.int; example = 1; default = 0; };
options.chunk_size = mkOption { type = types.int; example = 1; default = 200; };
options.until = mkOption { type = types.int; example = 1; default = 1000000000000; };
Expand Down
2 changes: 2 additions & 0 deletions hubble/src/chain_id_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ pub async fn tx(db: PgPool, indexers: Indexers) {

for indexer in indexers {
match indexer {
IndexerConfig::DummyFetcher(_) => {}
IndexerConfig::EthFetcher(_) => {}
IndexerConfig::Scroll(_) => {}
IndexerConfig::Arb(_) => {}
IndexerConfig::Beacon(_) => {}
Expand Down
Loading

0 comments on commit 4acbfa8

Please sign in to comment.