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
88 changes: 73 additions & 15 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 = "0.0.19", path = "chain" }
alto-client = { version = "0.0.19", path = "client" }
alto-types = { version = "0.0.19", path = "types" }
commonware-broadcast = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-codec = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-consensus = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-cryptography = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-deployer = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e", default-features = false }
commonware-macros = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-p2p = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-resolver = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-runtime = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-storage = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-stream = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-utils = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-math = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-parallel = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "16e98b5247c513361ef791d1556a01e1dfd4eb9e" }
commonware-broadcast = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-codec = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-consensus = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-cryptography = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit", features = ["sha2-asm"] }
commonware-deployer = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit", default-features = false }
commonware-macros = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-p2p = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-resolver = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-runtime = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-storage = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-stream = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-utils = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-math = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
commonware-parallel = { git = "https://github.com/commonwarexyz/monorepo.git", branch = "cl/marshal-minimmit" }
thiserror = "2.0.12"
bytes = "1.7.1"
rand = "0.8.5"
Expand Down
15 changes: 9 additions & 6 deletions chain/src/application.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
use alto_types::{Block, Context, Scheme, EPOCH};
use commonware_consensus::{
marshal::{ingress::mailbox::AncestorStream, Update},
marshal::{
ancestry::{AncestorStream, BlockProvider},
Update,
},
types::{Height, Round, View},
Heightable, Reporter,
};
Expand Down Expand Up @@ -55,10 +58,10 @@ where
self.genesis.as_ref().clone()
}

async fn propose(
async fn propose<A: BlockProvider<Block = Self::Block>>(
&mut self,
(runtime_context, context): (E, Self::Context),
mut ancestry: AncestorStream<Self::SigningScheme, Self::Block>,
mut ancestry: AncestorStream<A, Self::Block>,
) -> Option<Self::Block> {
let parent = ancestry.next().await?;

Expand All @@ -81,10 +84,10 @@ impl<E> commonware_consensus::VerifyingApplication<E> for Application
where
E: Rng + Spawner + Metrics + Clock,
{
async fn verify(
async fn verify<A: BlockProvider<Block = Self::Block>>(
&mut self,
(runtime_context, _): (E, Context),
mut ancestry: AncestorStream<Self::SigningScheme, Self::Block>,
mut ancestry: AncestorStream<A, Self::Block>,
) -> bool {
let Some(block) = ancestry.next().await else {
return false;
Expand All @@ -102,7 +105,7 @@ where
return false;
}

// The height and digest invariants are enforced in `Marshaled`:
// The height and digest invariants are enforced in the marshal wrapper:
// - The block height must be one greater than the parent's height.
// - The block's parent digest must match the parent's digest.

Expand Down
Loading
Loading