Skip to content

Commit 06ace34

Browse files
committed
Merge remote-tracking branch 'origin/main' into ax/step1
2 parents d00a976 + 088a13f commit 06ace34

File tree

22 files changed

+649
-540
lines changed

22 files changed

+649
-540
lines changed

.github/workflows/build-and-test.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1717
with:
1818
submodules: recursive
1919
fetch-depth: 0
@@ -50,7 +50,7 @@ jobs:
5050
test:
5151
runs-on: ubuntu-latest
5252
steps:
53-
- uses: actions/checkout@v4
53+
- uses: actions/checkout@v5
5454
with:
5555
submodules: recursive
5656
fetch-depth: 0
@@ -74,7 +74,7 @@ jobs:
7474
lint:
7575
runs-on: ubuntu-latest
7676
steps:
77-
- uses: actions/checkout@v4
77+
- uses: actions/checkout@v5
7878
with:
7979
submodules: recursive
8080
fetch-depth: 0
@@ -99,7 +99,7 @@ jobs:
9999
build-docker:
100100
runs-on: ubuntu-latest
101101
steps:
102-
- uses: actions/checkout@v4
102+
- uses: actions/checkout@v5
103103
with:
104104
submodules: recursive
105105
fetch-depth: 0
@@ -116,7 +116,7 @@ jobs:
116116
runs-on: ubuntu-latest
117117
timeout-minutes: 25
118118
steps:
119-
- uses: actions/checkout@v4
119+
- uses: actions/checkout@v5
120120
with:
121121
submodules: recursive
122122
fetch-depth: 0

.github/workflows/push-docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
outputs:
1313
tag: ${{ steps.set-tag.outputs.tag }}
1414
steps:
15-
- uses: actions/checkout@v4
15+
- uses: actions/checkout@v5
1616
with:
1717
submodules: recursive
1818
fetch-depth: 0

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ __pycache__/
3535

3636
# Rust bindings for smart contracts
3737
timeboost-contract/src/bindings
38+
foundry.lock
3839

3940
# env var files that may contains secrets
4041
.env*

Cargo.lock

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

justfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ check-individually:
3636
cargo check -p $pkg || exit 1; \
3737
done
3838

39-
fmt:
40-
cargo +nightly fmt --all
39+
fmt *ARGS='--all':
40+
cargo +nightly fmt {{ARGS}}
4141

4242
fmt_check:
4343
cargo +nightly fmt --check

sailfish-consensus/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ where
157157
keypair,
158158
state: State::Startup,
159159
clock: ConsensusTime(Default::default()),
160-
nodes: NodeInfo::new(&committee),
160+
nodes: NodeInfo::new(&committee, committee.quorum_size()),
161161
dag: Dag::new(committee.size()),
162162
round: RoundNumber::genesis(),
163163
committed_round: RoundNumber::genesis(),

sailfish-types/src/nodeinfo.rs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use std::num::NonZeroUsize;
2+
13
use multisig::{Committee, PublicKey};
24

35
#[derive(Debug)]
@@ -7,10 +9,10 @@ pub struct NodeInfo<T> {
79
}
810

911
impl<T: Default + PartialOrd> NodeInfo<T> {
10-
pub fn new(c: &Committee) -> Self {
12+
pub fn new(c: &Committee, q: NonZeroUsize) -> Self {
1113
Self {
1214
nodes: c.parties().map(|k| (*k, T::default())).collect(),
13-
quorum: c.quorum_size().get(),
15+
quorum: q.get(),
1416
}
1517
}
1618

scripts/run-timeboost-demo

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,10 @@ while [[ $# -gt 0 ]]; do
3737
rounds="$2"
3838
shift 2
3939
;;
40+
-t|--tps)
41+
tps="$2"
42+
shift 2
43+
;;
4044
--nitro)
4145
nitro_enabled=true
4246
shift

tests/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,15 @@ rust-version.workspace = true
88
[dependencies]
99
alloy = { workspace = true }
1010
async-trait = { workspace = true }
11+
blake3 = { workspace = true }
1112
bytes = { workspace = true }
1213
cliquenet = { path = "../cliquenet", features = ["turmoil"] }
1314
committable = { workspace = true }
1415
crossbeam-queue = { workspace = true }
1516
futures = { workspace = true }
1617
metrics = { path = "../metrics" }
1718
multisig = { path = "../multisig" }
19+
parking_lot = { workspace = true }
1820
portpicker = { workspace = true }
1921
rand = { workspace = true }
2022
sailfish = { path = "../sailfish", features = ["test"] }

tests/src/tests/timeboost.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ where
118118
.sign_keypair(kpair)
119119
.dh_keypair(xpair)
120120
.address(pa)
121+
.recover(recover_index.map(|r| r == i).unwrap_or(false))
121122
.committee(produce_committee.clone())
122123
.build();
123124
enc_keys.push(enc_key);

0 commit comments

Comments
 (0)