BitCannaGlobal / bcna

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

Error sending a legacy GOV param-change proposal #278

Closed RaulBernal closed 7 months ago

RaulBernal commented 10 months ago

Trying to send this "legacy" proposal at bcnad v3.x (Cosmos SDK v0.47):

bcnad tx gov submit-legacy-proposal param-change proposal_change_params_maxbytes.json --note "anti-flood" --gas auto --gas-adjustment 1.5 --gas-prices 0.001ubcna --from resources

{
"title": "Change maximum block size from 21 MB to 1MB",
  "description": "## TL:DR: \n- following a reported security advise it is recommended to make the maximum allowed block size of the BitCanna chain smaller\n- passing this proposal lowers the maximum allowed block size from 21 MB to 1 MB\n- since we use 300kB for our biggest blocks, the new maximum allowed block size still leaves a lot of room for growth\n## Description: \nIn a reported security advise (Amulet Security Advisory ASA-2023-002 and based on research from Jacob Gadikian for whom is interested) it was advised to investigate the maximum block size a chain needs.\n\nWhy are we doing this? For this we need to look at what happened elsewhere in the ecosystem. Recently we have seen spam on for example Osmosis where bots are spamming large amounts of data on chain. This causes the chain to have difficulties handling all transactions and resulting in the inability for users to use the chain (Osmosis in this case).\n\nOne counter-measure is reducing the maximum allowed size of each block. In our current settings this is limited to 21 MB, but our data shows that we are using only a fraction of that (maximum of 300kB per block).\n\nWe propose to change the maximum allowed block size to 1 MB. This is still 3 times higher than our current observed maximum, allowing for room to grow; but small enough to be prepared for on chain spam.\n\nFind more information about parameters for blocks here:\nhttps://docs.cometbft.com/v0.34/spec/abci/apps#blockparamsmaxbytes",
  "changes": [
    {
      "subspace": "baseapp",
      "key": "BlockParams",
      "value":{"max_bytes":"1048576"} 
    }
  ],
  "deposit": "50000000000ubcna"
}

We get this error:

8:58AM ERR failure when running app err="rpc error: code = Unknown desc = rpc error: code = Unknown desc = failed to execute message; message index: 0: got metadata with length 1449: metadata too long [/home/raul/go/pkg/mod/cosmossdk.io/errors@v1.0.0/errors.go:155] With gas wanted: '18446744073709551615' and gas used: '45675' : unknown request"
RaulBernal commented 7 months ago

From now we should send V1 proposals in place of v1beta1. Anyway the file doesn't contain metadata field, etc