BitCannaGlobal / bcna

BitCanna Blockchain based on Cosmos SDK
https://www.bitcanna.io
Apache License 2.0
51 stars 81 forks source link

V4 Include upgrade code to fix Consensus Params Error at DEVNET-1 #425

Closed RaulBernal closed 19 hours ago

RaulBernal commented 2 days ago

Errors during upgrade; Upgrade code need to set CONSENSUS PARAMS

Started BitCanna Node.
3:12PM INF starting node with ABCI CometBFT in-process module=server
3:12PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
3:12PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
3:12PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
3:12PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
3:12PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
3:12PM INF service start impl=EventBus module=events msg="Starting EventBus service"
3:12PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
3:12PM INF service start impl=IndexerService module=txindex msg="Starting IndexerService service"
3:12PM INF ABCI Handshake App Info hash=C72CD99388667F450EB61F10A8B121296DBD248AFCBEA290711D9FBBEB344C89 height=9749839 module=consensus protocol-version=0 software-version=4.0.0-rc3
3:12PM INF ABCI Replay Blocks appHeight=9749839 module=consensus stateHeight=9749839 storeHeight=9749840
3:12PM INF Replay last block using real app module=consensus
3:12PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server
3:12PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server
3:12PM INF applying upgrade "stickyfingers" at height: 9749840 module=x/upgrade
.....
.....
5:19PM INF received complete proposal block hash=1CA61B53E12819B67D671DC58D4ABFBDD2D01DA7C0320E77C3B05C27A6A18BD6 height=9749881 module=consensus
5:19PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server
5:19PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server
5:19PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server
5:19PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server
5:19PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server
5:19PM ERR failed to get consensus params err="collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams" module=server

Currently:

bcnad q consensus params
rpc error: code = Unknown desc = rpc error: code = Internal desc = collections: not found: key 'no_key' of type github.com/cosmos/gogoproto/tendermint.types.ConsensusParams: unknown request

Normal behavior:

bcnad q consensus params
params:
  block:
    max_bytes: "22020096"
    max_gas: "-1"
  evidence:
    max_age_duration: 48h0m0s
    max_age_num_blocks: "100000"
    max_bytes: "1048576"
  validator:
    pub_key_types:
    - ed25519
  version: {}
RaulBernal commented 2 days ago

Use this as reference to fix it: https://github.com/BitCannaGlobal/bcna/commit/3d2d9347dfe3071f745240949f5a21b93212d228#diff-aeec7ddb4cf8b7e9e6e57625770d369cce5f377cc350b42c3aca0427bba8dfbcR40

RaulBernal commented 1 day ago

https://github.com/BitCannaGlobal/bcna/pull/426

Done for V4 MainNET.

Devnet-1 requires comment all the new modules installation and the deleting of the old custom modules. For to fix Devnet-1 we need make a new branch

RaulBernal commented 19 hours ago

Completed at #429

RaulBernal commented 19 hours ago

TESTED: Consensus is fixed:

bcnad q consensus params
params:
  block:
    max_bytes: "1048576"
    max_gas: "-1"
  evidence:
    max_age_duration: 48h0m0s
    max_age_num_blocks: "100000"
    max_bytes: "1048576"
  validator:
    pub_key_types:
    - ed25519