-
Notifications
You must be signed in to change notification settings - Fork 583
Rewrite hardfork test to Go #17919
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
Open
georgeee
wants to merge
15
commits into
compatible
Choose a base branch
from
georgeee/hf-test-go
base: compatible
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Rewrite hardfork test to Go #17919
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
8af8081
Hardfork test rewrite prototype
georgeee e00c9d9
Run hardfork_test from build-and-test.sh
georgeee dd22ee1
Format hardfork_test Go code
georgeee 999bffa
Rework and confirm it matches the previous implementation
georgeee 212b3a6
Fix a timing issue
georgeee 56deee6
Localnet: first node to produce SWs
georgeee 0b19d70
Retry Graphql requests instead of failing immediately
georgeee cf149d8
Update HTTPClientTimeoutSeconds
georgeee 2913816
Shutdown subprocesses on interrupt
georgeee 6d04089
Don't exit on add_genesis_winner present in fork config
georgeee 57971b2
Reformat
georgeee c2fbbae
Don't exit on no add_genesis_winner in runtime config
georgeee 9ba144d
Fixup handling of genesis section in config.json
georgeee ec976d4
Don't print run-localnet.sh unless needed
georgeee 9bd5c76
Update README
georgeee 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
{"go.mod":"b4592235afa6583ad9fa5ace6072a5b9733165d1580bfb47954fd154da9fe6ee","go.sum":"a66a7ea9363eecf0990f36729b257548c44b114ce588890dccdf633b123974d3","vendorSha256":"sha256-2Qy9V5NOKli0bjnhOykBYShk6+TYqIJshOXdWk+9O4c="} |
File renamed without changes.
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,15 @@ | ||
#!/usr/bin/env bash | ||
|
||
NAME="$1" | ||
VENDOR_HASH="$2" | ||
|
||
if [[ "$NAME" == "" ]] || [[ "$VENDOR_HASH" == "" ]]; then | ||
echo "Usage: $0 <name> <vendor hash>" | ||
exit 1 | ||
fi | ||
|
||
cd -- "$(dirname -- "${BASH_SOURCE[0]}")/.." | ||
printf '{"go.mod":"%s","go.sum":"%s","vendorSha256":"%s"}' \ | ||
"$(sha256sum "src/app/$NAME/src/go.mod" | cut -d\ -f1)" \ | ||
"$(sha256sum "src/app/$NAME/src/go.sum" | cut -d\ -f1)" \ | ||
"$VENDOR_HASH" | tee "nix/go-hashes/$NAME.json" |
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -37,16 +37,20 @@ GENESIS_LEDGER_DIR=${GENESIS_LEDGER_DIR:-} | |
# Slot duration (a.k.a. block window duration), seconds | ||
SLOT=${SLOT:-30} | ||
|
||
echo "Creates a quick-epoch-turnaround configuration in localnet/ and launches two Mina nodes" >&2 | ||
echo "Usage: $0 [-m|--mina $MINA_EXE] [-i|--tx-interval $TX_INTERVAL] [-d|--delay-min $DELAY_MIN] [-s|--slot $SLOT] [--develop] [-c|--config ./config.json] [--slot-tx-end 100] [--slot-chain-end 130] [--genesis-ledger-dir ./genesis]" >&2 | ||
echo "Consider reading script's code for information on optional arguments" >&2 | ||
usage() { | ||
echo "Creates a quick-epoch-turnaround configuration in localnet/ and launches two Mina nodes" >&2 | ||
echo "Usage: $0 [-m|--mina $MINA_EXE] [-i|--tx-interval $TX_INTERVAL] [-d|--delay-min $DELAY_MIN] [-s|--slot $SLOT] [--develop] [-c|--config ./config.json] [--slot-tx-end 100] [--slot-chain-end 130] [--genesis-ledger-dir ./genesis]" >&2 | ||
echo "Consider reading script's code for information on optional arguments" >&2 | ||
} | ||
|
||
########################################################## | ||
# Parse arguments | ||
########################################################## | ||
|
||
while [[ $# -gt 0 ]]; do | ||
case $1 in | ||
-h|--help) | ||
usage; exit 0 ;; | ||
-d|--delay-min) | ||
DELAY_MIN="$2"; shift; shift ;; | ||
-i|--tx-interval) | ||
|
@@ -66,14 +70,17 @@ while [[ $# -gt 0 ]]; do | |
--genesis-ledger-dir) | ||
GENESIS_LEDGER_DIR="$2"; shift; shift ;; | ||
-*) | ||
echo "Unknown option $1"; exit 1 ;; | ||
echo "Unknown option $1" >&2 | ||
usage | ||
exit 1 ;; | ||
*) | ||
KEYS+=("$1") ; shift ;; | ||
esac | ||
done | ||
|
||
if [[ "$CONF_SUFFIX" != "" ]] && [[ "$CUSTOM_CONF" != "" ]]; then | ||
echo "Can't use both --develop and --config options" >&2 | ||
usage | ||
exit 1 | ||
fi | ||
|
||
|
@@ -161,6 +168,7 @@ rm -Rf localnet/runtime_1 localnet/runtime_2 | |
"${NODE_ARGS_1[@]}" \ | ||
--block-producer-key "$PWD/$CONF_DIR/bp" \ | ||
--config-directory "$PWD/localnet/runtime_1" \ | ||
--run-snark-worker "$(cat $CONF_DIR/bp.pub)" --work-selection seq \ | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a fix of a pre-existing glitch, not directly related to rewrite to Go |
||
--client-port 10301 --external-port 10302 --rest-port 10303 & | ||
|
||
bp_pid=$! | ||
|
This file was deleted.
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.
These changes were introduced to make output of the script nicer, not directly related to rewrite to Go