Skip to content

Commit

Permalink
Add configurable start height for tendermint chains to hubble (#1952)
Browse files Browse the repository at this point in the history
  • Loading branch information
cor authored May 31, 2024
2 parents 2bc16dd + 355fb7c commit c195d8c
Show file tree
Hide file tree
Showing 9 changed files with 246 additions and 104 deletions.
2 changes: 1 addition & 1 deletion dictionary.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

0xbonlulu
0xc0dejug
0xkaiserkarel
Expand Down Expand Up @@ -526,6 +525,7 @@ hlist
hmac
holiman
horcrux
httpie
httptemplate
hxtmjjsrmzsjyc
hypertable
Expand Down
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,7 @@
openssl
pkg-config
protobuf
httpie
self'.packages.tdc
self'.packages.voy-send-msg
yq
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.

8 changes: 7 additions & 1 deletion hubble/hubble.nix
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,10 @@
type = types.listOf (
types.submodule {
options.url = mkOption { type = types.str; example = "https://rpc.example.com"; };
options.grpc_url = mkOption { type = types.nullOr types.str; example = "https://grpc.example.com"; default = null; };
options.type = mkOption { type = types.enum [ "tendermint" "ethereum" ]; };
options.start = mkOption { type = types.int; example = 1; default = 0; };
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; };
options.harden = mkOption { type = types.bool; example = true; default = true; };
}
Expand Down Expand Up @@ -109,10 +111,14 @@
{
wantedBy = [ "multi-user.target" ];
description = "Hubble";
unitConfig = {
StartLimitIntervalSec = mkForce 0;
};
serviceConfig = {
Type = "simple";
ExecStart = pkgs.lib.getExe hubble-systemd-script;
Restart = mkForce "always";
RestartSec = mkForce 3;
};
environment = {
RUST_LOG = "${cfg.log-level}";
Expand Down
4 changes: 2 additions & 2 deletions hubble/src/chain_id_query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub async fn tx(db: PgPool, indexers: Indexers) {
SELECT
cl.client_id, ch.id
FROM
v0.create_clients cl
v0_cosmos.create_client cl
JOIN
v0.chains ch
ON
Expand Down Expand Up @@ -165,7 +165,7 @@ pub async fn tx(db: PgPool, indexers: Indexers) {
SELECT
cl.transaction_hash, cl.client_id, ch.id
FROM
v0.evm_client_created cl
v0_evm.client_created cl
JOIN
v0.chains ch
ON
Expand Down
Loading

0 comments on commit c195d8c

Please sign in to comment.