Skip to content

Commit 54d9eff

Browse files
authored
Merge pull request #3782 from ProvableHQ/release-4.1.0
[Release] Mainnet 4.1.0
2 parents fc31b4d + c6f6f25 commit 54d9eff

File tree

102 files changed

+1648
-1125
lines changed

Some content is hidden

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

102 files changed

+1648
-1125
lines changed

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[target.x86_64-unknown-linux-gnu]
2+
rustflags = [
3+
# LLD is generally faster and might be the default for Rust in the future.
4+
# See here: https://github.com/rust-lang/rust/issues/71515
5+
"-C", "link-arg=-fuse-ld=lld",
6+
]

.circleci/config.yml

Lines changed: 72 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ parameters:
1717
orbs:
1818
windows: circleci/windows@5.0
1919

20+
executors:
21+
# The default docker image used in the main-workflow
22+
rust-docker:
23+
docker:
24+
- image: cimg/rust:1.88.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
25+
2026
commands:
2127
check_windows:
2228
description: "Runs cargo check on Windows"
@@ -77,7 +83,7 @@ commands:
7783
export RUSTC_WRAPPER="sccache"
7884
rm -rf "$CIRCLE_WORKING_DIRECTORY/.cargo/registry"
7985
DEBIAN_FRONTEND=noninteractive sudo apt-get update
80-
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends clang llvm-dev llvm pkg-config xz-utils make libssl-dev libssl-dev
86+
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y --no-install-recommends clang llvm-dev llvm lld pkg-config xz-utils make libssl-dev libssl-dev
8187
- restore_cache:
8288
keys:
8389
- << parameters.cache_key >>
@@ -110,12 +116,12 @@ commands:
110116
steps:
111117
- checkout
112118
- setup_environment:
113-
cache_key: << parameters.cache_key >>
119+
cache_key: v3.3.1-rust-1.88.0-<< parameters.cache_key >>-cache
114120
- run:
115121
no_output_timeout: 30m
116122
command: cd << parameters.workspace_member >> && RUST_MIN_STACK=67108864 cargo test << parameters.flags >>
117123
- clear_environment:
118-
cache_key: << parameters.cache_key >>
124+
cache_key: v3.3.1-rust-1.88.0-<< parameters.cache_key >>-cache
119125

120126
run_serial_long:
121127
description: "Build and run long running tests"
@@ -137,33 +143,6 @@ commands:
137143
- clear_environment:
138144
cache_key: << parameters.cache_key >>
139145

140-
run_parallel:
141-
description: "Build and run tests (in parallel)"
142-
parameters:
143-
workspace_member:
144-
type: string
145-
cache_key:
146-
type: string
147-
flags:
148-
type: string
149-
default: ""
150-
steps:
151-
- checkout
152-
- setup_environment:
153-
cache_key: << parameters.cache_key >>
154-
- run:
155-
no_output_timeout: 45m
156-
command: |
157-
cd << parameters.workspace_member >>
158-
cargo test -- --list --format terse | sed 's/: test//' > test_names.txt
159-
TEST_NAMES=$(circleci tests split test_names.txt)
160-
for i in $(echo $TEST_NAMES | sed "s/ / /g")
161-
do
162-
RUST_MIN_STACK=67108864 cargo test $i << parameters.flags >>
163-
done
164-
- clear_environment:
165-
cache_key: << parameters.cache_key >>
166-
167146
run_devnet:
168147
description: "Run devnet for integration testing"
169148
parameters:
@@ -192,8 +171,17 @@ commands:
192171
command: |
193172
cargo install --locked --path .
194173
- run:
195-
name: "Run devnet test"
196-
timeout: 20m # Allow 20 minutes total
174+
name: "Run DB backup test"
175+
timeout: 10m # Allow 10 minutes total
176+
command: |
177+
./.circleci/db_backup_ci.sh # run the db checkpoint test script first, and clean the dev ledgers afterwards
178+
snarkos clean --dev 0
179+
snarkos clean --dev 1
180+
snarkos clean --dev 2
181+
snarkos clean --dev 3
182+
- run:
183+
name: "Run block advancement test"
184+
imeout: 20m # Allow 20 minutes total
197185
command: |
198186
./.circleci/devnet_ci.sh << parameters.validators >> << parameters.clients >> << parameters.network_id >> << parameters.min_height >>
199187
- clear_environment:
@@ -206,242 +194,219 @@ commands:
206194

207195
jobs:
208196
snarkos:
209-
docker:
210-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
211-
resource_class: << pipeline.parameters.large >>
197+
executor: rust-docker
198+
resource_class: << pipeline.parameters.xlarge >>
212199
steps:
213200
- run_serial:
214201
workspace_member: .
215-
cache_key: v3.3.1-rust-1.83.0-stable-cache
202+
cache_key: stable
216203

