⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Draft
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
1,349 changes: 749 additions & 600 deletions Cargo.lock

Large diffs are not rendered by default.

156 changes: 80 additions & 76 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,98 +21,102 @@ authors = ["Evolve Stack Contributors"]

[workspace.dependencies]
# Reth dependencies - Using v1.8.4 stable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment indicates that reth v1.8.4 is being used, but the dependencies have been upgraded to v1.10.1. Please update the comment to reflect the new version for better maintainability.

Suggested change
# Reth dependencies - Using v1.8.4 stable
# Reth dependencies - Using v1.10.1 stable

reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-network = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-network-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-node-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4" }
reth-chainspec = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-cli-util = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-rpc-eth-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-tracing-otlp = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-node-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-node-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-errors = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-optimism-node = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-optimism-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-optimism-rpc = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-optimism-forks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-optimism-chainspec = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-optimism-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-optimism-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-trie-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-trie-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-rpc-eth-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-primitives-traits = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-provider = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-storage-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-tracing = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-transaction-pool = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-network = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-network-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-chain-state = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-ethereum-cli = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-basic-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-engine-local = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-engine-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-ethereum-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-ethereum-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-e2e-test-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-evm = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-evm-ethereum = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-execution-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-node-core = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-node-types = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-payload-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-payload-builder-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-payload-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-primitives = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-ethereum-forks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-revm = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-rpc-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-rpc-builder = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }
reth-rpc-engine-api = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1" }

ev-revm = { path = "crates/ev-revm" }


# Consensus dependencies
reth-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4", default-features = false }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4", default-features = false }
reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4", default-features = false }
reth-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1", default-features = false }
reth-consensus-common = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1", default-features = false }
reth-ethereum-consensus = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1", default-features = false }

# Test dependencies
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4", default-features = false }
reth-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4", default-features = false }
reth-tasks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.8.4", default-features = false }
reth-testing-utils = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1", default-features = false }
reth-db = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1", default-features = false }
reth-tasks = { git = "https://github.com/paradigmxyz/reth.git", tag = "v1.10.1", default-features = false }

revm = { version = "29.0.1", default-features = false }
revm-context-interface = { version = "10.2.0", default-features = false }
revm = { version = "34.0.0", default-features = false }
revm-context-interface = { version = "14.0.0", default-features = false }

