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

Hubble reorg handling #2944

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
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
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.

1 change: 1 addition & 0 deletions dictionary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ fetchurl
fetchzip
fields
fileset
finalizer
flamegraph
fleek
floorlog
Expand Down

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