Merge PR #2930: Simulation spring cleaning
* Update PENDING.md * Add simple period for expensive invariants * Remove individual module simulations * Simulate a few more blocks * Add README explaining reason for shell scripts * Deduplicate scripts, log exact replication command on failure * Refactor invariants to take sdk.Context instead of baseapp.BaseApp * Reference all issues in PENDING.md entry * Remove no longer used simulation.RandSetup * Bug fixes * Address @rigelrozanski comments * Fix typo
This commit is contained in:
+5
-2
@@ -3,9 +3,11 @@
|
||||
seeds=(1 2 4 7 9 20 32 123 124 582 1893 2989 3012 4728 37827 981928 87821 891823782 989182 89182391 \
|
||||
11 22 44 77 99 2020 3232 123123 124124 582582 18931893 29892989 30123012 47284728 37827)
|
||||
blocks=$1
|
||||
testname=$2
|
||||
|
||||
echo "Running multi-seed simulation with seeds ${seeds[@]}"
|
||||
echo "Running $blocks blocks per seed"
|
||||
echo "Running test $testname"
|
||||
echo "Edit scripts/multisim.sh to add new seeds. Keeping parameters in the file makes failures easy to reproduce."
|
||||
echo "This script will kill all sub-simulations on SIGINT/SIGTERM (i.e. Ctrl-C)."
|
||||
|
||||
@@ -16,10 +18,10 @@ echo "Using temporary log directory: $tmpdir"
|
||||
|
||||
sim() {
|
||||
seed=$1
|
||||
echo "Running full Gaia simulation with seed $seed. This may take awhile!"
|
||||
echo "Running Gaia simulation with seed $seed. This may take awhile!"
|
||||
file="$tmpdir/gaia-simulation-seed-$seed-date-$(date -u +"%Y-%m-%dT%H:%M:%S+00:00").stdout"
|
||||
echo "Writing stdout to $file..."
|
||||
go test ./cmd/gaia/app -run TestFullGaiaSimulation -SimulationEnabled=true -SimulationNumBlocks=$blocks \
|
||||
go test ./cmd/gaia/app -run $testname -SimulationEnabled=true -SimulationNumBlocks=$blocks \
|
||||
-SimulationVerbose=true -SimulationCommit=true -SimulationSeed=$seed -v -timeout 24h > $file
|
||||
}
|
||||
|
||||
@@ -44,6 +46,7 @@ for pid in ${pids[*]}; do
|
||||
if [ $last -ne 0 ]
|
||||
then
|
||||
echo "Simulation with seed $seed failed!"
|
||||
echo "To replicate, run 'go test ./cmd/gaia/app -run $testname -SimulationEnabled=true -SimulationNumBlocks=$blocks -SimulationVerbose=true -SimulationCommit=true -SimulationSeed=$seed -v -timeout 24h'"
|
||||
code=1
|
||||
else
|
||||
echo "Simulation with seed $seed OK"
|
||||
|
||||
Reference in New Issue
Block a user