-
Notifications
You must be signed in to change notification settings - Fork 41
Replayer node - add documentation #1620
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
a56f9b2
Node/testing: remove comment and reorder import
dannywillems 9055157
Import: gather and run make format
dannywillems 29307cb
CLI/node: add doc for record parameter
dannywillems b90ff58
Node: document field of NodeService
dannywillems 106380e
Website: add doc for replayer
dannywillems File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,5 @@ | ||
| pub mod tracing; | ||
|
|
||
| mod service; | ||
| pub mod tracing; | ||
| pub use service::*; | ||
|
|
||
| mod node; | ||
| pub use node::*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
website/docs/developers/scripts/replayer/record-node-docker.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash | ||
| # Record node execution using Docker | ||
|
|
||
| # Create directory for recording | ||
| mkdir -p mina-replay-test | ||
|
|
||
| # Run node with recording enabled using Docker | ||
| docker run --rm \ | ||
| -v "$(pwd)/mina-replay-test:/root/.mina" \ | ||
| o1labs/mina-rust:latest \ | ||
| node \ | ||
| --network devnet \ | ||
| --record state-with-input-actions \ | ||
| --work-dir /root/.mina |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
| # Record node execution for debugging and replay | ||
|
|
||
| # Run node with recording enabled | ||
| mina node \ | ||
| --network devnet \ | ||
| --record state-with-input-actions \ | ||
| --work-dir ~/.mina-replay-test |
14 changes: 14 additions & 0 deletions
14
website/docs/developers/scripts/replayer/record-with-custom-dir-docker.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash | ||
| # Record with custom directory using Docker | ||
|
|
||
| # Create custom directory for recording | ||
| mkdir -p my-custom-replay-dir | ||
|
|
||
| # Run node with custom recording directory | ||
| docker run --rm \ | ||
| -v "$(pwd)/my-custom-replay-dir:/root/.mina" \ | ||
| o1labs/mina-rust:latest \ | ||
| node \ | ||
| --network devnet \ | ||
| --record state-with-input-actions \ | ||
| --work-dir /root/.mina |
14 changes: 14 additions & 0 deletions
14
website/docs/developers/scripts/replayer/record-with-custom-dir.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| #!/bin/bash | ||
| # Record node execution with custom working directory | ||
|
|
||
| WORK_DIR="$1" | ||
| if [ -z "$WORK_DIR" ]; then | ||
| echo "Usage: $0 <work-directory>" | ||
| exit 1 | ||
| fi | ||
|
|
||
| # Run node with recording enabled using custom directory | ||
| mina node \ | ||
| --network devnet \ | ||
| --record state-with-input-actions \ | ||
| --work-dir "$WORK_DIR" |
10 changes: 10 additions & 0 deletions
10
website/docs/developers/scripts/replayer/replay-dynamic-effects-docker.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
| # Replay with dynamic effects using Docker | ||
|
|
||
| docker run --rm \ | ||
| -v "$(pwd)/mina-replay-test:/root/.mina" \ | ||
| -v "$(pwd)/my-effects.so:/effects/my-effects.so" \ | ||
| o1labs/mina-rust:latest \ | ||
| replay state-with-input-actions \ | ||
| --dir /root/.mina/recorder \ | ||
| --dynamic-effects-lib /effects/my-effects.so |
10 changes: 10 additions & 0 deletions
10
website/docs/developers/scripts/replayer/replay-dynamic-effects.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| #!/bin/bash | ||
| # Build custom effects library and replay with custom effects | ||
|
|
||
| # Build custom effects library | ||
| cargo build --release -p replay_dynamic_effects | ||
|
|
||
| # Replay with custom effects | ||
| mina replay state-with-input-actions \ | ||
| --dir ~/.mina-replay-test/recorder \ | ||
| --dynamic-effects-lib ./target/release/libreplay_dynamic_effects.so |
9 changes: 9 additions & 0 deletions
9
website/docs/developers/scripts/replayer/replay-ignore-mismatch-docker.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/bash | ||
| # Replay with build environment mismatch ignored using Docker | ||
|
|
||
| docker run --rm \ | ||
| -v "$(pwd)/mina-replay-test:/root/.mina" \ | ||
| o1labs/mina-rust:latest \ | ||
| replay state-with-input-actions \ | ||
| --dir /root/.mina/recorder \ | ||
| --ignore-build-env-mismatch |
6 changes: 6 additions & 0 deletions
6
website/docs/developers/scripts/replayer/replay-ignore-mismatch.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| #!/bin/bash | ||
| # Replay and ignore build environment differences | ||
|
|
||
| mina replay state-with-input-actions \ | ||
| --dir ~/.mina-replay-test/recorder \ | ||
| --ignore-mismatch |
8 changes: 8 additions & 0 deletions
8
website/docs/developers/scripts/replayer/replay-node-docker.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| #!/bin/bash | ||
| # Replay recorded node execution using Docker | ||
|
|
||
| # Replay from the recorded directory | ||
| docker run --rm \ | ||
| -v "$(pwd)/mina-replay-test:/root/.mina" \ | ||
| o1labs/mina-rust:latest \ | ||
| replay state-with-input-actions --dir /root/.mina/recorder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| #!/bin/bash | ||
| # Replay recorded node execution | ||
|
|
||
| # Replay from the recorded directory | ||
| mina replay state-with-input-actions --dir ~/.mina-replay-test/recorder |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are already adding docs, it would be better if
recordparsing was handled byclapso that if invalid value is passed, node doesn't panic