217204
account:
218-
docker:
219-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
205+
executor: rust-docker
220206
resource_class: << pipeline.parameters.medium >>
221207
steps:
222208
- run_serial:
223209
workspace_member: account
224-
cache_key: v3.3.1-rust-1.83.0-account-cache
210+
cache_key: account
225211

226212
cli:
227-
docker:
228-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
213+
executor: rust-docker
229214
resource_class: << pipeline.parameters.xlarge >>
230215
steps:
231216
- run_serial:
232217
workspace_member: cli
233-
cache_key: v3.3.1-rust-1.83.0-cli-cache
218+
cache_key: cli
234219

235220
display:
236-
docker:
237-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
221+
executor: rust-docker
238222
resource_class: << pipeline.parameters.medium >>
239223
steps:
240224
- run_serial:
241225
workspace_member: display
242226
cache_key: v3.3.1-rust-1.83.0-display-cache
243227

244228
node:
245-
docker:
246-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
229+
executor: rust-docker
247230
resource_class: << pipeline.parameters.twoxlarge >>
248231
steps:
249232
- run_serial:
250233
workspace_member: node
251-
cache_key: v3.3.1-rust-1.83.0-node-cache
234+
cache_key: node
252235

253236
node-bft:
254-
docker:
255-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
237+
executor: rust-docker
256238
resource_class: << pipeline.parameters.twoxlarge >>
257239
steps:
258240
- run_serial:
259241
workspace_member: node/bft
260-
cache_key: v3.3.1-rust-1.83.0-node-bft-cache
242+
cache_key: node-bft
261243

262244
node-bft-events:
263-
docker:
264-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
265-
resource_class: << pipeline.parameters.medium >>
245+
executor: rust-docker
246+
resource_class: << pipeline.parameters.large >>
266247
steps:
267248
- run_serial:
268249
workspace_member: node/bft/events
269-
cache_key: v3.3.1-rust-1.83.0-node-bft-events-cache
250+
cache_key: node-bft-events
270251

271252
node-bft-ledger-service:
272-
docker:
273-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
253+
executor: rust-docker
274254
resource_class: << pipeline.parameters.medium >>
275255
steps:
276256
- run_serial:
277257
workspace_member: node/bft/ledger-service
278-
cache_key: v3.3.1-rust-1.83.0-node-bft-ledger-service-cache
258+
cache_key: node-bft-ledger-service
279259

280260
node-bft-storage-service:
281-
docker:
282-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
261+
executor: rust-docker
283262
resource_class: << pipeline.parameters.medium >>
284263
steps:
285264
- run_serial:
286265
workspace_member: node/bft/storage-service
287-
cache_key: v3.3.1-rust-1.83.0-node-bft-storage-service-cache
266+
cache_key: node-bft-storage-service
288267

289268
node-cdn:
290-
docker:
291-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
269+
executor: rust-docker
292270
resource_class: << pipeline.parameters.medium >>
293271
steps:
294272
- run_serial:
295273
workspace_member: node/cdn
296-
cache_key: v3.3.1-rust-1.83.0-node-cdn-cache
274+
cache_key: node-cdn
297275

298276
node-consensus:
299-
docker:
300-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
277+
executor: rust-docker
301278
resource_class: << pipeline.parameters.medium >>
302279
steps:
303280
- run_serial:
304281
workspace_member: node/consensus
305-
cache_key: v3.3.1-rust-1.83.0-node-consensus-cache
282+
cache_key: node-consensus
306283

307284
node-rest:
308-
docker:
309-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
285+
executor: rust-docker
310286
resource_class: << pipeline.parameters.medium >>
311287
steps:
312288
- run_serial:
313289
workspace_member: node/rest
314-
cache_key: v3.3.1-rust-1.83.0-node-rest-cache
290+
cache_key: node-rest
315291

316292
node-router:
317-
docker:
318-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
293+
executor: rust-docker
319294
resource_class: << pipeline.parameters.large >>
320295
steps:
321296
- run_serial:
322297
workspace_member: node/router
323-
cache_key: v3.3.1-rust-1.83.0-node-router-cache
298+
cache_key: node-router
324299

325300
node-router-messages:
326-
docker:
327-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
328-
resource_class: << pipeline.parameters.medium >>
301+
executor: rust-docker
302+
resource_class: << pipeline.parameters.large >>
329303
steps:
330304
- run_serial:
331305
workspace_member: node/router/messages
332-
cache_key: v3.3.1-rust-1.83.0-node-router-messages-cache
306+
cache_key: node-router-messages-
333307

334308
node-sync:
335-
docker:
336-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
309+
executor: rust-docker
337310
resource_class: << pipeline.parameters.xlarge >>
338311
steps:
339312
- run_serial:
340313
workspace_member: node/sync
341-
cache_key: v3.3.1-rust-1.83.0-node-sync-cache
314+
cache_key: node-sync
342315

