Skip to content

Commit f52988d

Browse files
committed
maybe work
1 parent 3d05908 commit f52988d

File tree

7 files changed

+161
-20
lines changed

7 files changed

+161
-20
lines changed

justfile

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ update-submodules:
1919
build_release *ARGS:
2020
cargo build --release --workspace --all-targets {{ARGS}}
2121

22+
build_release_until:
23+
cargo build --release --workspace --all-targets --features "until"
24+
2225
build_docker:
2326
docker build . -f ./docker/timeboost.Dockerfile -t timeboost:latest
2427
docker build . -f ./docker/yapper.Dockerfile -t yapper:latest
@@ -189,38 +192,40 @@ test-all: build_release build-test-utils
189192
--committee-id 0 \
190193
--blocks 1000
191194

192-
test-dyn-comm: build_release build-test-utils
193-
env RUST_LOG=info target/release/run \
195+
test-dyn-comm: build_release_until build-test-utils
196+
env RUST_LOG=sailfish=warn,yapper=error,timeboost=info,info target/release/run \
194197
--verbose \
195198
--timeout 120 \
196199
--spawn "1:anvil --port 8545" \
197200
--run "2:sleep 2" \
198201
--run "3:scripts/deploy-test-contract" \
199202
--spawn "4:target/release/yapper --keyset-file test-configs/c0/committee.toml" \
200-
--spawn "5:target/release/run-committee --configs test-configs/c0/ --committee 0" \
201-
--run "6:target/release/mkconfig -n 6 \
202-
--public-addr '127.0.0.1:9000' \
203-
--internal-addr '127.0.0.1:9003' \
204-
--http-api '127.0.0.1:9004' \
203+
--spawn "5:target/release/run-committee --configs test-configs/c0/ --committee 0 --timeboost target/release/timeboost --until 1000" \
204+
--run "6:target/release/mkconfig -n 3 \
205+
--public-addr 127.0.0.1:9000 \
206+
--internal-addr 127.0.0.1:9003 \
207+
--http-api 127.0.0.1:9004 \
205208
--chain-namespace 10101 \
206-
--parent-rpc-url 'http://127.0.0.1:8545' \
207-
--parent-ws-url 'ws://127.0.0.1:8545' \
209+
--parent-rpc-url http://127.0.0.1:8545 \
210+
--parent-ws-url ws://127.0.0.1:8545 \
208211
--parent-chain-id 31337 \
209212
--parent-ibox-contract "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1" \
210213
--key-manager-contract "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35" \
211-
--timestamp '`just now-plus-20s`' \
212-
--stamp-dir '/tmp' \
213-
--output 'test-configs/c1'" \
214-
--run "7:target/release/register -m 'attend year erase basket blind adapt stove broccoli isolate unveil acquire category' \
214+
--timestamp `just now-plus-20s` \
215+
--stamp-dir /tmp \
216+
--output test-configs/c1" \
217+
--run "7:target/release/register \
215218
-i 0 \
216-
-u 'http://localhost:8545' \
217-
-k '0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35' \
218-
-c 'test-configs/c1/committee.toml'" \
219-
--run "8:pkill -9 yapper && target/release/yapper --keyset-file test-configs/c1/committee.toml" \
220-
target/release/run-committee --configs test-configs/c1 \
219+
-u http://localhost:8545 \
220+
-k 0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35 \
221+
-c test-configs/c1/committee.toml" \
222+
--run "8:sleep 5" \
223+
--spawn "9:target/release/yapper --keyset-file test-configs/c1/committee.toml" \
224+
target/release/run-committee -- --configs test-configs/c1/ \
221225
--committee 1 \
226+
--timeboost target/release/timeboost \
222227
--until 800 \
223-
--required-decrypt-rounds 3 && rm -rf test-configs/c1
228+
--required-decrypt-rounds 3
224229

225230

226231
# portable calculation of now() + 20s in "%Y-%m-%dT%H:%M:%SZ" format

