Skip to content

Commit 689be1d

Browse files
committed
Website: add doc for replayer
1 parent a2203d5 commit 689be1d

File tree

13 files changed

+384
-0
lines changed

13 files changed

+384
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
# Record node execution using Docker
3+
4+
# Create directory for recording
5+
mkdir -p mina-replay-test
6+
7+
# Run node with recording enabled using Docker
8+
docker run --rm \
9+
-v "$(pwd)/mina-replay-test:/root/.mina" \
10+
o1labs/mina-rust:latest \
11+
node \
12+
--network devnet \
13+
--record state-with-input-actions \
14+
--work-dir /root/.mina
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
# Record node execution for debugging and replay
3+
4+
# Run node with recording enabled
5+
mina node \
6+
--network devnet \
7+
--record state-with-input-actions \
8+
--work-dir ~/.mina-replay-test
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
# Record with custom directory using Docker
3+
4+
# Create custom directory for recording
5+
mkdir -p my-custom-replay-dir
6+
7+
# Run node with custom recording directory
8+
docker run --rm \
9+
-v "$(pwd)/my-custom-replay-dir:/root/.mina" \
10+
o1labs/mina-rust:latest \
11+
node \
12+
--network devnet \
13+
--record state-with-input-actions \
14+
--work-dir /root/.mina
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
# Record node execution with custom working directory
3+
4+
WORK_DIR="$1"
5+
if [ -z "$WORK_DIR" ]; then
6+
echo "Usage: $0 <work-directory>"
7+
exit 1
8+
fi
9+
10+
# Run node with recording enabled using custom directory
11+
mina node \
12+
--network devnet \
13+
--record state-with-input-actions \
14+
--work-dir "$WORK_DIR"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# Replay with dynamic effects using Docker
3+
4+
docker run --rm \
5+
-v "$(pwd)/mina-replay-test:/root/.mina" \
6+
-v "$(pwd)/my-effects.so:/effects/my-effects.so" \
7+
o1labs/mina-rust:latest \
8+
replay state-with-input-actions \
9+
--dir /root/.mina/recorder \
10+
--dynamic-effects-lib /effects/my-effects.so
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#!/bin/bash
2+
# Build custom effects library and replay with custom effects
3+
4+
# Build custom effects library
5+
cargo build --release -p replay_dynamic_effects
6+
7+
# Replay with custom effects
8+
mina replay state-with-input-actions \
9+
--dir ~/.mina-replay-test/recorder \
10+
--dynamic-effects-lib ./target/release/libreplay_dynamic_effects.so
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# Replay with build environment mismatch ignored using Docker
3+
4+
docker run --rm \
5+
-v "$(pwd)/mina-replay-test:/root/.mina" \
6+
o1labs/mina-rust:latest \
7+
replay state-with-input-actions \
8+
--dir /root/.mina/recorder \
9+
--ignore-build-env-mismatch
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
# Replay and ignore build environment differences
3+
4+
mina replay state-with-input-actions \
5+
--dir ~/.mina-replay-test/recorder \
6+
--ignore-mismatch
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/bash
2+
# Replay recorded node execution using Docker
3+
4+
# Replay from the recorded directory
5+
docker run --rm \
6+
-v "$(pwd)/mina-replay-test:/root/.mina" \
7+
o1labs/mina-rust:latest \
8+
replay state-with-input-actions --dir /root/.mina/recorder
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
# Replay recorded node execution
3+
4+
# Replay from the recorded directory
5+
mina replay state-with-input-actions --dir ~/.mina-replay-test/recorder

0 commit comments

Comments
 (0)