343316
node-sync-communication-service:
344-
docker:
345-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
317+
executor: rust-docker
346318
resource_class: << pipeline.parameters.medium >>
347319
steps:
348320
- run_serial:
349321
workspace_member: node/sync/communication-service
350-
cache_key: v3.3.1-rust-1.83.0-node-sync-communication-service-cache
322+
cache_key: node-sync-communication-service
351323

352324
node-sync-locators:
353-
docker:
354-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
325+
executor: rust-docker
355326
resource_class: << pipeline.parameters.medium >>
356327
steps:
357328
- run_serial:
358329
workspace_member: node/sync/locators
359-
cache_key: v3.3.1-rust-1.83.0-node-sync-locators-cache
330+
cache_key: node-sync-locators
360331

361332
node-tcp:
362-
docker:
363-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
333+
executor: rust-docker
364334
resource_class: << pipeline.parameters.medium >>
365335
steps:
366336
- run_serial:
367337
workspace_member: node/tcp
368-
cache_key: v3.3.1-rust-1.83.0-node-tcp-cache
338+
cache_key: node-tcp
369339

370340
devnet-test:
371-
docker:
372-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
341+
executor: rust-docker
373342
resource_class: << pipeline.parameters.xlarge >>
374343
steps:
375344
- run_devnet:
376345
workspace_member: .
377-
cache_key: v3.3.1-rust-1.83.0-devnet-test-cache
346+
cache_key: v3.3.1-rust-1.88.0-devnet-test-cache
378347

379348
check-fmt:
380-
docker:
381-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
349+
executor: rust-docker
382350
resource_class: << pipeline.parameters.medium >>
383351
steps:
384352
- checkout
385353
- install_rust_nightly
386354
- setup_environment:
387-
cache_key: v3.3.1-rust-1.83.0-fmt-cache
355+
cache_key: v3.3.1-rust-1.88.0-fmt-cache
388356
- run:
389357
name: Check style
390358
no_output_timeout: 35m
391359
command: cargo +nightly fmt --all -- --check
392360
- clear_environment:
393-
cache_key: v3.3.1-rust-1.83.0-fmt-cache
361+
cache_key: v3.3.1-rust-1.88.0-fmt-cache
394362

395363
check-unused-dependencies:
396-
docker:
397-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
364+
executor: rust-docker
398365
resource_class: << pipeline.parameters.medium >>
399366
steps:
400367
- checkout
401368
- setup_environment:
402-
cache_key: v3.3.1-rust-1.83.0-machete-cache
369+
cache_key: v3.3.1-rust-1.88.0-machete-cache
403370
- run:
404371
name: Check for unused dependencies
405372
no_output_timeout: 10m
406373
command: |
407374
cargo install cargo-machete@0.7.0
408375
cargo machete
409376
- clear_environment:
410-
cache_key: v3.3.1-rust-1.83.0-machete-cache
377+
cache_key: v3.3.1-rust-1.88.0-machete-cache
411378

412379
check-cargo-audit:
413-
docker:
414-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
380+
executor: rust-docker
415381
resource_class: << pipeline.parameters.medium >>
416382
steps:
417383
- checkout
418384
- setup_environment:
419-
cache_key: v3.3.1-rust-1.83.0-cargo-audit-cache
385+
cache_key: v3.3.1-rust-1.88.0-cargo-audit-cache
420386
- run:
421387
name: Check for security vulnerabilities
422388
no_output_timeout: 10m
423389
command: |
424390
cargo install cargo-audit@0.21.2 --locked
425391
cargo audit -D warnings
426392
- clear_environment:
427-
cache_key: v3.3.1-rust-1.83.0-cargo-audit-cache
393+
cache_key: v3.3.1-rust-1.88.0-cargo-audit-cache
428394

429395
check-clippy:
430-
docker:
431-
- image: cimg/rust:1.83.0 # Attention - Change the MSRV in Cargo.toml and rust-toolchain as well
396+
executor: rust-docker
432397
resource_class: << pipeline.parameters.medium >>
433398
steps:
434399
- checkout
435400
- setup_environment:
436-
cache_key: v3.3.1-rust-1.83.0-clippy-cache
401+
cache_key: v3.3.1-rust-1.88.0-clippy-cache
437402
- run:
438403
name: Check lint
439404
no_output_timeout: 35m
440405
command: |
441406
cargo clippy --workspace --all-targets -- -D warnings
442407
cargo clippy --workspace --all-targets --all-features -- -D warnings
443408
- clear_environment:
444-
cache_key: v3.3.1-rust-1.83.0-clippy-cache
409+
cache_key: v3.3.1-rust-1.88.0-clippy-cache
445410

446411
verify-windows:
447412
executor:

0 commit comments

Comments
 (0)