test-configs/c1/committee.toml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
effective_timestamp = "2025-09-12T20:05:52Z"
2+
3+
[[members]]
4+
signing_key = "dQST7kJpV3RXqNMyKUA6eMW5HiVLAVK4AFwX5nQJbaka"
5+
dh_key = "JBm1FZhcGcZE4bUVDrRCsHZYcz78BcjgdKejknytQvnH"
6+
dkg_enc_key = "6ZH8nCCCmX5UDMjcR18oNz5YTUixDQeVqXVoYRqMxGHLkoNo95Gw27PWD323Kf7Fqs"
7+
public_address = "127.0.0.1:9000"
8+
http_api = "127.0.0.1:9004"
9+
internal_api = "127.0.0.1:9003"
10+
11+
[[members]]
12+
signing_key = "gWpDFTTBYN8u5JDz83PYVDakQTMzPPNNonnkt4FRSJD3"
13+
dh_key = "6fBHLbP8fKjk2tYgqaMs3GQTiHQSPh1uZ9d3J4ZYM9gC"
14+
dkg_enc_key = "73sU1acMiGsiJu9pVY8yQag7DvRcvtYRkATjPCv485Mwr6FYimFVLRUsz9Papy745f"
15+
public_address = "127.0.0.1:9010"
16+
http_api = "127.0.0.1:9014"
17+
internal_api = "127.0.0.1:9013"
18+
19+
[[members]]
20+
signing_key = "c24KQW7jK7d8NdKYatGn6cZDSoMro5XsxKoBkkLmSUwN"
21+
dh_key = "Fer6ptfw1MgBDxCuLn54Xo7V62iEhZZyQ3JTfyyGMgM9"
22+
dkg_enc_key = "5vacdPGGmQSfS474Fy5dizxoE1GHLW4W48FBx7UfVTtERjtPhFN7CEBT23y6uBHiew"
23+
public_address = "127.0.0.1:9020"
24+
http_api = "127.0.0.1:9024"
25+
internal_api = "127.0.0.1:9023"

test-configs/c1/node_0.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
stamp = "/tmp/timeboost.0.stamp"
2+
3+
[net.public]
4+
address = "127.0.0.1:9000"
5+
http_api = "127.0.0.1:9004"
6+
7+
[net.internal]
8+
address = "127.0.0.1:9003"
9+
10+
[keys.signing]
11+
secret = "HwhEANTEwUJxYwtGXWqHp7YSubxceEc1kXLBPyVkBryv"
12+
public = "dQST7kJpV3RXqNMyKUA6eMW5HiVLAVK4AFwX5nQJbaka"
13+
14+
[keys.dh]
15+
secret = "3pz6B8owd4eFZoCmtt8FvJkUKHURTSF4QWw7VVmmeBzW"
16+
public = "JBm1FZhcGcZE4bUVDrRCsHZYcz78BcjgdKejknytQvnH"
17+
18+
[keys.dkg]
19+
secret = "6rACFLkLskjcCArUeEdUz4UBuU39BnzJAGHuRLJG6dg3"
20+
public = "6ZH8nCCCmX5UDMjcR18oNz5YTUixDQeVqXVoYRqMxGHLkoNo95Gw27PWD323Kf7Fqs"
21+
22+
[chain]
23+
namespace = 10101
24+
25+
[chain.parent]
26+
id = 31337
27+
rpc_url = "http://127.0.0.1:8545/"
28+
ws_url = "ws://127.0.0.1:8545/"
29+
ibox_contract = "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1"
30+
block_tag = "finalized"
31+
key_manager_contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"
32+
33+
[espresso]
34+
base_url = "https://query.decaf.testnet.espresso.network/v1/"
35+
websockets_base_url = "wss://query.decaf.testnet.espresso.network/v1/"

