Skip to content

Commit

Permalink
chore: change consensus.block.max_size to 4 MB (#2288)
Browse files Browse the repository at this point in the history
* chore: change consensus.block.max_size to 10MB

* added more notes

* changelog

* update release notes and changelog

* release notes: validator notes

---------

Co-authored-by: Adam Moser <[email protected]>
  • Loading branch information
robert-zaremba and toteki authored Oct 17, 2023
1 parent 273efb4 commit 08d3247
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
### Improvements

- [2285](https://github.com/umee-network/umee/pull/2285) Upgrade Cosmos SDK to v0.46.15.
- [2288](https://github.com/umee-network/umee/pull/2288) Change `consensus.block.max_size` to 6MB.

### Bug Fixes

Expand Down
17 changes: 12 additions & 5 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,24 @@ Highlights:
- Add spot price fields to account summary, and ensure all other fields use leverage logic prices.
- Fix avg params storage for x/oracle.
- Emergency Groups are able to do security adjustments in x/metoken.
- Reduced `consensus.block.max_size` to 4 MB.

[CHANGELOG](CHANGELOG.md)

### Emergency Groups
### meTokens

Currently, any parameter update requires going through a standard governance process, which takes 4 days. In a critical situation we need to act immediately:
_meTokens_ is an abbreviation for Multi-Variant Elastic Tokens. We describe them as a general-purpose packaged asset builder. Simply put, they are tools to index multiple assets, which allows holders to build composable indexes that spread the risk associated with each asset bundled in an index.

- Control IBC Quota parameters (eg disable IBC)
- apply safe updates to oracle, leverage or incentive module parameters.
MeTokens offer a way to build DeFi alternatives to TradFi and Web2 financial products. Think of a better, more liquid version of ETFs or mortgage-backed securities. The scope of buildable products will vary from builder to builder as the protocol allows for the creation of some of the most diverse use cases in the Cosmos Ecosystem.

Emergency Group can trigger safe parameter updates at any time as a standard transaction. The Emergency Group address is controlled by the Umee Chain governance (`x/gov`) and can be disabled at any time.
### Validators

Following recent [asa-2023-002](https://forum.cosmos.network/t/amulet-security-advisory-for-cometbft-asa-2023-002/11604) security advisory we decreased the max block size to 4 MB.
Based on Notional [analysis](https://github.com/notional-labs/placid#reduce-the-size-of-your-chains-mempool-in-bytes), mempool size should be adjusted as well. We recommend to set it to `15 * 4 MB` (15 x block size):

```toml
max_txs_bytes = 60000000
```

### Upgrade instructions

Expand Down
9 changes: 9 additions & 0 deletions app/upgrades.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,15 @@ func (app *UmeeApp) registerUpgrade6_1(planName string, upgradeInfo upgradetypes
oracleUpgrader := oraclemigrator.NewMigrator(&app.OracleKeeper)
oracleUpgrader.ExgRatesWithTimestamp(ctx)

// reference: (today) avg block size in Ethereum is 170kb
// Cosmwasm binaries can be few hundreds KB up to 3MB
// our blocks with oracle txs as JSON are about 80kB, so protobuf should be less than 40kB.
var newMaxBytes int64 = 4_000_000 // 4 MB
p := app.GetConsensusParams(ctx)
ctx.Logger().Info("Changing consensus params", "prev", p.Block.MaxBytes, "new", newMaxBytes)
p.Block.MaxBytes = newMaxBytes
app.StoreConsensusParams(ctx, p)

return app.mm.RunMigrations(ctx, app.configurator, fromVM)
},
)
Expand Down

0 comments on commit 08d3247

Please sign in to comment.