# Alloy dependencies
alloy = { version = "1.0.37", features = [
# Alloy dependencies (aligned to reth v1.10.1)
alloy = { version = "1.4.3", features = [
"contract",
"providers",
"provider-http",
"signers",
"reqwest-rustls-tls",
], default-features = false }
# Alloy family versions aligned to 1.0.37 compatibility (reth v1.8.4)
alloy-evm = { version = "0.21.3", default-features = false }
alloy-eips = { version = "1.0.37", default-features = false }
alloy-network = { version = "1.0.37", default-features = false }
alloy-provider = { version = "1.0.37", default-features = false }
alloy-rpc-client = { version = "1.0.37", default-features = false }
alloy-rpc-types = { version = "1.0.37", default-features = false }
alloy-json-rpc = { version = "1.0.37", default-features = false }
alloy-rpc-types-eth = { version = "1.0.37", default-features = false }
alloy-rpc-types-engine = { version = "1.0.37", default-features = false }
alloy-signer = { version = "1.0.37", default-features = false }
alloy-signer-local = { version = "1.0.37", features = ["mnemonic"] }
alloy-primitives = { version = "1.3.1", default-features = false }
alloy-consensus = { version = "1.0.37", default-features = false }
alloy-genesis = { version = "1.0.37", default-features = false }
alloy-rpc-types-txpool = { version = "1.0.37", default-features = false }
alloy-sol-types = { version = "1.3.1", default-features = false }
alloy-evm = { version = "0.26.3", default-features = false }
alloy-eips = { version = "1.4.3", default-features = false }
alloy-network = { version = "1.4.3", default-features = false }
alloy-provider = { version = "1.4.3", default-features = false }
alloy-rpc-client = { version = "1.4.3", default-features = false }
alloy-rpc-types = { version = "1.4.3", default-features = false }
alloy-json-rpc = { version = "1.4.3", default-features = false }
alloy-rpc-types-eth = { version = "1.4.3", default-features = false }
alloy-rpc-types-engine = { version = "1.4.3", default-features = false }
alloy-signer = { version = "1.4.3", default-features = false }
alloy-signer-local = { version = "1.4.3", features = ["mnemonic"] }
alloy-primitives = { version = "1.5.0", default-features = false }
alloy-consensus = { version = "1.4.3", default-features = false }
alloy-genesis = { version = "1.4.3", default-features = false }
alloy-rpc-types-txpool = { version = "1.4.3", default-features = false }
alloy-sol-types = { version = "1.5.0", default-features = false }

revm-inspector = "15.0.0"
revm-inspectors = "0.34.0"

# force newer nybbles for const push_unchecked (needed for Rust 1.92+)
nybbles = "0.4.7"

revm-inspector = { version = "10.0.1" }
# Core dependencies
eyre = "0.6"
tracing = "0.1"
Expand Down
48 changes: 38 additions & 10 deletions bin/ev-reth/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,53 @@ use evolve_ev_reth::{
rpc::txpool::{EvolveTxpoolApiImpl, EvolveTxpoolApiServer},
};
use reth_ethereum_cli::Cli;
use reth_tracing_otlp::layer as otlp_layer;
use reth_tracing_otlp::{OtlpConfig, OtlpProtocol};
use tracing::info;
use tracing_subscriber::{layer::SubscriberExt, util::SubscriberInitExt, EnvFilter};
use url::Url;

use ev_node::{log_startup, EvolveArgs, EvolveChainSpecParser, EvolveNode};

#[global_allocator]
static ALLOC: reth_cli_util::allocator::Allocator = reth_cli_util::allocator::new_allocator();

/// Initialize reth OTLP tracing
fn init_otlp_tracing() {
// Set up tracing subscriber with reth OTLP layer
tracing_subscriber::registry()
/// Builds OTLP config from environment variables.
/// Returns None if OTLP is disabled or endpoint is not configured.
fn otlp_config_from_env() -> Option<OtlpConfig> {
// disabled if OTEL_SDK_DISABLED is set to anything other than "false"
if std::env::var("OTEL_SDK_DISABLED").is_ok_and(|v| v != "false") {
return None;
}
Comment on lines +27 to +30
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The current implementation for checking OTEL_SDK_DISABLED is not fully compliant with the OpenTelemetry specification. The spec states that the SDK should be disabled only if OTEL_SDK_DISABLED is set to true (case-insensitive), and any other value should be ignored (meaning the SDK is not disabled). The current logic disables the SDK for any value other than "false". This should be corrected to only disable for "true".

Suggested change
// disabled if OTEL_SDK_DISABLED is set to anything other than "false"
if std::env::var("OTEL_SDK_DISABLED").is_ok_and(|v| v != "false") {
return None;
}
// disabled if OTEL_SDK_DISABLED is set to "true" (case-insensitive)
if std::env::var("OTEL_SDK_DISABLED").map_or(false, |v| v.eq_ignore_ascii_case("true")) {
return None;
}


let endpoint = std::env::var("OTEL_EXPORTER_OTLP_ENDPOINT").ok()?;
let endpoint_url = Url::parse(&endpoint).ok()?;

let protocol = match std::env::var("OTEL_EXPORTER_OTLP_PROTOCOL")
.unwrap_or_else(|_| "http".to_string())
.as_str()
{
"grpc" => OtlpProtocol::Grpc,
_ => OtlpProtocol::Http,
};

OtlpConfig::new("ev-reth", endpoint_url, protocol, None).ok()
}

/// Initialize tracing with optional OTLP support.
fn init_tracing() {
let registry = tracing_subscriber::registry()
.with(EnvFilter::try_from_default_env().unwrap_or_else(|_| "info".into()))
.with(tracing_subscriber::fmt::layer().with_target(false))
.with(otlp_layer("ev-reth"))
.init();
.with(tracing_subscriber::fmt::layer().with_target(false));

if let Some(config) = otlp_config_from_env() {
if let Ok(otlp_layer) = reth_tracing_otlp::span_layer(config) {
registry.with(otlp_layer).init();
info!("OTLP tracing initialized for service: ev-reth");
return;
}
}

info!("Reth OTLP tracing initialized for service: ev-reth");
registry.init();
}

fn main() {
Expand All @@ -44,7 +72,7 @@ fn main() {

// Initialize OTLP tracing
if std::env::var("OTEL_SDK_DISABLED").as_deref() == Ok("false") {
init_otlp_tracing();
init_tracing();
}
Comment on lines 74 to 76
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

The init_tracing() function is only called if OTEL_SDK_DISABLED is explicitly set to "false". If the environment variable is not set, no tracing will be initialized at all, which is likely not the intended behavior. The init_tracing function itself correctly handles whether to enable OTLP based on environment variables. Therefore, the conditional check in main is redundant and can lead to no tracing being configured. init_tracing() should be called unconditionally.

    init_tracing();


if let Err(err) =
Expand Down
Loading
Loading