Skip to content
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
35 changes: 17 additions & 18 deletions Cargo.lock

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

7 changes: 3 additions & 4 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "signet"
version = "0.4.0"
version = "1.0.0-rc.0"
edition = "2024"
rust-version = "1.88"
authors = ["init4"]
Expand All @@ -12,11 +12,10 @@ repository = "https://github.com/init4tech/signet-node"
init4-bin-base = { version = "0.17.0", features = ["alloy"], default-features = false }

# Node Components
signet-node = { git = "https://github.com/init4tech/node-components", tag = "v0.14.1" }
signet-node-config = { git = "https://github.com/init4tech/node-components", tag = "v0.14.1" }
signet-node = { git = "https://github.com/init4tech/node-components", tag = "v0.14.2" }
signet-node-config = { git = "https://github.com/init4tech/node-components", tag = "v0.14.2" }

reth = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
reth-db = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }
reth-node-ethereum = { git = "https://github.com/paradigmxyz/reth", tag = "v1.9.1" }

eyre = "0.6.12"
Expand Down
18 changes: 8 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
use openssl as _; // silences clippy warning

use init4_bin_base::utils::from_env::FromEnv;
use reth::providers::{ProviderFactory, StateProviderFactory, providers::BlockchainProvider};
use signet_node::SignetNode;
use reth::providers::ProviderFactory;
use signet_node::SignetNodeBuilder;
use signet_node_config::SignetNodeConfig;
use std::sync::{Arc, LazyLock};

Expand All @@ -27,8 +27,6 @@ pub fn node_from_env() -> eyre::Result<()> {
/// State the Signet node, using the provided config.
pub fn node(config: SignetNodeConfig) -> eyre::Result<()> {
reth::cli::Cli::parse_args().run(|builder, _| async move {
let db_args = reth_db::mdbx::DatabaseArguments::default();

let prune_config = builder.config().prune_config();

let handle = builder
Expand All @@ -40,18 +38,18 @@ pub fn node(config: SignetNodeConfig) -> eyre::Result<()> {
let mut factory = ProviderFactory::new_with_database_path(
config.database_path(),
chain_spec,
db_args,
Default::default(),
config.static_file_rw()?,
)?;
if let Some(prune_config) = prune_config {
factory = factory.with_prune_modes(prune_config.segments);
}

// This allows the node to look up contract status.
let boxed_factory: Box<dyn StateProviderFactory> =
Box::new(BlockchainProvider::new(factory.clone())?);

Ok(SignetNode::new(ctx, config, factory.clone(), boxed_factory, CLIENT.clone())?
Ok(SignetNodeBuilder::new(config)
.with_factory(factory.clone())
.with_ctx(ctx)
.with_client(CLIENT.clone())
.build()?
.0
.start())
})
Expand Down