diff --git a/.github/workflows/autopr.yml b/.github/workflows/autopr.yml deleted file mode 100644 index 23c6543..0000000 --- a/.github/workflows/autopr.yml +++ /dev/null @@ -1,18 +0,0 @@ -name: Pull Request Action -on: - push: - branches: - - release/* -jobs: - create-pull-request: - runs-on: ubuntu-latest - steps: - - name: Check out repository code - uses: actions/checkout@v3 - - name: pull-request - uses: repo-sync/pull-request@v2 - with: - destination_branch: "main" - github_token: ${{ secrets.GITHUB_TOKEN }} - pr_label: "release branch updated, automated pr" - pr_title: "fix: apply fix from release branch" diff --git a/.github/workflows/ci-smart-contract.yml b/.github/workflows/ci-smart-contract.yml index 5a97c0b..665d33a 100644 --- a/.github/workflows/ci-smart-contract.yml +++ b/.github/workflows/ci-smart-contract.yml @@ -8,7 +8,7 @@ on: - main env: - TEST_DOCKER_IMAGE: finschianode:smartcontractci + TEST_DOCKER_IMAGE: finschianode-proxy:smartcontractci jobs: cleanup-runs: @@ -66,8 +66,8 @@ jobs: - name: Upload build uses: actions/upload-artifact@v3 with: - name: fnsad - path: ./build/fnsad + name: fnsad-proxy + path: ./build/fnsad-proxy test-smart-contract-on-local-node: runs-on: ubuntu-latest @@ -92,7 +92,7 @@ jobs: - name: Download build uses: actions/download-artifact@v3 with: - name: fnsad + name: fnsad-proxy path: ./build - name: Build install run: make install @@ -103,14 +103,14 @@ jobs: - name: Start local node id: start run: | - fnsad start & + fnsad-proxy start & sleep 1 - name: CI test run: bash ./ci_test/queue_ci.sh shell: bash - name: Stop local node if: ${{ always() && steps.start.conclusion == 'success' }} - run: kill $(ps -ef | grep "fnsad start" | grep -v grep | awk '{print $2}') + run: kill $(ps -ef | grep "fnsad-proxy start" | grep -v grep | awk '{print $2}') build-finschia-docker-image: runs-on: ubuntu-latest @@ -161,7 +161,8 @@ jobs: docker image ls -a - name: Set configure file run: | - export FNSAD="docker run -i --rm -p 26656:26656 -p 26657:26657 -v ${pwd}/.finschia:/root/.finschia ${{ env.TEST_DOCKER_IMAGE }} fnsad" + export FNSAD="docker run -i --rm -p 26656:26656 -p 26657:26657 -v $(pwd)/.fnsap:/root/.fnsap ${{ env.TEST_DOCKER_IMAGE }} fnsad-proxy" + export CHAIN_DIR="/root/.fnsap" ./init_single.sh shell: bash # sleep 5 seconds to wait for finschia to start up @@ -170,10 +171,10 @@ jobs: run: | container_id=$(docker run -d \ -p 26656:26656 -p 26657:26657 \ - -v ${pwd}/.finschia:/root/.finschia \ + -v $(pwd)/.fnsap:/root/.fnsap \ -v $(pwd)/ci_test:/root/ci_test \ -v $(pwd)/contracts:/root/contracts \ - ${{ env.TEST_DOCKER_IMAGE }} fnsad start) + ${{ env.TEST_DOCKER_IMAGE }} fnsad-proxy start --home=/root/.fnsap) echo "container_id=$container_id" >> "$GITHUB_OUTPUT" sleep 5 - name: CI test diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 1c268cb..0000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,88 +0,0 @@ -name: Push Docker Images -# Build & Push builds the finschia docker image on every tag push - -on: - push: - tags: - - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 - - "v[0-9]+.[0-9]+.[0-9]+-*" # Push events to matching v*, i.e. v1.0-rc1, v20.15.10-alpha1 - -env: - registry: docker.io - DOCKER_REPOSITORY: finschia/finschianode - RUNNER_BASE_IMAGE_ALPINE: alpine:3.17 -jobs: - docker_build_and_push: - runs-on: ubuntu-latest - steps: - - name: Check out the repo - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - - name: Create a context for buildx - run: docker context create buildx - - - name: Set up docker buildx - id: buildx - uses: docker/setup-buildx-action@v2 - with: - endpoint: buildx - config-inline: | - [registry."docker.io"] - - - name: Login to the registry - uses: docker/login-action@v2 - with: - registry: ${{env.registry}} - username: ${{secrets.DOCKERHUB_USERNAME}} - password: ${{secrets.DOCKERHUB_TOKEN}} - - - name: Find go version - id: find_go_version - run: | - GO_VERSION=$(cat go.mod | grep -E 'go [0-9].[0-9]+' | cut -d ' ' -f 2) - echo "GO_VERSION=$GO_VERSION" >> $GITHUB_ENV - - - name: Find Ostracon version - id: find_ostracon_version - run: | - OST_VERSION=$(go list -m github.com/Finschia/ostracon | sed 's:.* ::') - echo "OST_VERSION=$OST_VERSION" >> $GITHUB_ENV - - - name: Parse tag - id: tag - run: | - ref='refs/tags/' - if [[ ${{ github.ref }} == *${ref}* ]]; then - VERSION=$(echo ${{ github.ref_name }} | sed "s/v//") - echo "VERSION=$VERSION" >> $GITHUB_ENV - else - echo "VERSION=${{ github.sha }}" >> $GITHUB_ENV - fi - - - name: Extract metadata for docker - id: meta - uses: docker/metadata-action@v4 - with: - images: ${{env.registry}}/${{env.DOCKER_REPOSITORY}} - tags: | - type=semver,pattern={{version}} - - # Build Docker image - - name: Build and push - uses: docker/build-push-action@v4 - with: - file: Dockerfile - context: . - push: true - platforms: linux/amd64,linux/arm64 - build-args: | - GO_VERSION=${{ env.GO_VERSION }} - RUNNER_IMAGE=${{ env.RUNNER_BASE_IMAGE_ALPINE }} - GIT_VERSION=${{ env.VERSION }} - GIT_COMMIT=${{ github.sha }} - OST_VERSION=${{ env.OST_VERSION }} - tags: | - ${{ env.DOCKER_REPOSITORY }}:${{ env.VERSION }} - labels: ${{steps.meta.outputs.labels}} diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml deleted file mode 100644 index f13bae1..0000000 --- a/.github/workflows/tag.yml +++ /dev/null @@ -1,24 +0,0 @@ -name: Release -# This workflow helps with creating releases. -# This job will only be triggered when a tag (vX.X.x) is pushed -on: - push: - # Sequence of patterns matched against refs/tags - tags: - - "v[0-9]+.[0-9]+.[0-9]+" # Push events to matching v*, i.e. v1.0, v20.15.10 - -jobs: - release: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install Go - uses: actions/setup-go@v4 - with: - go-version: '1.20' - - name: Create release - uses: goreleaser/goreleaser-action@v4 - with: - args: release --clean --release-notes ./RELEASE_CHANGELOG.md - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/ante/test_helpers.go b/ante/test_helpers.go index 14b2556..0fecd59 100644 --- a/ante/test_helpers.go +++ b/ante/test_helpers.go @@ -16,5 +16,9 @@ func (msc AppOptionsMock) Get(key string) any { } func DefaultTxFilter() []string { - return []string{"cosmos.bank"} + return []string{"cosmos", "lbm", "cosmwasm", "ibc"} +} + +func DefaultDisableFilter() bool { + return true } diff --git a/ante/txfilter.go b/ante/txfilter.go index 0b80a8e..e048c0f 100644 --- a/ante/txfilter.go +++ b/ante/txfilter.go @@ -83,8 +83,6 @@ func (tfd TxFilterDecorator) filterWasmLogics(msg sdk.Msg) error { } else if !tfd.Options.AllowedContract[wasmExec.Contract] { return fmt.Errorf("%s is not allowed contract", wasmExec.Contract) } - } else { - return fmt.Errorf("%s is not allowed on proxy node", sdk.MsgTypeURL(msg)) } return nil } diff --git a/ante/txfilter_test.go b/ante/txfilter_test.go index 3de3903..86ebdcf 100644 --- a/ante/txfilter_test.go +++ b/ante/txfilter_test.go @@ -39,114 +39,114 @@ func TestGenWhiteRegex(t *testing.T) { func TestTxFilterDecorator_CheckIfAllowed(t *testing.T) { tcs := []struct { msgs []sdk.Msg - pass bool - ErrStr string allowedTargets []string allowedContracts []string + ErrStr string + pass bool disableFilter bool }{ { []sdk.Msg{&banktypes.MsgSend{}}, - true, - "", []string{"cosmos.bank.v1beta1.MsgSend"}, nil, + "", + true, false, }, { []sdk.Msg{&banktypes.MsgSend{}}, - true, - "", []string{"cosmos.bank.v1beta1"}, nil, + "", + true, false, }, { []sdk.Msg{&banktypes.MsgSend{}, &stakingtypes.MsgDelegate{}}, - true, - "", []string{"cosmos.bank", "cosmos.staking"}, nil, + "", + true, false, }, { []sdk.Msg{&banktypes.MsgSend{}, &stakingtypes.MsgDelegate{}}, - true, - "", []string{"cosmos"}, nil, + "", + true, false, }, { []sdk.Msg{&banktypes.MsgSend{}, &stakingtypes.MsgDelegate{}}, - false, - "/cosmos.staking.v1beta1.MsgDelegate is not allowed on proxy node", []string{"cosmos.bank", "cosmos.sta"}, nil, + "/cosmos.staking.v1beta1.MsgDelegate is not allowed on proxy node", + false, false, }, { []sdk.Msg{&banktypes.MsgSend{}, &testdata.TestMsg{}}, - false, - "/testdata.TestMsg is not allowed on proxy node", []string{"cosmos.bank"}, nil, + "/testdata.TestMsg is not allowed on proxy node", + false, false, }, { []sdk.Msg{}, - true, - "", []string{"cosmos.bank"}, nil, + "", + true, false, }, { []sdk.Msg{&testdata.TestMsg{}}, - false, - "/testdata.TestMsg is not allowed on proxy node", nil, nil, + "/testdata.TestMsg is not allowed on proxy node", + false, false, }, { []sdk.Msg{&wasmtypes.MsgExecuteContract{Contract: "allowedAddress"}}, - true, - "", []string{"cosmwasm.wasm"}, []string{"allowedAddress"}, + "", + true, false, }, { []sdk.Msg{&wasmtypes.MsgExecuteContract{Contract: "forbiddenAddress"}}, - false, - "forbiddenAddress is not allowed contract", []string{"cosmwasm.wasm"}, []string{"allowedAddress"}, + "forbiddenAddress is not allowed contract", + false, false, }, { []sdk.Msg{&wasmtypes.MsgExecuteContract{Contract: "forbiddenAddress"}}, - true, - "", []string{"cosmwasm.wasm"}, []string{"allowedAddress"}, + "", + true, true, }, { []sdk.Msg{&wasmtypes.MsgExecuteContract{Contract: "forbiddenAddress"}}, - false, - "forbiddenAddress is not allowed contract", []string{"cosmwasm.wasm"}, []string{}, + "forbiddenAddress is not allowed contract", + false, false, }, { []sdk.Msg{&lbmwasmtypes.MsgStoreCodeAndInstantiateContract{}}, - false, - "/lbm.wasm.v1.MsgStoreCodeAndInstantiateContract is not allowed on proxy node", []string{"cosmwasm.wasm"}, nil, + "/lbm.wasm.v1.MsgStoreCodeAndInstantiateContract is not allowed on proxy node", + false, false, }, } diff --git a/ci_test/queue_ci.sh b/ci_test/queue_ci.sh index 32bfb9f..f990af7 100644 --- a/ci_test/queue_ci.sh +++ b/ci_test/queue_ci.sh @@ -3,6 +3,12 @@ FROM_ACCOUNT='alice' TOKEN_NAME='ST1' +FNSAD=${FNSAD:-fnsad-proxy} +CHAIN_DIR=${CHAIN_DIR:-~/.fnsap} +if [[ $# -gt 0 ]]; then + CHAIN_DIR=$1 +fi + # This is a function that checks if executeMsg/quertMsg is successful. check_run_info() { local result="$1" @@ -28,25 +34,25 @@ check_result() { execute_and_check_query_msg() { local query_msg="$1" local expected_result="$2" - query_result=$(fnsad query wasm contract-state smart "$CONTRACT_ADDRESS" "$query_msg") + query_result=$(${FNSAD} query wasm contract-state smart "$CONTRACT_ADDRESS" "$query_msg") check_run_info "$query_result" "$query_msg" check_result "$query_result" "$expected_result" } # store `queue.wasm` -STORE_RES=$(fnsad tx wasm store contracts/queue.wasm --from $FROM_ACCOUNT --keyring-backend test --chain-id finschia --gas 1500000 -b block -o json -y) +STORE_RES=$(${FNSAD} tx wasm store contracts/queue.wasm --from $FROM_ACCOUNT --home ${CHAIN_DIR} --keyring-backend test --chain-id finschia --gas 1500000 -b block -o json -y) CODE_ID=$(echo "$STORE_RES" | jq '.logs[] | select(.msg_index == 0) | .events[] | select(.type == "store_code") | .attributes[] | select(.key == "code_id") | .value | tonumber') # instantiate `queue.wasm` INIT_MSG=$(jq -nc '{}') -INSTANTIATE_RES=$(fnsad tx wasm instantiate "$CODE_ID" "$INIT_MSG" --label $TOKEN_NAME --admin "$(fnsad keys show $FROM_ACCOUNT -a --keyring-backend test)" --from $FROM_ACCOUNT --keyring-backend test --chain-id finschia -b block -o json -y) +INSTANTIATE_RES=$(${FNSAD} tx wasm instantiate "$CODE_ID" "$INIT_MSG" --label $TOKEN_NAME --admin "$(${FNSAD} keys show $FROM_ACCOUNT -a --home ${CHAIN_DIR} --keyring-backend test)" --from $FROM_ACCOUNT --home ${CHAIN_DIR} --keyring-backend test --chain-id finschia -b block -o json -y) CONTRACT_ADDRESS=$(echo "$INSTANTIATE_RES" | jq '.logs[] | select(.msg_index == 0) | .events[] | select(.type == "instantiate") | .attributes[] | select(.key == "_contract_address") | .value' | sed 's/"//g') # check enqueue # now: {100, 200, 300} for value in 100 200 300; do ENQUEUE_MSG=$(jq -nc --arg value $value '{enqueue:{value:($value | tonumber)}}') - RUN_INFO=$(fnsad tx wasm execute "$CONTRACT_ADDRESS" "$ENQUEUE_MSG" --from $FROM_ACCOUNT --keyring-backend test --chain-id finschia -b block -y) + RUN_INFO=$(${FNSAD} tx wasm execute "$CONTRACT_ADDRESS" "$ENQUEUE_MSG" --from $FROM_ACCOUNT --home ${CHAIN_DIR} --keyring-backend test --chain-id finschia -b block -y) check_run_info "$RUN_INFO" "$ENQUEUE_MSG" done @@ -59,7 +65,7 @@ execute_and_check_query_msg "$COUNT_MSG" "$EXPECTED_RESULT" # check dequeue # now: {200, 300} DEQUEUE_MSG=$(jq -nc '{dequeue:{}}') -RUN_INFO=$(fnsad tx wasm execute "$CONTRACT_ADDRESS" "$DEQUEUE_MSG" --from $FROM_ACCOUNT --keyring-backend test --chain-id finschia -b block -y) +RUN_INFO=$(${FNSAD} tx wasm execute "$CONTRACT_ADDRESS" "$DEQUEUE_MSG" --from $FROM_ACCOUNT --home=${CHAIN_DIR} --keyring-backend test --chain-id finschia -b block -y) check_run_info "$RUN_INFO" "$ENQUEUE_MSG" # check sum diff --git a/cli_test/cli_test.go b/cli_test/cli_test.go index 4730da1..a7a14a7 100644 --- a/cli_test/cli_test.go +++ b/cli_test/cli_test.go @@ -4,9 +4,11 @@ package clitest import ( "encoding/base64" + "encoding/hex" "errors" "fmt" "os" + "path" "path/filepath" "strconv" "strings" diff --git a/cli_test/test_helpers.go b/cli_test/test_helpers.go index 8a1d001..fb582ee 100644 --- a/cli_test/test_helpers.go +++ b/cli_test/test_helpers.go @@ -1405,6 +1405,7 @@ func newValidator(f *Fixtures, cfg testnet.Config, appCfg *fnsacmd.CustomAppConf buf := bufio.NewReader(os.Stdin) ctx.Viper.Set(proxyante.FlagTxFilter, proxyante.DefaultTxFilter()) + ctx.Viper.Set(proxyante.FlagDisableFilter, proxyante.DefaultDisableFilter()) appCfg.Pruning = cfg.PruningStrategy appCfg.MinGasPrices = cfg.MinGasPrices diff --git a/cmd/fnsad-proxy/cmd/root.go b/cmd/fnsad-proxy/cmd/root.go index 4e33ed2..c837d01 100644 --- a/cmd/fnsad-proxy/cmd/root.go +++ b/cmd/fnsad-proxy/cmd/root.go @@ -140,10 +140,10 @@ func DefaultCustomAppConfig() *CustomAppConfig { QueryGasLimit: 300000, }, TxFilter: TxFilterConfig{ - AllowedTargets: []string{"\"cosmos.bank\""}, + AllowedTargets: []string{"\"cosmos\", \"lbm\", \"ibc\", \"cosmwasm\""}, InitialBlockHeight: 0, AllowedContracts: []string{}, - DisableContractFilter: false, + DisableContractFilter: true, }, } } diff --git a/cmd/fnsad-proxy/cmd/testnet.go b/cmd/fnsad-proxy/cmd/testnet.go index 17f0cec..99547d8 100644 --- a/cmd/fnsad-proxy/cmd/testnet.go +++ b/cmd/fnsad-proxy/cmd/testnet.go @@ -120,7 +120,11 @@ func InitTestnet( nodeIDs := make([]string, numValidators) valPubKeys := make([]cryptotypes.PubKey, numValidators) - appConfig := srvconfig.DefaultConfig() + customAppTemplate, config := initAppConfig() + appConfig, ok := config.(*CustomAppConfig) + if ok { + srvconfig.SetConfigTemplate(customAppTemplate) + } appConfig.MinGasPrices = minGasPrices appConfig.API.Enable = true appConfig.Telemetry.Enabled = true diff --git a/contrib/check-upgrade-name.sh b/contrib/check-upgrade-name.sh index 0ca56d6..3a585b6 100644 --- a/contrib/check-upgrade-name.sh +++ b/contrib/check-upgrade-name.sh @@ -3,7 +3,7 @@ set -e # get module version from go.mod -module_version=$(grep -E '^module github\.com/Finschia/finschia/v.*$' go.mod | cut -d / -f 4) +module_version=$(grep -E '^module github\.com/Finschia/finschia-proxy/v.*$' go.mod | cut -d / -f 4) if [ -z "$module_version" ] then echo module version not found: you must update the script >&2 diff --git a/docker-compose.yml b/docker-compose.yml index 6c95c1b..da64bb7 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,7 +3,7 @@ version: '3' services: fnsadnode0: container_name: fnsadnode0 - image: "finschia/finschianode:localnet" + image: "finschia/finschianode-proxy:localnet" ports: - "26656-26657:26656-26657" environment: @@ -17,7 +17,7 @@ services: fnsadnode1: container_name: fnsadnode1 - image: "finschia/finschianode:localnet" + image: "finschia/finschianode-proxy:localnet" ports: - "26659-26660:26656-26657" environment: @@ -31,7 +31,7 @@ services: fnsadnode2: container_name: fnsadnode2 - image: "finschia/finschianode:localnet" + image: "finschia/finschianode-proxy:localnet" environment: - ID=2 - LOG=${LOG:-finschia.log} @@ -45,7 +45,7 @@ services: fnsadnode3: container_name: fnsadnode3 - image: "finschia/finschianode:localnet" + image: "finschia/finschianode-proxy:localnet" environment: - ID=3 - LOG=${LOG:-finschia.log} diff --git a/init_single.sh b/init_single.sh index b1fd9a7..e5b6fd7 100755 --- a/init_single.sh +++ b/init_single.sh @@ -3,13 +3,20 @@ set -ex mode="mainnet" +CONFIG_DIR=${HOME}/.fnsap +if [[ -z "${CHAIN_DIR}" ]] +then + CHAIN_DIR=${CONFIG_DIR} +fi + if [[ $1 == "docker" ]] then if [[ $2 == "testnet" ]] then mode="testnet" fi - FNSAD="docker run -i -p 26656:26656 -p 26657:26657 -v ${HOME}/.fnsap:/root/.fnsap line/finschia-proxy fnsad-proxy" + FNSAD="docker run -i -p 26656:26656 -p 26657:26657 -v ${CONFIG_DIR}:/root/.fnsap finschia/finschia-proxy fnsad-proxy" + CHAIN_DIR="/root/.fnsap" elif [[ $1 == "testnet" ]] then mode="testnet" @@ -18,7 +25,7 @@ fi FNSAD=${FNSAD:-fnsad-proxy} # initialize -rm -rf ~/.fnsap +rm -rf ${CONFIG_DIR} # TODO # Configure your CLI to eliminate need for chain-id flag @@ -30,14 +37,14 @@ rm -rf ~/.fnsap # Initialize configuration files and genesis file # moniker is the name of your node -${FNSAD} init solo --chain-id=finschia +${FNSAD} init solo --chain-id=finschia --home=${CHAIN_DIR} # configure for testnet if [[ ${mode} == "testnet" ]] then if [[ $1 == "docker" ]] then - docker run -i -p 26656:26656 -p 26657:26657 -v ${HOME}/.fnsap:/root/.fnsap line/finschia-proxy sh -c "export FNSAD_TESTNET=true" + docker run -i -p 26656:26656 -p 26657:26657 -v ${CONFIG_DIR}:/root/.fnsap line/finschia-proxy sh -c "export FNSAD_TESTNET=true" else export FNSAD_TESTNET=true fi @@ -46,12 +53,12 @@ fi # Please do not use the TEST_MNEMONIC for production purpose TEST_MNEMONIC="mind flame tobacco sense move hammer drift crime ring globe art gaze cinnamon helmet cruise special produce notable negative wait path scrap recall have" -${FNSAD} keys add jack --keyring-backend=test --recover --account=0 <<< ${TEST_MNEMONIC} -${FNSAD} keys add alice --keyring-backend=test --recover --account=1 <<< ${TEST_MNEMONIC} -${FNSAD} keys add bob --keyring-backend=test --recover --account=2 <<< ${TEST_MNEMONIC} -${FNSAD} keys add rinah --keyring-backend=test --recover --account=3 <<< ${TEST_MNEMONIC} -${FNSAD} keys add sam --keyring-backend=test --recover --account=4 <<< ${TEST_MNEMONIC} -${FNSAD} keys add evelyn --keyring-backend=test --recover --account=5 <<< ${TEST_MNEMONIC} +${FNSAD} keys add jack --home=${CHAIN_DIR} --keyring-backend=test --recover --account=0 <<< ${TEST_MNEMONIC} +${FNSAD} keys add alice --home=${CHAIN_DIR} --keyring-backend=test --recover --account=1 <<< ${TEST_MNEMONIC} +${FNSAD} keys add bob --home=${CHAIN_DIR} --keyring-backend=test --recover --account=2 <<< ${TEST_MNEMONIC} +${FNSAD} keys add rinah --home=${CHAIN_DIR} --keyring-backend=test --recover --account=3 <<< ${TEST_MNEMONIC} +${FNSAD} keys add sam --home=${CHAIN_DIR} --keyring-backend=test --recover --account=4 <<< ${TEST_MNEMONIC} +${FNSAD} keys add evelyn --home=${CHAIN_DIR} --keyring-backend=test --recover --account=5 <<< ${TEST_MNEMONIC} # TODO #if [[ ${mode} == "testnet" ]] @@ -61,17 +68,17 @@ ${FNSAD} keys add evelyn --keyring-backend=test --recover --account=5 <<< ${TEST # ${FNSAD} add-genesis-account link15la35q37j2dcg427kfy4el2l0r227xwhuaapxd 9223372036854775807link,1stake #fi # Add both accounts, with coins to the genesis file -${FNSAD} add-genesis-account $(${FNSAD} keys show jack -a --keyring-backend=test) 1000link,1000000000000stake -${FNSAD} add-genesis-account $(${FNSAD} keys show alice -a --keyring-backend=test) 1000link,1000000000000stake -${FNSAD} add-genesis-account $(${FNSAD} keys show bob -a --keyring-backend=test) 1000link,1000000000000stake -${FNSAD} add-genesis-account $(${FNSAD} keys show rinah -a --keyring-backend=test) 1000link,1000000000000stake -${FNSAD} add-genesis-account $(${FNSAD} keys show sam -a --keyring-backend=test) 1000link,1000000000000stake -${FNSAD} add-genesis-account $(${FNSAD} keys show evelyn -a --keyring-backend=test) 1000link,1000000000000stake +${FNSAD} add-genesis-account $(${FNSAD} keys show jack -a --home=${CHAIN_DIR} --keyring-backend=test) 1000link,1000000000000stake --home=${CHAIN_DIR} +${FNSAD} add-genesis-account $(${FNSAD} keys show alice -a --home=${CHAIN_DIR} --keyring-backend=test) 1000link,1000000000000stake --home=${CHAIN_DIR} +${FNSAD} add-genesis-account $(${FNSAD} keys show bob -a --home=${CHAIN_DIR} --keyring-backend=test) 1000link,1000000000000stake --home=${CHAIN_DIR} +${FNSAD} add-genesis-account $(${FNSAD} keys show rinah -a --home=${CHAIN_DIR} --keyring-backend=test) 1000link,1000000000000stake --home=${CHAIN_DIR} +${FNSAD} add-genesis-account $(${FNSAD} keys show sam -a --home=${CHAIN_DIR} --keyring-backend=test) 1000link,1000000000000stake --home=${CHAIN_DIR} +${FNSAD} add-genesis-account $(${FNSAD} keys show evelyn -a --home=${CHAIN_DIR} --keyring-backend=test) 1000link,1000000000000stake --home=${CHAIN_DIR} -${FNSAD} gentx jack 100000000stake --keyring-backend=test --chain-id=finschia +${FNSAD} gentx jack 100000000stake --home=${CHAIN_DIR} --keyring-backend=test --chain-id=finschia -${FNSAD} collect-gentxs +${FNSAD} collect-gentxs --home=${CHAIN_DIR} -${FNSAD} validate-genesis +${FNSAD} validate-genesis --home=${CHAIN_DIR} # ${FNSAD} start --log_level *:debug --rpc.laddr=tcp://0.0.0.0:26657 --p2p.laddr=tcp://0.0.0.0:26656 \ No newline at end of file diff --git a/networks/local/finschianode/Dockerfile b/networks/local/finschianode/Dockerfile index 9d3fd07..4e30315 100644 --- a/networks/local/finschianode/Dockerfile +++ b/networks/local/finschianode/Dockerfile @@ -36,7 +36,7 @@ RUN ARCH=$(uname -m) && WASMVM_VERSION=$(go list -m github.com/Finschia/wasmvm | # Add source files COPY . . -# Build fnsad binary +# Build fnsad-proxy binary RUN --mount=type=cache,target=/root/.cache/go-build \ --mount=type=cache,target=/root/go/pkg/mod \ GOWORK=off go build \ @@ -44,7 +44,7 @@ RUN --mount=type=cache,target=/root/.cache/go-build \ -tags "netgo,ledger,muslc,goleveldb" \ -ldflags \ "-X github.com/Finschia/finschia-sdk/version.Name=finschia \ - -X github.com/Finschia/finschia-sdk/version.AppName=fnsad \ + -X github.com/Finschia/finschia-sdk/version.AppName=fnsad-proxy \ -X github.com/Finschia/finschia-sdk/version.Version=${GIT_VERSION} \ -X github.com/Finschia/finschia-sdk/version.Commit=${GIT_COMMIT} \ -X github.com/Finschia/ostracon/version.TMCoreSemVer=${OST_VERSION} \ diff --git a/networks/local/finschianode/wrapper.sh b/networks/local/finschianode/wrapper.sh index 21ade35..3030429 100755 --- a/networks/local/finschianode/wrapper.sh +++ b/networks/local/finschianode/wrapper.sh @@ -3,7 +3,7 @@ ## ## Input parameters ## -BINARY=/finschia/${BINARY:-fnsad} +BINARY=/finschia/${BINARY:-fnsad-proxy} ID=${ID:-0} LOG=${LOG:-finschia.log}