Skip to content

Commit 3cfa4e1

Browse files
committed
merge with ax/crypto-update and fix conflicts
2 parents 44123f0 + c8c0064 commit 3cfa4e1

File tree

49 files changed

+2175
-582
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+2175
-582
lines changed

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

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17+
with:
18+
submodules: recursive
19+
fetch-depth: 0
1720
- uses: actions/cache@v4
1821
with:
1922
path: |
@@ -44,6 +47,9 @@ jobs:
4447
runs-on: ubuntu-latest
4548
steps:
4649
- uses: actions/checkout@v4
50+
with:
51+
submodules: recursive
52+
fetch-depth: 0
4753
- uses: taiki-e/install-action@nextest
4854
- name: Install protobuf compiler
4955
run: |
@@ -61,6 +67,9 @@ jobs:
6167
runs-on: ubuntu-latest
6268
steps:
6369
- uses: actions/checkout@v4
70+
with:
71+
submodules: recursive
72+
fetch-depth: 0
6473
- name: Install protobuf compiler
6574
run: |
6675
sudo apt-get update
@@ -81,6 +90,9 @@ jobs:
8190
runs-on: ubuntu-latest
8291
steps:
8392
- uses: actions/checkout@v4
93+
with:
94+
submodules: recursive
95+
fetch-depth: 0
8496
- uses: docker/setup-buildx-action@v3
8597
- name: Install Just
8698
run: |
@@ -94,6 +106,9 @@ jobs:
94106
timeout-minutes: 25
95107
steps:
96108
- uses: actions/checkout@v4
109+
with:
110+
submodules: recursive
111+
fetch-depth: 0
97112
- name: Install protobuf compiler
98113
run: |
99114
sudo apt-get update

.github/workflows/push-docker.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ jobs:
1313
tag: ${{ steps.set-tag.outputs.tag }}
1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
submodules: recursive
18+
fetch-depth: 0
1619
- uses: docker/setup-buildx-action@v3
1720
- name: Login to Github Container Repo
1821
uses: docker/login-action@v3
@@ -42,6 +45,6 @@ jobs:
4245
uses: docker/build-push-action@v6
4346
with:
4447
push: true
45-
platforms: linux/amd64
48+
platforms: linux/amd64,linux/arm64
4649
file: ./docker/timeboost.Dockerfile
4750
tags: ghcr.io/espressosystems/timeboost:${{ env.TAG }}

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "timeboost-proto/protos"]
2+
path = timeboost-proto/protos
3+
url = https://github.com/EspressoSystems/timeboost-proto.git

Cargo.toml

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,19 @@ members = [
33
"cliquenet",
44
"metrics",
55
"multisig",
6+
"robusta",
67
"sailfish",
78
"sailfish-consensus",
89
"sailfish-rbc",
910
"sailfish-types",
1011
"tests",
1112
"timeboost",
1213
"timeboost-builder",
13-
"timeboost-sequencer",
1414
"timeboost-crypto",
15+
"timeboost-proto",
16+
"timeboost-sequencer",
1517
"timeboost-types",
1618
"timeboost-utils",
17-
"timeboost-proto",
1819
"yapper",
1920
]
2021
resolver = "2"
@@ -24,11 +25,6 @@ version = "0.1.0"
2425
edition = "2024"
2526
rust-version = "1.85.0"
2627

