Add block explorer binary

This commit is contained in:
danielsanchezq 2023-11-07 18:38:49 +01:00
parent 90e2210bce
commit 0f48c86007
4 changed files with 31 additions and 1 deletions

View File

@ -20,6 +20,7 @@ members = [
"nomos-utils",
"nodes/nomos-node",
"nodes/mixnode",
"nodes/explorer",
"simulations",
"consensus/carnot-engine",
"tests",

13
nodes/explorer/Cargo.toml Normal file
View File

@ -0,0 +1,13 @@
[package]
name = "explorer"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
overwatch-rs = { git = "https://github.com/logos-co/Overwatch", rev = "2f70806", features = ["derive"] }
nomos-log = { path = "../../nomos-services/log" }
nomos-storage = { path = "../../nomos-services/storage", features = ["sled"] }
nomos-node = { path = "../nomos-node" }
tracing = "0.1"

View File

@ -0,0 +1,16 @@
use overwatch_rs::services::handle::ServiceHandle;
use overwatch_rs::Services;
use nomos_log::Logger;
use nomos_node::Wire;
use nomos_storage::{backends::sled::SledBackend, StorageService};
#[derive(Services)]
struct Explorer {
log: ServiceHandle<Logger>,
storage: ServiceHandle<StorageService<SledBackend<Wire>>>,
}
fn main() {
println!("Hello, world!");
}

View File

@ -16,7 +16,7 @@ futures = "0.3"
http = "0.2.9"
hex = "0.4.3"
overwatch-rs = { git = "https://github.com/logos-co/Overwatch", rev = "2f70806" }
overwatch-derive = { git = "https://github.com/logos-co/Overwatch", rev = "ac28d01" }
overwatch-derive = { git = "https://github.com/logos-co/Overwatch", rev = "2f70806" }
tracing = "0.1"
multiaddr = "0.18"
nomos-core = { path = "../../nomos-core" }