Skip to content

Commit

Permalink
chore: remove simapp v1 (#23009)
Browse files Browse the repository at this point in the history
  • Loading branch information
julienrbrt authored Dec 19, 2024
1 parent 150f2d6 commit 4a073fa
Show file tree
Hide file tree
Showing 55 changed files with 195 additions and 6,120 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
# go-arch: ["amd64", "arm", "arm64"]
go-arch: ["amd64", "arm64"] # drop 32 bit support for now (and maybe forever)
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -48,19 +47,17 @@ jobs:
###################
#### Build App ####
###################
- name: Build
run: GOARCH=${{ matrix.go-arch }} make build
- name: Build v2
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=v2 make build
- name: Build with rocksdb backend
if: matrix.go-arch == 'amd64'
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="rocksdb" make build
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=v2,rocksdb make build
- name: Build with BLS12381
if: matrix.go-arch == 'amd64'
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="bls12381" make build
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=v2,bls12381 make build
- name: Build with Secp_cgo
if: matrix.go-arch == 'amd64'
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS="secp" make build
run: GOARCH=${{ matrix.go-arch }} COSMOS_BUILD_OPTIONS=v2,secp make build
###################
## Build Tooling ##
###################
Expand Down
145 changes: 0 additions & 145 deletions .github/workflows/sims-047.yml

This file was deleted.

63 changes: 0 additions & 63 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -114,46 +114,6 @@ jobs:
name: "${{ github.sha }}-integration-coverage"
path: ./tests/integration-profile.out

test-system: # v2 system tests are in v2-test.yml
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-tags: true
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
cache: true
cache-dependency-path: |
simapp/go.sum
systemtest/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/*.go
go.mod
go.sum
**/go.mod
**/go.sum
**/Makefile
Makefile
- name: Install musl lib for simd (docker) binary
if: env.GIT_DIFF
run: |
sudo apt-get install -y musl
- name: system tests v1
if: env.GIT_DIFF
run: |
make test-system
- uses: actions/upload-artifact@v4
if: failure()
with:
name: "testnet-setup"
path: ./systemtests/testnet/
retention-days: 3

repo-analysis:
runs-on: ubuntu-latest
needs: [tests, test-integration]
Expand Down Expand Up @@ -504,29 +464,6 @@ jobs:
with:
projectBaseDir: indexer/postgres/

test-simapp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.23"
check-latest: true
cache: true
cache-dependency-path: simapp/go.sum
- uses: technote-space/[email protected]
id: git_diff
with:
PATTERNS: |
**/*.go
simapp/go.mod
simapp/go.sum
- name: tests simapp
if: env.GIT_DIFF
run: |
cd simapp
go test -mod=readonly -timeout 30m -tags='norace ledger test_ledger_mock' ./...
test-simapp-v2:
runs-on: ubuntu-latest
steps:
Expand Down
1 change: 0 additions & 1 deletion docs/build/packages/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,3 @@ For more information on SDK tooling, see the [Tooling](https://docs.cosmos.netwo
## Example

* [SimApp v2](https://pkg.go.dev/cosmossdk.io/simapp/v2) - SimApp/v2 is **the** sample Cosmos SDK v2 chain. This package should not be imported in your application.
* [SimApp](https://pkg.go.dev/cosmossdk.io/simapp) - SimApp is **the** sample Cosmos SDK chain. This package should not be imported in your application.
2 changes: 1 addition & 1 deletion go.work.example
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use (
./log
./math
./orm
./simapp
./simapp/v2
./tests
./tests/systemtests
./schema
Expand Down
1 change: 1 addition & 0 deletions scripts/build/build.mk
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ MOCKS_DIR = $(CURDIR)/tests/mocks
HTTPS_GIT := https://github.com/cosmos/cosmos-sdk.git
DOCKER := $(shell which docker)
PROJECT_NAME = $(shell git remote get-url origin | xargs basename -s .git)
COSMOS_BUILD_OPTIONS := v2

rocksdb_version=v9.6.1

Expand Down
63 changes: 31 additions & 32 deletions scripts/build/simulations.mk
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# TODO: This should be ported to work with SimApp v2.

#? test-sim-nondeterminism: Run non-determinism test for simapp
test-sim-nondeterminism:
@echo "Running non-determinism test..."
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=30m -tags='sims' -run TestAppStateDeterminism \
-NumBlocks=100 -BlockSize=200 -Period=0
# @echo "Running non-determinism test..."
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=30m -tags='sims' -run TestAppStateDeterminism \
# -NumBlocks=100 -BlockSize=200 -Period=0

# Requires an exported plugin. See store/streaming/README.md for documentation.
#
Expand All @@ -15,49 +16,47 @@ test-sim-nondeterminism:
# export COSMOS_SDK_ABCI_V1=<path-to-sdk>/store/streaming/abci/examples/file/file
# make test-sim-nondeterminism-streaming
test-sim-nondeterminism-streaming:
@echo "Running non-determinism-streaming test..."
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=30m -tags='sims' -run TestAppStateDeterminism \
-NumBlocks=100 -BlockSize=200 -Period=0 -EnableStreaming=true
# @echo "Running non-determinism-streaming test..."
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=30m -tags='sims' -run TestAppStateDeterminism \
# -NumBlocks=100 -BlockSize=200 -Period=0 -EnableStreaming=true

test-sim-custom-genesis-fast:
@echo "Running custom genesis simulation..."
@echo "By default, ${HOME}/.simapp/config/genesis.json will be used."
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=30m -tags='sims' -run TestFullAppSimulation -Genesis=${HOME}/.simapp/config/genesis.json \
-NumBlocks=100 -BlockSize=200 -Seed=99 -Period=5 -SigverifyTx=false
# @echo "Running custom genesis simulation..."
# @echo "By default, ${HOME}/.simapp/config/genesis.json will be used."
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=30m -tags='sims' -run TestFullAppSimulation -Genesis=${HOME}/.simapp/config/genesis.json \
# -NumBlocks=100 -BlockSize=200 -Seed=99 -Period=5 -SigverifyTx=false

test-sim-import-export:
@echo "Running application import/export simulation. This may take several minutes..."
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 20m -tags='sims' -run TestAppImportExport \
-NumBlocks=50 -Period=5
# @echo "Running application import/export simulation. This may take several minutes..."
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 20m -tags='sims' -run TestAppImportExport \
# -NumBlocks=50 -Period=5

test-sim-after-import:
@echo "Running application simulation-after-import. This may take several minutes..."
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 30m -tags='sims' -run TestAppSimulationAfterImport \
-NumBlocks=50 -Period=5

# @echo "Running application simulation-after-import. This may take several minutes..."
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 30m -tags='sims' -run TestAppSimulationAfterImport \
# -NumBlocks=50 -Period=5

test-sim-custom-genesis-multi-seed:
@echo "Running multi-seed custom genesis simulation..."
@echo "By default, ${HOME}/.simapp/config/genesis.json will be used."
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 30m -tags='sims' -run TestFullAppSimulation -Genesis=${HOME}/.simapp/config/genesis.json \
-NumBlocks=400 -Period=5
# @echo "Running multi-seed custom genesis simulation..."
# @echo "By default, ${HOME}/.simapp/config/genesis.json will be used."
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 30m -tags='sims' -run TestFullAppSimulation -Genesis=${HOME}/.simapp/config/genesis.json \
# -NumBlocks=400 -Period=5

test-sim-multi-seed-long:
@echo "Running long multi-seed application simulation. This may take awhile!"
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=2h -tags='sims' -run TestFullAppSimulation \
-NumBlocks=150 -Period=50
# @echo "Running long multi-seed application simulation. This may take awhile!"
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout=2h -tags='sims' -run TestFullAppSimulation \
# -NumBlocks=150 -Period=50

test-sim-multi-seed-short:
@echo "Running short multi-seed application simulation. This may take awhile!"
@cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 30m -tags='sims' -run TestFullAppSimulation \
-NumBlocks=50 -Period=10 -FauxMerkle=true

# @echo "Running short multi-seed application simulation. This may take awhile!"
# @cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -timeout 30m -tags='sims' -run TestFullAppSimulation \
# -NumBlocks=50 -Period=10 -FauxMerkle=true

test-sim-benchmark-invariants:
@echo "Running simulation invariant benchmarks..."
cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -benchmem -bench=BenchmarkInvariants -tags='sims' -run=^$ \
-Enabled=true -NumBlocks=1000 -BlockSize=200 \
-Period=1 -Commit=true -Seed=57 -v -timeout 24h
# @echo "Running simulation invariant benchmarks..."
# cd ${CURRENT_DIR}/simapp && go test -failfast -mod=readonly -benchmem -bench=BenchmarkInvariants -tags='sims' -run=^$ \
# -Enabled=true -NumBlocks=1000 -BlockSize=200 \
# -Period=1 -Commit=true -Seed=57 -v -timeout 24h

.PHONY: \
test-sim-nondeterminism \
Expand Down
22 changes: 0 additions & 22 deletions scripts/init-simapp.sh

This file was deleted.

Loading

0 comments on commit 4a073fa

Please sign in to comment.