diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index 2c904ea224..9dfe2d5671 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -44,7 +44,7 @@ jobs: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary - test-sim-nondeterminism: + test-sim-nondeterminism-short: runs-on: ubuntu-latest needs: [build, install-runsim] steps: @@ -66,12 +66,12 @@ jobs: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary if: env.GIT_DIFF - - name: test-sim-nondeterminism + - name: test-sim-nondeterminism-short run: | - make test-sim-nondeterminism + make test-sim-nondeterminism-short if: env.GIT_DIFF - test-sim-import-export: + test-sim-import-export-short: runs-on: ubuntu-latest needs: [build, install-runsim] steps: @@ -95,12 +95,12 @@ jobs: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary if: env.GIT_DIFF - - name: test-sim-import-export + - name: test-sim-import-export-short run: | - make test-sim-import-export + make test-sim-import-export-short if: env.GIT_DIFF - test-sim-after-import: + test-sim-after-import-short: runs-on: ubuntu-latest needs: [build, install-runsim] steps: @@ -124,9 +124,9 @@ jobs: path: ~/go/bin key: ${{ runner.os }}-go-runsim-binary if: env.GIT_DIFF - - name: test-sim-after-import + - name: test-sim-after-import-short run: | - make test-sim-after-import + make test-sim-after-import-short if: env.GIT_DIFF test-sim-multi-seed-short: diff --git a/.github/workflows/sims_normal.yml b/.github/workflows/sims_normal.yml new file mode 100644 index 0000000000..20263da71e --- /dev/null +++ b/.github/workflows/sims_normal.yml @@ -0,0 +1,120 @@ +name: Sims normal version +# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import) +# This workflow will run once per a week. +on: + schedule: + - cron: '0 0 * * SAT' + +jobs: + build: + runs-on: ubuntu-latest + if: "!contains(github.event.head_commit.message, 'skip-sims')" + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.1.4 + with: + go-version: 1.15 + - name: Display go version + run: go version + - run: make build + + install-runsim: + runs-on: ubuntu-latest + needs: build + steps: + - uses: actions/setup-go@v2.1.4 + with: + go-version: 1.15 + - name: Display go version + run: go version + - name: Install runsim + run: export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0 + - uses: actions/cache@v2.1.3 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + + test-sim-nondeterminism: + runs-on: ubuntu-latest + needs: [build, install-runsim] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.1.4 + with: + go-version: 1.15 + - name: Display go version + run: go version + - uses: technote-space/get-diff-action@v5.0.1 + with: + PATTERNS: | + **/**.go + !**/**_test.go + go.mod + go.sum + - uses: actions/cache@v2.1.3 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + if: env.GIT_DIFF + - name: test-sim-nondeterminism + run: | + make test-sim-nondeterminism + if: env.GIT_DIFF + + test-sim-import-export: + runs-on: ubuntu-latest + needs: [build, install-runsim] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.1.4 + with: + go-version: 1.15 + - name: Display go version + run: go version + - uses: technote-space/get-diff-action@v5.0.1 + with: + PATTERNS: | + **/**.go + !**/**_test.go + go.mod + go.sum + SET_ENV_NAME_INSERTIONS: 1 + SET_ENV_NAME_LINES: 1 + - uses: actions/cache@v2.1.3 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + if: env.GIT_DIFF + - name: test-sim-import-export + run: | + make test-sim-import-export + if: env.GIT_DIFF + + test-sim-after-import: + runs-on: ubuntu-latest + needs: [build, install-runsim] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2.1.4 + with: + go-version: 1.15 + - name: Display go version + run: go version + - uses: technote-space/get-diff-action@v5.0.1 + with: + PATTERNS: | + **/**.go + !**/**_test.go + go.mod + go.sum + SET_ENV_NAME_INSERTIONS: 1 + SET_ENV_NAME_LINES: 1 + - uses: actions/cache@v2.1.3 + with: + path: ~/go/bin + key: ${{ runner.os }}-go-runsim-binary + if: env.GIT_DIFF + - name: test-sim-after-import + run: | + make test-sim-after-import + if: env.GIT_DIFF diff --git a/CHANGELOG.md b/CHANGELOG.md index 3bba466618..9c9d9ad6a1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,99 +2,18 @@ ## [Unreleased] -## [v0.43.0](https://github.com/line/lbm-sdk/releases/tag/v0.43.0) - ### Features -* (global) [\#97](https://github.com/line/lbm-sdk/pull/97) Add codespace to query error -* (config) [\#114](https://github.com/line/lbm-sdk/pull/114) Add idle-timeout to rest server and rpc server config -* (x/wasm) [\#127](https://github.com/line/lbm-sdk/pull/127) Add wasm with Staragate migration completed. -* (x/wasm) [\#151](https://github.com/line/lbm-sdk/pull/151) Add contract access control. -* (x/wasm) [\#194](https://github.com/line/lbm-sdk/pull/194) Replace importing CosmWasm/wasmvm with line/wasmvm. -* (x/auth) [\#176](https://github.com/line/lbm-sdk/pull/176) Add MsgEmpty to auth module -* (metric) [\#184](https://github.com/line/lbm-sdk/pull/184) Add prometheus metrics for caches reverting telemetry metrics -* (grpc) [\#291](https://github.com/line/lbm-sdk/pull/291) Add GRPC API the BlockByHash and BlockResultsByHeight, add prove parameter to GetTxsEvent ### Improvements -* (bump-up) [\#93](https://github.com/line/lbm-sdk/pull/93) Adopt ostracon, line/tm-db and line/iavl -* (bump-up) [\#107](https://github.com/line/lbm-sdk/pull/107) Bump up tm-db, iavl and ostracon -* (script) [\#110](https://github.com/line/lbm-sdk/pull/110) Add script initializing simd -* (bump-up) [\#118](https://github.com/line/lbm-sdk/pull/118) Bump up tm-db and remove Domain() call -* (test) [\#128](https://github.com/line/lbm-sdk/pull/128) Allow creating new test network without init -* (db) [\#136](https://github.com/line/lbm-sdk/pull/136) Fix DB_BACKEND configuration -* (global) [\#140](https://github.com/line/lbm-sdk/pull/140) Modify default coin type, default address prefix -* (perf) [\#141](https://github.com/line/lbm-sdk/pull/141) Concurrent `checkTx` -* (perf) [\#142](https://github.com/line/lbm-sdk/pull/142) Implement `validateGasWanted()` -* (perf) [\#143](https://github.com/line/lbm-sdk/pull/143) Signature verification cache -* (global) [\#145](https://github.com/line/lbm-sdk/pull/145) Modify key type name -* (perf) [\#155](https://github.com/line/lbm-sdk/pull/155) Concurrent recheckTx -* (global) [\#158](https://github.com/line/lbm-sdk/pull/158) Remove tm-db dependency -* (x/wasm) [\#162](https://github.com/line/lbm-sdk/pull/162) Add missed UpdateContractStatusProposal types -* (perf) [\#164](https://github.com/line/lbm-sdk/pull/164) Sse fastcache -* (build) [\#181](https://github.com/line/lbm-sdk/pull/181) Raise codecov-action version to 1.5.0 -* (build) [\#195](https://github.com/line/lbm-sdk/pull/195) Build properly when using libsecp256k1 -* (perf) [\#198](https://github.com/line/lbm-sdk/pull/198) Caching paramset -* (global) [\#200](https://github.com/line/lbm-sdk/pull/200) Add a env prefix -* (store) [\#202](https://github.com/line/lbm-sdk/pull/202) Param store doesn't use gas kv -* (store) [\#203](https://github.com/line/lbm-sdk/pull/203) Remove transient store that is not used now -* (perf) [\#204](https://github.com/line/lbm-sdk/pull/204) Apply rw mutex to cachekv -* (perf) [\#208](https://github.com/line/lbm-sdk/pull/208) Use easyjson instead of amino when marshal abci logs -* (perf) [\#209](https://github.com/line/lbm-sdk/pull/209) Apply async reactor ostracon -* (proto) [\#212](https://github.com/line/lbm-sdk/pull/212) Reformat proto files and restore proto docs -* (perf) [\#216](https://github.com/line/lbm-sdk/pull/216) Memoize bech32 encoding and decoding -* (perf) [\#218](https://github.com/line/lbm-sdk/pull/218) Rootmulti store parallel commit -* (perf) [\#219](https://github.com/line/lbm-sdk/pull/219) Fix bech32 cache to get bech32 from proper cache -* (bump-up) [\#221](https://github.com/line/lbm-sdk/pull/221) Bump up iavl for parallel processing of batches -* (perf) [\#224](https://github.com/line/lbm-sdk/pull/224) Updated log time to have milliseconds -* (bump-up) [\#228](https://github.com/line/lbm-sdk/pull/228) Bump up ostracon to optimize checking the txs size -* (global) [\#230](https://github.com/line/lbm-sdk/pull/230) Modify module name to lfb-sdk -* (bump-up) [\#246](https://github.com/line/lbm-sdk/pull/246) Bump up ostracon to not flush wal when receive consensus msgs -* (wasm) [\#250](https://github.com/line/lbm-sdk/pull/250) Migrate linkwasmd to the latest commit -* (wasm) [\#253](https://github.com/line/lbm-sdk/pull/253) remove MaxGas const -* (wasm) [\#254](https://github.com/line/lbm-sdk/pull/254) Specify wasm event types -* (x) [\#255](https://github.com/line/lbm-sdk/pull/255) Remove legacy from modules -* (perf) [\#320](https:/github.com/line/lbm-sdk/pull/320) internal objects optimization (BaseAccount, Balance & Supply) -* (auth) [\#344](https://github.com/line/lbm-sdk/pull/344) move SigBlockHeight from TxBody into AuthInfo +* (slashing) [\#347](https://github.com/line/lbm-sdk/pull/347) Introduce VoterSetCounter +* (auth) [\#348](https://github.com/line/lbm-sdk/pull/348) Increase default valid_sig_block_period ### Bug Fixes -* (test) [\#92](https://github.com/line/lbm-sdk/pull/92) Fix SendToModuleAccountTest -* (store) [\#105](https://github.com/line/lbm-sdk/pull/105) Check `store == nil` -* (test) [\#133](https://github.com/line/lbm-sdk/pull/133) Fix `Test_runImportCmd()` -* (config) [\#138](https://github.com/line/lbm-sdk/pull/138) Fix getting coin type at running cmd -* (race) [\#159](https://github.com/line/lbm-sdk/pull/159) Fix test-race failure -* (test) [\#193](https://github.com/line/lbm-sdk/pull/193) Allow to add new validator in test network -* (client) [\#286](https://github.com/line/lbm-sdk/pull/286) Fix invalid type casting for error -* (test) [\#326](https://github.com/line/lbm-sdk/pull/326) Enable sim test and fix address related bug - + ### Breaking Changes -* (global) [\#90](https://github.com/line/lbm-sdk/pull/90) Revise module path to `github.com/line/lfb-sdk` -* (rpc) [\#97](https://github.com/line/lbm-sdk/pull/97) Send response with 404 status when quering non-exist account -* (proto) [\#106](https://github.com/line/lbm-sdk/pull/106) Rename package of proto files -* (api) [\#130](https://github.com/line/lbm-sdk/pull/130) Rename rest apis -* (auth) [\#265](https://github.com/line/lbm-sdk/pull/265) Introduce sig block height for the new replay protection -* (global) [\#298](https://github.com/line/lbm-sdk/pull/298) Treat addresses as strings -* (ostracon) [\#317](https://github.com/line/lbm-sdk/pull/317) Integrate Ostracon including vrf election and voter concept -* (global) [\#323](https://github.com/line/lfb-sdk/pull/323) Re-brand lfb-sdk to lbm-sdk -* (proto) [\#338](https://github.com/line/lbm-sdk/pull/338) Upgrade proto buf from v1beta1 to v1 ### Build, CI -* (ci) [\#234](https://github.com/line/lbm-sdk/pull/234) Fix branch name in ci script -* (docker) [\#264](https://github.com/line/lbm-sdk/pull/264) Remove docker publish +* (ci) [\#350](https://github.com/line/lbm-sdk/pull/350) Reduce sim test time ### Document Updates -* (docs) [\#205](https://github.com/line/lbm-sdk/pull/205) Renewal docs for open source -* (docs) [\#207](https://github.com/line/lbm-sdk/pull/207) Fix license -* (docs) [\#211](https://github.com/line/lbm-sdk/pull/211) Remove codeowners -* (docs) [\#248](https://github.com/line/lbm-sdk/pull/248) Add PR procedure, apply main branch -* (docs) [\#256](https://github.com/line/lbm-sdk/pull/256) Modify copyright and contributing -* (docs) [\#259](https://github.com/line/lbm-sdk/pull/259) Modify copyright, verified from legal team -* (docs) [\#260](https://github.com/line/lbm-sdk/pull/260) Remove gov, ibc and readme of wasm module -* (docs) [\#262](https://github.com/line/lbm-sdk/pull/262) Fix link urls, remove invalid reference -* (docs) [\#328](https://github.com/line/lbm-sdk/pull/328) Update quick start guide - -## [cosmos-sdk v0.42.1] - 2021-03-15 -Initial lbm-sdk is based on the cosmos-sdk v0.42.1 - -* (cosmos-sdk) [v0.42.0](https://github.com/cosmos/cosmos-sdk/releases/tag/v0.42.1). -Please refer [CHANGELOG_OF_COSMOS_SDK_v0.42.1](https://github.com/cosmos/cosmos-sdk/blob/v0.42.1/CHANGELOG.md) - diff --git a/Makefile b/Makefile index 1cd511e761..5b248255a7 100644 --- a/Makefile +++ b/Makefile @@ -258,6 +258,11 @@ endif .PHONY: run-tests test test-all $(TEST_TARGETS) +test-sim-nondeterminism-short: + @echo "Running non-determinism test..." + @go test -mod=readonly $(SIMAPP) -run TestAppStateDeterminism -Enabled=true \ + -NumBlocks=50 -BlockSize=100 -Commit=true -Period=0 -v -timeout 24h + test-sim-nondeterminism: @echo "Running non-determinism test..." @go test -mod=readonly $(SIMAPP) -run TestAppStateDeterminism -Enabled=true \ @@ -269,10 +274,18 @@ test-sim-custom-genesis-fast: @go test -mod=readonly $(SIMAPP) -run TestFullAppSimulation -Genesis=${HOME}/.gaiad/config/genesis.json \ -Enabled=true -NumBlocks=100 -BlockSize=200 -Commit=true -Seed=99 -Period=5 -v -timeout 24h +test-sim-import-export-short: runsim + @echo "Running application import/export simulation. This may take several minutes..." + @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 10 5 TestAppImportExport + test-sim-import-export: runsim @echo "Running application import/export simulation. This may take several minutes..." @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppImportExport +test-sim-after-import-short: runsim + @echo "Running application simulation-after-import. This may take several minutes..." + @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 10 5 TestAppSimulationAfterImport + test-sim-after-import: runsim @echo "Running application simulation-after-import. This may take several minutes..." @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 5 TestAppSimulationAfterImport @@ -301,7 +314,7 @@ test-sim-multi-seed-long-part3: runsim test-sim-multi-seed-short: runsim @echo "Running short multi-seed application simulation. This may take awhile!" - @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 50 10 TestFullAppSimulation + @$(BINDIR)/runsim -Jobs=4 -SimAppPkg=$(SIMAPP) -ExitOnFail 20 10 TestFullAppSimulation test-sim-benchmark-invariants: @echo "Running simulation invariant benchmarks..." diff --git a/RELEASE_CHANGELOG.md b/RELEASE_CHANGELOG.md index e06b2cf266..62a47bd4e5 100644 --- a/RELEASE_CHANGELOG.md +++ b/RELEASE_CHANGELOG.md @@ -77,6 +77,7 @@ ### Build, CI * (ci) [\#234](https://github.com/line/lbm-sdk/pull/234) Fix branch name in ci script * (docker) [\#264](https://github.com/line/lbm-sdk/pull/264) Remove docker publish +* (ci) [\#345](https://github.com/line/lbm-sdk/pull/345) Split long sim test into 3 parts ### Document Updates * (docs) [\#205](https://github.com/line/lbm-sdk/pull/205) Renewal docs for open source