test-configs/c1/node_1.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
stamp = "/tmp/timeboost.1.stamp"
2+
3+
[net.public]
4+
address = "127.0.0.1:9010"
5+
http_api = "127.0.0.1:9014"
6+
7+
[net.internal]
8+
address = "127.0.0.1:9013"
9+
10+
[keys.signing]
11+
secret = "4JiTfGM5cb7RLDVfNb89nZH7ZeYWEy6UfgukCJe1uJ2s"
12+
public = "gWpDFTTBYN8u5JDz83PYVDakQTMzPPNNonnkt4FRSJD3"
13+
14+
[keys.dh]
15+
secret = "FZGiSAFQaMvVJ7zCEFmQu5cgRYKwQJdCQqSrw8SYRhHJ"
16+
public = "6fBHLbP8fKjk2tYgqaMs3GQTiHQSPh1uZ9d3J4ZYM9gC"
17+
18+
[keys.dkg]
19+
secret = "DegFS9EvP9pz7rYX4JsSJ4aLRSq3fBkdy8U6LqD3eQqt"
20+
public = "73sU1acMiGsiJu9pVY8yQag7DvRcvtYRkATjPCv485Mwr6FYimFVLRUsz9Papy745f"
21+
22+
[chain]
23+
namespace = 10101
24+
25+
[chain.parent]
26+
id = 31337
27+
rpc_url = "http://127.0.0.1:8545/"
28+
ws_url = "ws://127.0.0.1:8545/"
29+
ibox_contract = "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1"
30+
block_tag = "finalized"
31+
key_manager_contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"
32+
33+
[espresso]
34+
base_url = "https://query.decaf.testnet.espresso.network/v1/"
35+
websockets_base_url = "wss://query.decaf.testnet.espresso.network/v1/"

test-configs/c1/node_2.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
stamp = "/tmp/timeboost.2.stamp"
2+
3+
[net.public]
4+
address = "127.0.0.1:9020"
5+
http_api = "127.0.0.1:9024"
6+
7+
[net.internal]
8+
address = "127.0.0.1:9023"
9+
10+
[keys.signing]
11+
secret = "9j28e6HiGxdShGwNLH2emYXVaE7mNdBmhikyknSdtTqS"
12+
public = "c24KQW7jK7d8NdKYatGn6cZDSoMro5XsxKoBkkLmSUwN"
13+
14+
[keys.dh]
15+
secret = "7ecZnC9dPzs9pZ6uqCSkEiLr44GqdFgoWCqG5jgD6mJ8"
16+
public = "Fer6ptfw1MgBDxCuLn54Xo7V62iEhZZyQ3JTfyyGMgM9"
17+
18+
[keys.dkg]
19+
secret = "FwzsYVwZRnFMNs11bbMKoVdeQPmMM24dSobxFrscmWnu"
20+
public = "5vacdPGGmQSfS474Fy5dizxoE1GHLW4W48FBx7UfVTtERjtPhFN7CEBT23y6uBHiew"
21+
22+
[chain]
23+
namespace = 10101
24+
25+
[chain.parent]
26+
id = 31337
27+
rpc_url = "http://127.0.0.1:8545/"
28+
ws_url = "ws://127.0.0.1:8545/"
29+
ibox_contract = "0xa0f3a1a4e2b2bcb7b48c8527c28098f207572ec1"
30+
block_tag = "finalized"
31+
key_manager_contract = "0x2bbf15bc655c4cc157b769cfcb1ea9924b9e1a35"
32+
33+
[espresso]
34+
base_url = "https://query.decaf.testnet.espresso.network/v1/"
35+
websockets_base_url = "wss://query.decaf.testnet.espresso.network/v1/"

test-utils/src/binaries/run-committee.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ async fn main() -> Result<()> {
6060
.arg("--ignore-stamp");
6161
if let Some(until) = args.until {
6262
cmd.arg("--until").arg(until.to_string());
63+
cmd.arg("--committee")
64+
.arg(format!("{}/committee.toml", args.configs.to_str().unwrap()));
6365
}
6466
if let Some(r) = args.required_decrypt_rounds {
6567
cmd.arg("--required-decrypt-rounds").arg(r.to_string());

timeboost-contract/src/binaries/register.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ use url::Url;
1515

1616
#[derive(Clone, Debug, Parser)]
1717
struct Args {
18-
#[clap(short, long)]
18+
#[clap(
19+
short,
20+
long,
21+
default_value = "attend year erase basket blind adapt stove broccoli isolate unveil acquire category"
22+
)]
1923
mnemonic: String,
2024

2125
#[clap(short, long)]

0 commit comments

Comments
 (0)