Skip to content

Commit 84cfdec

Browse files
spike
1 parent 0d9f99f commit 84cfdec

4 files changed

Lines changed: 52 additions & 48 deletions

File tree

Cargo.lock

Lines changed: 16 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -20,20 +20,20 @@ license = "MIT OR Apache-2.0"
2020
alto-chain = { version = "2026.3.0", path = "chain" }
2121
alto-client = { version = "2026.3.0", path = "client" }
2222
alto-types = { version = "2026.3.0", path = "types" }
23-
commonware-broadcast = "2026.3.0"
24-
commonware-codec = "2026.3.0"
25-
commonware-consensus = "2026.3.0"
26-
commonware-cryptography = "2026.3.0"
27-
commonware-deployer = { version = "2026.3.0", default-features = false }
28-
commonware-macros = "2026.3.0"
29-
commonware-p2p = "2026.3.0"
30-
commonware-resolver = "2026.3.0"
31-
commonware-runtime = "2026.3.0"
32-
commonware-storage = "2026.3.0"
33-
commonware-stream = "2026.3.0"
34-
commonware-utils = "2026.3.0"
35-
commonware-math = "2026.3.0"
36-
commonware-parallel = "2026.3.0"
23+
commonware-broadcast = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
24+
commonware-codec = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
25+
commonware-consensus = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
26+
commonware-cryptography = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
27+
commonware-deployer = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c", default-features = false }
28+
commonware-macros = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
29+
commonware-p2p = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
30+
commonware-resolver = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
31+
commonware-runtime = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
32+
commonware-storage = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
33+
commonware-stream = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
34+
commonware-utils = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
35+
commonware-math = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
36+
commonware-parallel = { git = "https://github.com/commonwarexyz/monorepo.git", rev = "f4e49d2d8ce81b1ff594adb436e7f7560b23703c" }
3737
thiserror = "2.0.12"
3838
bytes = "1.7.1"
3939
rand = "0.8.5"

chain/src/engine.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use commonware_consensus::{
1111
resolver::handler,
1212
standard::{Deferred, Standard},
1313
},
14-
simplex::{self, elector::Random, Engine as Consensus},
14+
simplex::{self, config::ForwardingPolicy, elector::Random, Engine as Consensus},
1515
types::{Epoch, FixedEpocher, ViewDelta},
1616
Reporters,
1717
};
@@ -339,6 +339,7 @@ where
339339
page_cache,
340340
elector: Random,
341341
strategy: cfg.strategy,
342+
forwarding: ForwardingPolicy::Disabled,
342343
},
343344
);
344345

follower/src/archive.rs

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,19 @@ impl<E: BufferPooler + Storage + Metrics + Clock> marshal::store::Certificates f
237237
Self::Prunable(a) => Archive::last_index(a).map(Height::new),
238238
}
239239
}
240+
241+
fn ranges_from(&self, from: Height) -> impl Iterator<Item = (Height, Height)> {
242+
match self {
243+
Self::Immutable(a) => Archive::ranges_from(a, from.get())
244+
.map(|(s, e)| (Height::new(s), Height::new(e)))
245+
.collect::<Vec<_>>()
246+
.into_iter(),
247+
Self::Prunable(a) => Archive::ranges_from(a, from.get())
248+
.map(|(s, e)| (Height::new(s), Height::new(e)))
249+
.collect::<Vec<_>>()
250+
.into_iter(),
251+
}
252+
}
240253
}
241254

242255
/// Wrapper over [immutable::Archive] and [prunable::Archive] for finalized
@@ -301,4 +314,11 @@ impl<E: BufferPooler + Storage + Metrics + Clock> marshal::store::Blocks for Blo
301314
};
302315
(a.map(Height::new), b.map(Height::new))
303316
}
317+
318+
fn last_index(&self) -> Option<Height> {
319+
match self {
320+
Self::Immutable(a) => Archive::last_index(a).map(Height::new),
321+
Self::Prunable(a) => Archive::last_index(a).map(Height::new),
322+
}
323+
}
304324
}

0 commit comments

Comments
 (0)