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
98 changes: 44 additions & 54 deletions Cargo.lock

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

28 changes: 14 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,20 @@ license = "MIT OR Apache-2.0"
alto-chain = { version = "2026.3.0", path = "chain" }
alto-client = { version = "2026.3.0", path = "client" }
alto-types = { version = "2026.3.0", path = "types" }
commonware-broadcast = "2026.3.0"
commonware-codec = "2026.3.0"
commonware-consensus = "2026.3.0"
commonware-cryptography = "2026.3.0"
commonware-deployer = { version = "2026.3.0", default-features = false }
commonware-macros = "2026.3.0"
commonware-p2p = "2026.3.0"
commonware-resolver = "2026.3.0"
commonware-runtime = "2026.3.0"
commonware-storage = "2026.3.0"
commonware-stream = "2026.3.0"
commonware-utils = "2026.3.0"
commonware-math = "2026.3.0"
commonware-parallel = "2026.3.0"
commonware-broadcast = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-codec = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-consensus = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-cryptography = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-deployer = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47", default-features = false }
commonware-macros = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-p2p = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-resolver = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-runtime = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-storage = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-stream = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-utils = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-math = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
commonware-parallel = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "227fdc8a9edfa720aa14586fb112cde8938d9b47" }
thiserror = "2.0.12"
bytes = "1.7.1"
rand = "0.8.5"
Expand Down
5 changes: 3 additions & 2 deletions chain/src/application.rs
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,7 @@ mod tests {
struct NoopBuffer;

impl Buffer<Standard<Block>> for NoopBuffer {
type PublicKey = alto_types::PublicKey;
type CachedBlock = Block;

async fn find_by_digest(&self, _: sha256::Digest) -> Option<Self::CachedBlock> {
Expand Down Expand Up @@ -221,7 +222,7 @@ mod tests {

async fn finalized(&self, _: sha256::Digest) {}

async fn proposed(&self, _: Round, _: Block) {}
async fn send(&self, _: Round, _: Block, _: commonware_p2p::Recipients<Self::PublicKey>) {}
}

#[derive(Clone)]
Expand Down Expand Up @@ -357,7 +358,7 @@ mod tests {
mailbox: &Mailbox<Scheme, Standard<Block>>,
block: &Block,
) {
mailbox.verified(block.context.round, block.clone()).await;
assert!(mailbox.verified(block.context.round, block.clone()).await);
loop {
if mailbox.get_block(&block.digest()).await.is_some() {
break;
Expand Down
4 changes: 2 additions & 2 deletions chain/src/engine.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use commonware_consensus::{
resolver::handler,
standard::{Deferred, Standard},
},
simplex::{self, elector::Random, Engine as Consensus},
simplex::{self, config::ForwardingPolicy, elector::Random, Engine as Consensus},
types::{Epoch, FixedEpocher, ViewDelta},
Reporters,
};
Expand Down Expand Up @@ -339,6 +339,7 @@ where
page_cache,
elector: Random,
strategy: cfg.strategy,
forwarding: ForwardingPolicy::Disabled,
},
);

Expand Down Expand Up @@ -384,7 +385,6 @@ where
spawn_cell!(
self.context,
self.run(pending, recovered, resolver, broadcast, marshal)
.await
)
}

Expand Down
8 changes: 3 additions & 5 deletions chain/src/indexer/backfiller/consumer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use commonware_cryptography::sha256::Digest;
use commonware_macros::select_loop;
use commonware_runtime::{
spawn_cell,
telemetry::metrics::status::{self, CounterExt},
telemetry::metrics::{status, MetricsExt as _},
Clock, ContextCell, Handle, Metrics, Spawner, Storage,
};
use commonware_storage::queue;
Expand Down Expand Up @@ -53,11 +53,9 @@ impl<E: Spawner + Clock + Storage + Metrics, C: Client> Consumer<E, C> {
max_active: NonZeroUsize,
retry: Duration,
) -> Self {
let upload_results = status::Counter::default();
context.register(
let upload_results = context.family(
"uploads",
"Total number of finalized block upload attempt outcomes by status",
upload_results.clone(),
);
let (writer, reader) = backfiller;
Self {
Expand All @@ -76,7 +74,7 @@ impl<E: Spawner + Clock + Storage + Metrics, C: Client> Consumer<E, C> {

/// Start the consumer loop that reads from the queue and uploads blocks.
pub fn start(mut self) -> Handle<()> {
spawn_cell!(self.context, self.run().await)
spawn_cell!(self.context, self.run())
}

async fn run(mut self) {
Expand Down
Loading
Loading