forked from ethereum-optimism/optimism
-
Notifications
You must be signed in to change notification settings - Fork 0
IA1.2.11 Write scripts and documentation for demo #211
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
31 commits
Select commit
Hold shift + click to select a range
a0ae824
Add devnet test for batcher restart
jbearer 616dcca
Check error returns
jbearer 1fc52de
Separate op-geth instances for each L2 node
jbearer b01792f
Build devnet dockers in CI
jbearer 6470fb7
Build op-deployer in CI
jbearer 7dfd4f4
Try larger runner
jbearer 7c35059
Increase test outage and recovery time
jbearer c87223c
Try to speed up transaction verification
jbearer c7ef32e
Do not drop batches before we have seen a finalized L1 block
jbearer 23fd979
Remove unnecessary sleep
jbearer 84430ee
Add scripts for demo and documentation
shenkeyao d1e47cd
Build containers in dependency order
jbearer b54ff4c
Don't copy config file into Docker image at build time
jbearer 8ba82f9
Fix syntax
shenkeyao b5e1b91
Checkout submodules in CI
jbearer 1892c97
Don't copy config file into Docker image at build time
jbearer 8fa0034
Remove another COPY
shenkeyao 8c968a1
Run devnet test in separate workflow
jbearer 6c33fe9
Add exposed ports for more nodes in docker-compose
Ayiga 71e03ed
Fix CAFF environment variables
Ayiga 58a4bf4
Set `caff.node` to `true` for `caff-node`
Ayiga 67bd454
Support alias and input check
shenkeyao 332a89f
Merge branch 'keyao/demo' of github.com:EspressoSystems/optimism-espr…
shenkeyao 4f0a009
Add scripts and instructions for running utility script
Ayiga 65c06ea
Merge branch 'jb/ta1-batcher-restart' into keyao/demo
shenkeyao f6d4e68
Update scripts after separating geth
shenkeyao e725939
Merge branch 'keyao/demo' of github.com:EspressoSystems/optimism-espr…
shenkeyao f14a392
Merge branch 'celo-integration-rebase-13.2' into keyao/demo
shenkeyao c7a9279
Update readme
shenkeyao 7f49c1e
tmux in flake.nix
philippecamacho 106b4af
Update shell being targeted in get_sync_status.sh
Ayiga 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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| #!/bin/bash | ||
|
|
||
| OP_RPC_SEQUENCER=${OP_RPC_SEQUENCER:-http://localhost:9545} | ||
| OP_RPC_VERIFIER=${OP_RPC_VERIFIER:-http://localhost:9546} | ||
| OP_RPC_CAFF=${OP_RPC_CAFF:-http://localhost:9547} | ||
|
|
||
| set -euC pipefail | ||
|
|
||
| # Change the current directory to the script's directory | ||
| cd "$(dirname "$0")" | ||
|
|
||
| # If the tmux session already exists, we will attach to it. | ||
| if tmux has-session -t '=get_sync_status' 2>/dev/null; then | ||
| echo "Tmux session 'get_sync_status' already exists. Exiting." | ||
| tmux kill-session -t get_sync_status || true | ||
| fi | ||
|
|
||
| # Create a new tmux session, detached, named "get_sync_status" | ||
| tmux new-session -d -s get_sync_status \; \ | ||
| send-keys "NODE_NAME=sequencer RPC_ADDRESS=$OP_RPC_SEQUENCER watch -p -n 1 -c -d ./get_sync_status.sh" ENTER \; \ | ||
| split-window -h "NODE_NAME=verifier RPC_ADDRESS=$OP_RPC_VERIFIER watch -p -n 1 -c -d ./get_sync_status.sh" \; \ | ||
| split-window -h "NODE_NAME=caff-node RPC_ADDRESS=$OP_RPC_CAFF watch -p -n 1 -c -d ./get_sync_status.sh" \; \ | ||
| select-layout even-horizontal \; \ | ||
| attach |
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,36 @@ | ||
| #!/bin/bash | ||
| # This is a convenience script to fetch data from the optimism node for | ||
| # "optimism_syncStatus" RPC method. | ||
|
|
||
| echo "NODE $NODE_NAME" | ||
| JSON_DATA=$(curl -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"optimism_syncStatus","params":[],"id":1}' $RPC_ADDRESS 2>/dev/null) | ||
|
|
||
| # Make sure the the RPC call was successful | ||
| if [ $? -ne 0 ]; then | ||
| echo "Failed to connect to $RPC_ADDRESS" | ||
| exit 1 | ||
| fi | ||
|
|
||
|
|
||
| # Store the results for easier processing | ||
| RESULT=$(echo $JSON_DATA | jq .result) | ||
|
|
||
| # Extract and print some fields from the JSON response | ||
| output_block_details() { | ||
| BLOCK=$(echo $RESULT | jq -r .$1) | ||
| echo "$1: ($(echo $BLOCK | jq -r .number))" | ||
| echo " hash: $(echo $BLOCK | jq -r .hash)" | ||
| echo " parentHash: $(echo $BLOCK | jq -r .parentHash)" | ||
| echo " timestamp: $(echo $BLOCK | jq -r .timestamp)" | ||
| } | ||
|
|
||
| # Output the block details in a simple format | ||
| output_block_details "current_l1" | ||
| output_block_details "current_l1_finalized" | ||
| output_block_details "head_l1" | ||
| output_block_details "safe_l1" | ||
| output_block_details "finalized_l1" | ||
| echo | ||
| output_block_details "unsafe_l2" | ||
| output_block_details "safe_l2" | ||
| output_block_details "finalized_l2" |
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.
When I run this script I get "sh: 1: ./get_sync_status.sh: not found ".