Skip to content

Commit

Permalink
chore: node client enum
Browse files Browse the repository at this point in the history
  • Loading branch information
k1rill-fedoseev committed Jan 6, 2025
1 parent 132b259 commit f831fe6
Show file tree
Hide file tree
Showing 6 changed files with 72 additions and 21 deletions.
4 changes: 2 additions & 2 deletions user-ops-indexer/Cargo.lock

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

2 changes: 1 addition & 1 deletion user-ops-indexer/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ found [here](../docs/common-envs.md).
| `USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__ENABLED` | | Enable one-time reindex of missed user operations from core Blockscout DB. Will query relevant events from `logs` Postgres table | `false` |
| `USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__START_BLOCK` | | Block range start for one-time DB reindex. Use positive number for static block number, or zero/negative number to count backwards from `latest` | `0` |
| `USER_OPS_INDEXER__INDEXER__PAST_DB_LOGS_INDEXER__END_BLOCK` | | Block range end for one-time DB reindex. Use positive number for static block number, or zero/negative number to count backwards from `latest` | `0` |
| `USER_OPS_INDEXER__INDEXER__TRACE_CLIENT` | | Node client variant to use for tracing transactions, `Geth` for using `debug_traceTransaction`, `Parity` for using `trace_transaction` | Depends on `web3_clientVersion` |
| `USER_OPS_INDEXER__INDEXER__TRACE_CLIENT` | | RPC tracing namespace to use for tracing transactions, `debug` for using `debug_traceTransaction`, `trace` for using `trace_transaction` | Depends on `web3_clientVersion` |
| `USER_OPS_INDEXER__DATABASE__CONNECT__URL` | true | Postgres connect URL to Blockscout DB with read/write access | (empty) |
| `USER_OPS_INDEXER__DATABASE__CREATE_DATABASE` | | Create database if doesn't exist | `false` |
| `USER_OPS_INDEXER__DATABASE__RUN_MIGRATIONS` | | Run database migrations | `false` |
Expand Down
2 changes: 1 addition & 1 deletion user-ops-indexer/user-ops-indexer-logic/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ chrono = "0.4.31"
lru = "0.12.2"
async-trait = "0.1.77"
serde_with = "3.6.1"
alloy = { version = "0.9.1", features = ["contract", "pubsub", "provider-debug-api", "provider-trace-api"] }
alloy = { version = "0.9.2", features = ["contract", "pubsub", "provider-debug-api", "provider-trace-api"] }

[dev-dependencies]
async-trait = "0.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ impl<P: Provider, L: IndexerLogic + Sync> Indexer<P, L> {
tracing::debug!("fetching node client");
let client_version = self.client.get_client_version().await?;
tracing::info!(client_version, "fetched node client");
client_version.into()
TraceClient::default_for(client_version.into())
}
};

Expand Down Expand Up @@ -439,7 +439,7 @@ mod tests {
v06::IndexerV06 { entry_point },
);
indexer
.handle_tx(tx_hash, TraceClient::Parity)
.handle_tx(tx_hash, TraceClient::Trace)
.await
.unwrap();

Expand Down Expand Up @@ -503,7 +503,7 @@ mod tests {
Default::default(),
v06::IndexerV06 { entry_point },
);
for trace_client in [TraceClient::Geth, TraceClient::Parity] {
for trace_client in [TraceClient::Debug, TraceClient::Trace] {
entity::user_operations::Entity::delete_by_id(op_hash.to_vec())
.exec(db.as_ref())
.await
Expand Down Expand Up @@ -572,7 +572,7 @@ mod tests {
v07::IndexerV07 { entry_point },
);
indexer
.handle_tx(tx_hash, TraceClient::Parity)
.handle_tx(tx_hash, TraceClient::Trace)
.await
.unwrap();

Expand Down
75 changes: 63 additions & 12 deletions user-ops-indexer/user-ops-indexer-logic/src/indexer/rpc_utils.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion user-ops-indexer/user-ops-indexer-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ serde = "1.0"
tokio = { version = "1.23", features = ["rt-multi-thread", "macros"] }
tonic = "0.8"
tracing = "0.1"
alloy = { version = "0.9.1", features = ["provider-ws", "provider-http"] }
alloy = { version = "0.9.2", features = ["provider-ws", "provider-http"] }

[dev-dependencies]
sea-orm = { version = "*", features = ["sqlx-sqlite"] }

0 comments on commit f831fe6

Please sign in to comment.