27-
[profile.test]
28-
codegen-units = 16
29-
incremental = false
30-
opt-level = 3
31-
3228
[workspace.dependencies]
3329
aes-gcm = { version = "0.10.3" }
3430
alloy-chains = "0.2.0"
@@ -41,12 +37,12 @@ alloy-signer-local = "1.0.5"
4137
anyhow = "1.0.89"
4238
arbitrary = "1.4.1"
4339
arbtest = "0.3.2"
40+
ark-bls12-381 = "0.5"
4441
ark-bn254 = "0.5"
4542
ark-ec = "0.5"
4643
ark-ff = "0.5"
4744
ark-poly = "0.5"
4845
ark-secp256k1 = "0.5"
49-
ark-bls12-381 = "0.5"
5046
ark-serialize = { version = "0.5", features = ["derive"] }
5147
ark-std = { version = "0.5", default-features = false }
5248
arrayvec = "0.7.6"
@@ -65,6 +61,7 @@ criterion = "0.6"
6561
crossbeam-queue = "0.3.11"
6662
data-encoding = "2.6.0"
6763
derive_builder = "0.20"
64+
derive_more = { version = "1.0.0", features = ["full"] }
6865
digest = "0.10"
6966
dyn-clone = "1.0.17"
7067
ed25519-compact = "2.1.1"
@@ -81,29 +78,40 @@ prost = "0.13.5"
8178
quickcheck = "1.0.3"
8279
rand = "0.9"
8380
rayon = "1.10"
81+
reqwest = { version = "0.12", features = ["json"] }
8482
secp256k1 = { version = "0.31.0", features = ["global-context", "hashes", "rand", "serde"] }
85-
reqwest = { version = "0.12" }
8683
serde = { version = "1", features = ["derive", "rc"] }
8784
serde_bytes = "0.11.15"
8885
serde_json = { version = "1.0" }
8986
serde_with = "3.12.0"
9087
sha2 = { version = "0.10", default-features = false }
9188
sha3 = "0.10.8"
89+
smallvec = "1.15.1"
9290
snow = "0.9.6"
9391
spongefish = { git = "https://github.com/arkworks-rs/spongefish.git", rev = "e9f7031", features = [
9492
"arkworks-algebra",
9593
] }
9694
thiserror = "2.0"
9795
tide-disco = "0.9.3"
98-
smallvec = "1.15.1"
9996
tokio = { version = "1", default-features = false, features = ["full"] }
10097
tokio-stream = "0.1.17"
98+
tokio-tungstenite = { version = "0.27.0", features = ["rustls-tls-webpki-roots", "url"] }
10199
tokio-util = "0.7.15"
102100
toml = "0.8.19"
103101
tonic = "0.13.1"
104102
tonic-build = { version = "0.13.1", features = ["prost"] }
105103
tracing = "0.1"
106104
tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json"] }
107105
turmoil = "0.6.4"
106+
url = "2.5.4"
108107
vbs = "0.1"
109108
zeroize = { version = "1.8", features = ["zeroize_derive"] }
109+
110+
espresso-types = { git = "https://github.com/EspressoSystems/espresso-network.git" }
111+
hotshot-query-service = { git = "https://github.com/EspressoSystems/espresso-network.git" }
112+
hotshot-types = { git = "https://github.com/EspressoSystems/espresso-network.git" }
113+
114+
[profile.test]
115+
codegen-units = 16
116+
incremental = false
117+
opt-level = 3

docker/timeboost.Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ FROM debian:bullseye-slim
1212

1313
WORKDIR /app
1414

15+
RUN apt update && apt-get install -y libcurl4
16+
1517
# Create non-root user and group
1618
RUN groupadd -r appgroup && useradd -r -g appgroup timeboostuser
1719

robusta/Cargo.toml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
[package]
2+
name = "robusta"
3+
description = "espresso client"
4+
version.workspace = true
5+
edition.workspace = true
6+
rust-version.workspace = true
7+
8+
[dependencies]
9+
bincode = { workspace = true }
10+
bon = { workspace = true }
11+
data-encoding = { workspace = true }
12+
espresso-types = { workspace = true }
13+
futures = { workspace = true }
14+
hotshot-query-service = { workspace = true }
15+
hotshot-types = { workspace = true }
16+
reqwest = { workspace = true }
17+
serde = { workspace = true }
18+
serde_json = { workspace = true }
19+
thiserror = { workspace = true }
20+
timeboost-types = { path = "../timeboost-types" }
21+
tokio = { workspace = true }
22+
tokio-tungstenite = { workspace = true }
23+
tracing = { workspace = true }
24+
url = { workspace = true }
25+
26+
[dev-dependencies]
27+
tracing-subscriber = { workspace = true }

robusta/src/config.rs

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
use std::{iter::repeat, time::Duration};
2+
3+
use bon::Builder;
4+
use url::{ParseError, Url};
5+
6+
const NUM_DELAYS: usize = 5;
7+
8+
#[derive(Debug, Clone, Builder)]
9+
pub struct Config {
10+
/// Espresso network base URL.
11+
#[builder(with = |s: &str| -> Result<_, ParseError> { Url::parse(s) })]
12+
pub(crate) base_url: Url,
13+
14+
/// Espresso network websocket base URL.
15+
#[builder(with = |s: &str| -> Result<_, ParseError> { Url::parse(s) })]
16+
pub(crate) wss_base_url: Url,
17+
18+
#[builder(default = 3)]
19+
pub(crate) max_redirects: usize,
20+
21+
/// The sequence of delays between successive requests.
22+
///
23+
/// The last value is repeated forever.
24+
#[builder(default = [1, 3, 5, 10, 15])]
25+
pub(crate) delays: [u8; NUM_DELAYS],
26+
}
27+
28+
impl Config {
29+
pub fn delay_iter(&self) -> impl Iterator<Item = Duration> + use<> {
30+
self.delays
31+
.into_iter()
32+
.chain(repeat(self.delays[NUM_DELAYS - 1]))
33+
.map(|n| Duration::from_secs(n.into()))
34+
}
35+
}

0 commit comments

Comments
 (0)