forked from cosmos/cosmos-sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: marbar3778 <[email protected]> Co-authored-by: Marko <[email protected]> Co-authored-by: Likhita Polavarapu <[email protected]> Co-authored-by: unknown unknown <unknown@unknown>
- Loading branch information
1 parent
ca195c1
commit 2d014b2
Showing
28 changed files
with
3,137 additions
and
12 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -485,6 +485,30 @@ jobs: | |
cd simapp | ||
go test -mod=readonly -timeout 30m -tags='app_v1 norace ledger test_ledger_mock' ./... | ||
test-simapp-v2: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: "1.22" | ||
check-latest: true | ||
cache: true | ||
cache-dependency-path: go.sum | ||
- uses: technote-space/[email protected] | ||
id: git_diff | ||
with: | ||
PATTERNS: | | ||
**/*.go | ||
go.mod | ||
go.sum | ||
**/go.mod | ||
**/go.sum | ||
- name: simapp-v2-smoke-test | ||
if: env.GIT_DIFF | ||
run: | | ||
./scripts/simapp-v2-init.sh | ||
test-collections: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
This file contains 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 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 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 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 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 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,52 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -o errexit | ||
set -o nounset | ||
set -x | ||
|
||
ROOT=$PWD | ||
SIMAPP_DIR="$ROOT/simapp/v2" | ||
|
||
SIMD="$ROOT/build/simdv2" | ||
CONFIG="${CONFIG:-$HOME/.simappv2/config}" | ||
|
||
cd "$SIMAPP_DIR" | ||
go build -o "$ROOT/build/simdv2" simdv2/main.go | ||
|
||
$SIMD init simapp-v2-node --chain-id simapp-v2-chain | ||
|
||
cd "$CONFIG" | ||
|
||
# to enable the api server | ||
$SIMD config set app api.enable true | ||
|
||
# to change the voting_period | ||
jq '.app_state.gov.voting_params.voting_period = "600s"' genesis.json > temp.json && mv temp.json genesis.json | ||
|
||
# to change the inflation | ||
jq '.app_state.mint.minter.inflation = "0.300000000000000000"' genesis.json > temp.json && mv temp.json genesis.json | ||
|
||
# change the initial height to 2 to work around store/v2 and iavl limitations with a genesis block | ||
jq '.initial_height = 2' genesis.json > temp.json && mv temp.json genesis.json | ||
|
||
$SIMD keys add test_validator --indiscreet | ||
VALIDATOR_ADDRESS=$($SIMD keys show test_validator -a --keyring-backend test) | ||
|
||
$SIMD genesis add-genesis-account "$VALIDATOR_ADDRESS" 1000000000stake | ||
$SIMD genesis gentx test_validator 1000000000stake --keyring-backend test | ||
$SIMD genesis collect-gentxs | ||
|
||
$SIMD start & | ||
SIMD_PID=$! | ||
|
||
cnt=0 | ||
while ! $SIMD query block --type=height 5; do | ||
cnt=$((cnt + 1)) | ||
if [ $cnt -gt 30 ]; then | ||
kill -9 "$SIMD_PID" | ||
exit 1 | ||
fi | ||
sleep 1 | ||
done | ||
|
||
kill -9 "$SIMD_PID" |
This file contains 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 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 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 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 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,8 @@ | ||
--- | ||
sidebar_position: 1 | ||
--- | ||
|
||
# `SimApp/v2` | ||
|
||
SimApp is an application built using the Cosmos SDK for testing and educational purposes. | ||
`SimApp/v2` demonstrate a runtime/v2, server/v2 and store/v2 wiring. |
Oops, something went wrong.