diff --git a/app/app.go b/app/app.go index a8c6f410e..5396f1770 100644 --- a/app/app.go +++ b/app/app.go @@ -618,7 +618,7 @@ func New( ) app.UpgradeKeeper.SetUpgradeHandler( - "v1.2.0", + "v1.2", func(ctx sdk.Context, plan upgradetypes.Plan, fromVM module.VersionMap) (module.VersionMap, error) { return make(module.VersionMap), nil }, diff --git a/docs/advanced/running-node-in-existing-network.md b/docs/advanced/running-node-in-existing-network.md index 93fa17523..26c0e6fc4 100644 --- a/docs/advanced/running-node-in-existing-network.md +++ b/docs/advanced/running-node-in-existing-network.md @@ -33,46 +33,69 @@ Possible options when adding Validator, Observer, Sentry or Seed nodes to existi > - Do not forget to check firewall and security settings > - We do not recommend enabling state sync for `Validator Nodes` for security reasons -- Steps: - - Init node: - - ```bash - ./dcld init "" --chain-id "" - ``` - - - Enable state sync in config `$HOME/.dcl/config/config.toml`: + - Steps: + - Init node: - ```toml - [statesync] - enable = true - - # RPC servers (comma-separated) for light client verification of the synced state machine and - # retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding - # header hash obtained from a trusted source, and a period during which validators can be trusted. - # - # For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 - # weeks) during which they can be financially punished (slashed) for misbehavior. + ```bash + ./dcld init "" --chain-id "" + ``` - rpc_servers = "http(s)://:,http(s)://:" - trust_height = - trust_hash = "" - trust_period = "168h0m0s" - ``` + - Enable state sync in config `$HOME/.dcl/config/config.toml`: - > **_NOTE:_** You should provide at least 2 addresses for `rpc_servers`. It can be 2 identical addresses + ```toml + [statesync] + enable = true + + # RPC servers (comma-separated) for light client verification of the synced state machine and + # retrieval of state data for node bootstrapping. Also needs a trusted height and corresponding + # header hash obtained from a trusted source, and a period during which validators can be trusted. + # + # For Cosmos SDK-based chains, trust_period should usually be about 2/3 of the unbonding time (~2 + # weeks) during which they can be financially punished (slashed) for misbehavior. + + rpc_servers = "http(s)://:,http(s)://:" + trust_height = + trust_hash = "" + trust_period = "168h0m0s" + ``` - You can use the following command to obtain `` and `` of your network + > **_NOTE:_** You should provide at least 2 addresses for `rpc_servers`. It can be 2 identical addresses - ```bash - curl -s http(s)://:/commit | jq "{height: .result.signed_header.header.height, hash: .result.signed_header.commit.block_id.hash}" - ``` + You can use the following command to obtain `` and `` of your network - - `` - RPC endpoint host of the network being joined - - `` - RPC endpoint port of the network being joined + ```bash + curl -s http(s)://:/commit | jq "{height: .result.signed_header.header.height, hash: .result.signed_header.commit.block_id.hash}" + ``` - - Run the new node (refer to [running-node.md](../running-node.md) for node specific instructions) + - `` - RPC endpoint host of the network being joined + - `` - RPC endpoint port of the network being joined + +
+ Example for Testnet 2.0 (clickable) + + ```yaml + config: + statesync: + enable: true + rpc_servers: "https://on.test-net.dcl.csa-iot.org:26657,https://on.test-net.dcl.csa-iot.org:26657" + ``` + +
+ +
+ Example for Mainnet (clickable) + + ```yaml + config: + statesync: + enable: true + rpc_servers: "https://on.dcl.csa-iot.org:26657,https://on.dcl.csa-iot.org:26657" + ``` +
+ + - Run the new node (refer to [running-node.md](../running-node.md) for node specific instructions) - > **_NOTE:_** State sync is not attempted if the node has any local state (LastBlockHeight > 0) + > **_NOTE:_** State sync is not attempted if the node has any local state (LastBlockHeight > 0) - Pros: - No manual activities are needed (except configuring `$HOME/.dcl/config/config.toml`) @@ -109,6 +132,7 @@ Possible options when adding Validator, Observer, Sentry or Seed nodes to existi - All binary versions used for upgrading (using `cosmovisor`) existing network up to current state must be available - Steps: - Add a node with a binary version as was at the genesis state + - For Main Net: please use [0.12.1](https://github.com/zigbee-alliance/distributed-compliance-ledger/releases/tag/v0.12.1) as a start version. - Let the nodes catch-up and play all updates/migrations - Pros: diff --git a/integration_tests/upgrade/add-new-node-after-upgrade.sh b/integration_tests/upgrade/add-new-node-after-upgrade.sh index b2e3cd567..ae9727f88 100644 --- a/integration_tests/upgrade/add-new-node-after-upgrade.sh +++ b/integration_tests/upgrade/add-new-node-after-upgrade.sh @@ -5,7 +5,7 @@ localnet_dir=".localnet" dcl_user_home="/var/lib/dcl" DCL_DIR="$dcl_user_home/.dcl" mainnet_stable_version="0.12.1" -latest_release_binary_version="1.2.0" +latest_release_binary_version="1.2.2-pre" node_name="new-observer" node_p2p_port=26670 diff --git a/integration_tests/upgrade/test-upgrade.sh b/integration_tests/upgrade/test-upgrade.sh index cec29290b..cf33b0fbd 100755 --- a/integration_tests/upgrade/test-upgrade.sh +++ b/integration_tests/upgrade/test-upgrade.sh @@ -202,9 +202,9 @@ trustee_account_2="alice" trustee_account_3="bob" vendor_account="vendor_account" -plan_name="v1.2.0" -binary_version="v1.2.0" -upgrade_checksum="sha256:bceea1cf60260e870001bf958ec7b52d694050d53184c23f13314f3930070df3" +plan_name="v1.2" +binary_version="v1.2.2-pre" +upgrade_checksum="sha256:d1634c52c1fcc7eb529a51c41f626d9183690a18951c27756ac794a32be6526a" vid=1 pid_1=1 pid_2=2 diff --git a/x/compliance/module.go b/x/compliance/module.go index 7bf975958..baeaf9b2e 100644 --- a/x/compliance/module.go +++ b/x/compliance/module.go @@ -155,7 +155,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 1 } +func (AppModule) ConsensusVersion() uint64 { return 2 } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {} diff --git a/x/model/module.go b/x/model/module.go index 1ba59944d..673f7fae2 100644 --- a/x/model/module.go +++ b/x/model/module.go @@ -157,7 +157,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw } // ConsensusVersion implements ConsensusVersion. -func (AppModule) ConsensusVersion() uint64 { return 1 } +func (AppModule) ConsensusVersion() uint64 { return 2 } // BeginBlock executes all ABCI BeginBlock logic respective to the capability module. func (am AppModule) BeginBlock(_ sdk.Context, _ abci.RequestBeginBlock) {}