Skip to content

Commit b6c7859

Browse files
committed
Merge branch 'develop' of https://github.com/o1-labs/mina-rust into 1566-create-documentation-about-each-endpoint-the-dashboard-is-using
2 parents f519159 + 461a66e commit b6c7859

File tree

60 files changed

+612
-184
lines changed

Some content is hidden

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

60 files changed

+612
-184
lines changed

.github/workflows/doc-commands.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,6 @@ on:
44
push:
55
branches: [ main, develop ]
66
pull_request:
7-
paths:
8-
- 'Makefile'
9-
- 'docs/**'
10-
- 'CLAUDE.md'
11-
- '.github/workflows/doc-commands.yml'
127
workflow_dispatch:
138

149
env:

.github/workflows/docker.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,10 +279,10 @@ jobs:
279279
# Verify required fields are present
280280
docker run --rm ${{ env.REGISTRY_NODE_IMAGE }}:${{ env.DOCKER_TAG }} build-info | grep -E "Version:|Build time:|Commit SHA:|Commit branch:|Rustc version:"
281281
282-
# Verify version format
282+
# Verify version format (commit hash or version tag)
283283
VERSION=$(docker run --rm ${{ env.REGISTRY_NODE_IMAGE }}:${{ env.DOCKER_TAG }} build-info | grep "Version:" | awk '{print $2}')
284-
if [[ ! "$VERSION" =~ ^[0-9a-f]{7}$ ]]; then
285-
echo "Error: Version should be a 7-character commit hash, got: $VERSION"
284+
if [[ ! "$VERSION" =~ ^[0-9a-f]{7}$ ]] && [[ ! "$VERSION" =~ ^v[0-9]+\.[0-9]+\.[0-9]+ ]]; then
285+
echo "Error: Version should be either a 7-character commit hash or a version tag (vX.Y.Z), got: $VERSION"
286286
exit 1
287287
fi
288288

.github/workflows/lint.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
lint:
10-
timeout-minutes: 10
10+
timeout-minutes: 15
1111
name: Lint - ${{ matrix.os }}
1212
runs-on: ${{ matrix.os }}
1313
strategy:

.github/workflows/tests.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,61 @@ jobs:
265265
path: target/release/mina
266266
retention-days: 7
267267

268+
unit-tests:
269+
runs-on: ubuntu-24.04
270+
steps:
271+
- name: Git checkout
272+
uses: actions/checkout@v5
273+
274+
- name: Load versions
275+
uses: ./.github/actions/load-versions
276+
277+
- name: Setup build dependencies
278+
uses: ./.github/actions/setup-build-deps
279+
280+
- name: Setup Rust
281+
uses: ./.github/actions/setup-rust
282+
with:
283+
toolchain: ${{ env.RUST_STABLE_VERSION }}
284+
cache-prefix: unit-tests-${{ env.CACHE_VERSION }}
285+
286+
- name: Install cargo-nextest
287+
uses: taiki-e/install-action@nextest
288+
289+
# TODO: add this to the makefile
290+
- name: Run unit tests
291+
run: |
292+
cargo nextest run --workspace --lib \
293+
--exclude mina-core \
294+
--exclude mina-fuzzer \
295+
--exclude mina-macros \
296+
--exclude mina-p2p-messages \
297+
--exclude poseidon \
298+
--exclude snark \
299+
--exclude p2p \
300+
--exclude salsa-simple \
301+
--exclude p2p-testing \
302+
--exclude libp2p-rpc-behaviour \
303+
--exclude node \
304+
--exclude mina-node-account \
305+
--exclude vrf \
306+
--exclude mina-node-common \
307+
--exclude mina-node-native \
308+
--exclude mina-node-web \
309+
--exclude mina-node-invariants \
310+
--exclude mina-node-testing \
311+
--exclude cli \
312+
--exclude replay_dynamic_effects \
313+
--exclude mina-transport \
314+
--exclude mina-bootstrap-sandbox \
315+
--exclude mina-gossipsub-sandbox \
316+
--exclude hash-tool \
317+
--exclude ledger-tool \
318+
--exclude transaction_fuzzer \
319+
--exclude mina-archive-breadcrumb-compare \
320+
--exclude webrtc-sniffer
321+
# --exclude mina-tree
322+
268323
account-tests:
269324
timeout-minutes: 20
270325
runs-on: ubuntu-24.04

cli/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cli"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
edition = "2021"
55
license = "Apache-2.0"
66

cli/replay_dynamic_effects/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "replay_dynamic_effects"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
edition = "2021"
55
license = "Apache-2.0"
66

cli/src/commands/node/mod.rs

Lines changed: 28 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,18 @@
1-
use std::{fs::File, path::PathBuf, sync::Arc};
2-
31
use anyhow::Context;
42
use ledger::proofs::provers::BlockProver;
5-
use node::{
6-
account::AccountSecretKey,
7-
snark::{BlockVerifier, TransactionVerifier},
8-
transition_frontier::genesis::GenesisConfig,
9-
};
10-
113
use mina_node_account::AccountPublicKey;
12-
use reqwest::Url;
13-
4+
use mina_node_native::{archive::config::ArchiveStorageOptions, tracing, NodeBuilder};
145
use node::{
6+
account::AccountSecretKey,
157
core::log::inner::Level,
168
p2p::{connection::outgoing::P2pConnectionOutgoingInitOpts, identity::SecretKey},
179
service::Recorder,
10+
snark::{BlockVerifier, TransactionVerifier},
11+
transition_frontier::genesis::GenesisConfig,
1812
SnarkerStrategy,
1913
};
20-
21-
use mina_node_native::{archive::config::ArchiveStorageOptions, tracing, NodeBuilder};
14+
use reqwest::Url;
15+
use std::{fs::File, path::PathBuf, sync::Arc};
2216

2317
/// Mina node configuration and runtime options
2418
///
@@ -216,6 +210,28 @@ pub struct Node {
216210
#[arg(long, requires = "producer")]
217211
pub coinbase_receiver: Option<AccountPublicKey>,
218212

213+
/// Enable recording of node state and actions for debugging and replay
214+
///
215+
/// Recording captures the node's state transitions and input actions,
216+
/// enabling deterministic replay for debugging and testing purposes.
217+
///
218+
/// Available modes:
219+
/// - `none`: No recording (default)
220+
/// - `state-with-input-actions`: Records initial state and all input
221+
/// actions to the `recorder/` directory within the working directory
222+
///
223+
/// Recorded data can be replayed using the `mina replay` command to
224+
/// reproduce the exact sequence of state transitions for debugging.
225+
///
226+
/// # Example
227+
///
228+
/// ```bash
229+
/// # Record node execution
230+
/// mina node --network devnet --record state-with-input-actions
231+
///
232+
/// # Replay recorded execution
233+
/// mina replay state-with-input-actions ~/.mina/recorder
234+
/// ```
219235
#[arg(long, default_value = "none", env)]
220236
pub record: String,
221237

core/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mina-core"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
edition = "2021"
55
license = "Apache-2.0"
66

fuzzer/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mina-fuzzer"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
edition = "2021"
55
license = "Apache-2.0"
66

ledger/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "mina-tree"
3-
version = "0.17.0"
3+
version = "0.18.0"
44
edition = "2021"
55
license = "Apache-2.0"
66

0 commit comments

Comments
 (0)