Skip to content

Commit 7f68e72

Browse files
Hotshot confirmations Nitro-Timeboost CI (#476)
* log error if we cant connect to nitro node, delayed inbox cleanup * add submodule for test node * bring up test node in background * update to latest commit * debugging * more testing * more testing * more logging * make debug level * print docker status * dont use espresso dev node, send to decaf * remove debugging * update submodule * try docker fix * fix * print out docker logs * fix * update * bind to all interfaces * update test-node * use release * address comment * fixes for config * Update timeboost/src/forwarder/nitro_forwarder.rs Co-authored-by: Toralf Wittner <[email protected]> * latest * only display logs on failure --------- Co-authored-by: Toralf Wittner <[email protected]>
1 parent 267f06b commit 7f68e72

File tree

13 files changed

+35
-34
lines changed

13 files changed

+35
-34
lines changed

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

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,22 +180,23 @@ jobs:
180180
run: rustup component add --toolchain nightly rustfmt
181181
- name: Install Foundry
182182
uses: foundry-rs/foundry-toolchain@v1
183-
- name: Clone Espresso Testnode Repository
184-
run: |
185-
git clone --recursive https://github.com/EspressoSystems/decentralized-timeboost-nitro-testnode.git
186183
- name: Run Test Node with Timeboost
187184
run: |
188-
cd decentralized-timeboost-nitro-testnode
189-
chmod +x test-node.bash
190-
./test-node.bash \
185+
./test-node/test-node.bash \
191186
--build-dev-nitro \
192187
--batchposters 0 \
193188
--redundantsequencers 1 \
194189
--decentralized-timeboost \
195190
--init &
196-
cd ..
197191
- name: Run test timeboost with nitro sequencer
198192
run: just run_demo --ignore-stamp -c test-configs/nitro-ci-committee --rounds 10000 --yapper --nitro http://localhost:8547
199193
- name: Verify sequencer blocks
200194
run: |
201195
RUST_LOG=info just verify_blocks
196+
- name: Docker Logs Sequencer 1
197+
if: failure()
198+
run: docker logs test-node-sequencer-1
199+
- name: Docker Logs Sequencer 2
200+
if: failure()
201+
run: docker logs test-node-sequencer_b-1
202+

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44
[submodule "contracts/lib/openzeppelin-contracts-upgradeable"]
55
path = contracts/lib/openzeppelin-contracts-upgradeable
66
url = https://github.com/OpenZeppelin/openzeppelin-contracts-upgradeable
7+
[submodule "test-node"]
8+
path = test-node
9+
url = https://github.com/EspressoSystems/decentralized-timeboost-nitro-testnode

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ mkconfig_docker DATETIME *ARGS:
119119
mkconfig_nitro DATETIME *ARGS:
120120
cargo run --bin mkconfig -- -n 2 \
121121
--public-addr "127.0.0.1:8000" \
122-
--internal-addr "127.0.0.1:8003" \
122+
--internal-addr "0.0.0.0:8003" \
123123
--http-api "127.0.0.1:8004" \
124124
--nitro-addr "localhost:55000" \
125125
--chain-namespace 412346 \

scripts/run-timeboost-demo

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ fi
101101
RUST_LOG=${RUST_LOG:-}
102102

103103
if [ -z "$RUST_LOG" ]; then
104-
RUST_LOG="sailfish=info,timeboost=info,sailfish_consensus=warn,cliquenet=warn,sailfish_rbc=info"
104+
RUST_LOG="sailfish=info,timeboost=info,sailfish_consensus=warn,cliquenet=warn,sailfish_rbc=info,robusta=debug"
105105
fi
106106

107107
cmd=("test-contract-deploy" "--keep-anvil")

scripts/test-contract-deploy

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,14 +77,14 @@ sleep 1
7777
cast send --value 1ether --private-key "$FAUCET_PRIVATE_KEY" "$MANAGER_ADDRESS"
7878

7979
# Run the deploy command
80-
RUST_LOG=info cargo run --bin deploy -- -m "$MANAGER_MNEMONIC" -i "$MANAGER_ACCOUNT_INDEX" -u "$URL" -o "$DEPLOYMENT_FILE"
80+
RUST_LOG=info cargo run --release --bin deploy -- -m "$MANAGER_MNEMONIC" -i "$MANAGER_ACCOUNT_INDEX" -u "$URL" -o "$DEPLOYMENT_FILE"
8181

8282
# Extract the deployed KeyManager address
8383
km_addr=$(sed -nr 's/^key_manager.*=.*"(.+)"/\1/p' "$DEPLOYMENT_FILE")
8484

8585
# Update the contract
8686
committee_config="test-configs/$COMMITTEE_PATH/committee.toml"
87-
RUST_LOG=info cargo run --bin register -- -m "$MANAGER_MNEMONIC" -i "$MANAGER_ACCOUNT_INDEX" -u "$URL" -k "$km_addr" -c "$committee_config"
87+
RUST_LOG=info cargo run --release --bin register -- -m "$MANAGER_MNEMONIC" -i "$MANAGER_ACCOUNT_INDEX" -u "$URL" -k "$km_addr" -c "$committee_config"
8888

8989
# Finally, clean up the temporary deployment file
9090
rm -f "$DEPLOYMENT_FILE"

test-configs/nitro-ci-committee/node_0.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ address = "127.0.0.1:8000"
55
http_api = "127.0.0.1:8004"
66

77
[net.internal]
8-
address = "127.0.0.1:8003"
8+
address = "0.0.0.0:8003"
99
nitro = "localhost:55000"
1010

1111
[keys.signing]

test-configs/nitro-ci-committee/node_1.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ address = "127.0.0.1:8010"
55
http_api = "127.0.0.1:8014"
66

77
[net.internal]
8-
address = "127.0.0.1:8013"
9-
nitro = "localhost:55001"
8+
address = "0.0.0.0:8013"
9+
nitro = "localhost:55010"
1010

1111
[keys.signing]
1212
secret = "FWJzNGvEjFS3h1N1sSMkcvvroWwjT5LQuGkGHu9JMAYs"

test-node

Submodule test-node added at f32f014

timeboost-sequencer/src/config.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ use sailfish::rbc::RbcConfig;
66
use sailfish::types::CommitteeVec;
77
use timeboost_config::ChainConfig;
88
use timeboost_crypto::prelude::DkgDecKey;
9-
use timeboost_types::{Address, DelayedInboxIndex, KeyStore, ThresholdKeyCell};
9+
use timeboost_types::{Address, KeyStore, ThresholdKeyCell};
10+
1011
#[derive(Debug, Clone, Builder)]
1112
pub struct SequencerConfig {
1213
/// The keypair to sign messages.
@@ -34,10 +35,6 @@ pub struct SequencerConfig {
3435
#[builder(default)]
3536
pub(crate) priority_addr: Address,
3637

37-
/// The delayed inbox index.
38-
#[builder(default)]
39-
pub(crate) delayed_inbox_index: DelayedInboxIndex,
40-
4138
/// Is this sequencer recovering from a crash?
4239
#[builder(default = true)]
4340
pub(crate) recover: bool,

timeboost-sequencer/src/include.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub struct Includer {
3838
}
3939

4040
impl Includer {
41-
pub fn new(c: Committee, i: DelayedInboxIndex) -> Self {
41+
pub fn new(c: Committee) -> Self {
4242
let now = Timestamp::default();
4343
Self {
4444
committee: c,
@@ -47,7 +47,7 @@ impl Includer {
4747
time: now,
4848
epoch: now.into(),
4949
seqno: SeqNo::zero(),
50-
index: i,
50+
index: 0.into(),
5151
cache: BTreeMap::new(),
5252
}
5353
}

0 commit comments

Comments
 (0)