Skip to content

Commit

Permalink
start signature_collector and implement it for the randao reveal
Browse files Browse the repository at this point in the history
  • Loading branch information
dknopik committed Dec 17, 2024
1 parent a097931 commit e682c66
Show file tree
Hide file tree
Showing 12 changed files with 430 additions and 106 deletions.
98 changes: 63 additions & 35 deletions Cargo.lock

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

2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
members = [
"anchor",
"anchor/client",
"anchor/common/signature_collector",
"anchor/common/ssv_types",
"anchor/common/version",
"anchor/http_api",
Expand All @@ -26,6 +27,7 @@ network = { path = "anchor/network" }
version = { path = "anchor/common/version" }
processor = { path = "anchor/processor" }
anchor_validator_store = { path = "anchor/validator_store" }
signature_collector = { path = "anchor/common/signature_collector" }
ssv_types = { path = "anchor/common/ssv_types" }
lighthouse_network = { git = "https://github.com/dknopik/lighthouse", branch = "modularize-validator-store" }
task_executor = { git = "https://github.com/dknopik/lighthouse", branch = "modularize-validator-store", default-features = false, features = [ "tracing", ] }
Expand Down
1 change: 1 addition & 0 deletions anchor/client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ processor = { workspace = true }
sensitive_url = { workspace = true }
serde = { workspace = true }
slot_clock = { workspace = true }
ssv_types = { workspace = true }
strum = { workspace = true }
task_executor = { workspace = true }
tokio = { workspace = true }
Expand Down
10 changes: 8 additions & 2 deletions anchor/client/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ use network::Network;
use parking_lot::RwLock;
use sensitive_url::SensitiveUrl;
use slot_clock::{SlotClock, SystemTimeSlotClock};
use ssv_types::OperatorId;
use std::fs::File;
use std::io::Read;
use std::net::SocketAddr;
Expand Down Expand Up @@ -243,7 +244,7 @@ impl Client {
);

// Perform some potentially long-running initialization tasks.
let (genesis_time, _genesis_validators_root) = tokio::select! {
let (genesis_time, genesis_validators_root) = tokio::select! {
tuple = init_from_beacon_node(&beacon_nodes, &proposer_nodes) => tuple?,
() = executor.exit() => return Err("Shutting down".to_string())
};
Expand All @@ -263,7 +264,12 @@ impl Client {
let proposer_nodes = Arc::new(proposer_nodes);
start_fallback_updater_service(executor.clone(), proposer_nodes.clone())?;

let validator_store = Arc::new(AnchorValidatorStore::new(processor_senders));
let validator_store = Arc::new(AnchorValidatorStore::new(
processor_senders,
spec.clone(),
genesis_validators_root,
OperatorId(123),
));

let duties_service = Arc::new(
DutiesServiceBuilder::new()
Expand Down
12 changes: 12 additions & 0 deletions anchor/common/signature_collector/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[package]
name = "signature_collector"
version = "0.1.0"
edition = { workspace = true }
authors = ["Sigma Prime <contact@sigmaprime.io>"]

[dependencies]
processor = { workspace = true }
ssv_types = { workspace = true }
tokio = { workspace = true, features = ["sync"] }
tracing = { workspace = true }
types = { workspace = true }
Loading

0 comments on commit e682c66

Please sign in to comment.