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
2 changes: 0 additions & 2 deletions Cargo.lock

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

10 changes: 8 additions & 2 deletions bin/ethlambda/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ use serde::Deserialize;
use tracing::{error, info, warn};
use tracing_subscriber::{EnvFilter, Layer, Registry, layer::SubscriberExt};

use ethlambda_blockchain::{BlockChain, BlockChainConfig, SyncStatusController};
use ethlambda_blockchain::{BlockChain, BlockChainConfig, EventBus, SyncStatusController};
use ethlambda_rpc::RpcConfig;
use ethlambda_storage::{
MAX_RESUMABLE_DB_STATE_AGE, StorageBackend, Store, backend::RocksDBBackend,
Expand Down Expand Up @@ -235,6 +235,12 @@ async fn main() -> eyre::Result<()> {
// metric's startup value.
let sync_status = SyncStatusController::default();

// Chain-event bus: the blockchain actor is the sole publisher. No consumer
// subscribes yet — the RPC SSE endpoint (follow-up PR) will attach here;
// until then the receiver-count guard in `emit` makes every emission a
// no-op.
let events = EventBus::default();

let blockchain_config = BlockChainConfig {
aggregator: aggregator.clone(),
sync_status_controller: sync_status.clone(),
Expand All @@ -247,7 +253,7 @@ async fn main() -> eyre::Result<()> {
},
};

let blockchain = BlockChain::spawn(store.clone(), validator_keys, blockchain_config);
let blockchain = BlockChain::spawn(store.clone(), validator_keys, blockchain_config, events);

let built = build_swarm(SwarmConfig {
node_key: node_p2p_key,
Expand Down
2 changes: 0 additions & 2 deletions crates/blockchain/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ tracing.workspace = true
hex.workspace = true

[dev-dependencies]
serde = { workspace = true }
serde_json = { workspace = true }
hex = { workspace = true }
libssz.workspace = true
libssz-types.workspace = true
Expand Down
Loading