# \[PROPOSAL #970\] \[ACCEPTED\] Update feemarket max\_block\_utilization to 75m gas

**URL:** <https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227>\
**Category:** Parameter Change\
**Tags:** vote-on-chain\
**Created:** [August 6, 2024, 2:42am UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227 "2024-08-06T02:42:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Reecepbcups](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/reecepbcups/32/7334_2.png) [@Reecepbcups](https://forum.cosmos.network/u/Reecepbcups)\
**Post date:** [August 6, 2024, 2:42am UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/1 "2024-08-06T02:42:14Z")

</div>

## Change log

- 2024-08-05 Created initial post
- 2024-08-08 Added JSON param message
- 2024-08-10 Updated to 75m

## Summary

In v18 the hub added a new [“feemarket” module](https://github.com/skip-mev/feemarket) from the Skip team. In the feemarket params, the max block utilization was set to just 30 million gas while the network allows up to 100 million gas per block.

This recently has led to many users questioning why their transactions have failed, at no fault to them. Leading to a desegregated user experience on the hub for interacting.

This proposal, if passed, updates the current feemarket max gas utilization to 75m (from 30m) per block, allowing for a buffer with current max gas of the network consensus params (100m).

## Details

CosmosHub Upgrade handler setting to default max to 30m gas:

> <https://github.com/cosmos/gaia/blob/release/v18.1.x/app/upgrades/v18/upgrades.go#L73>

Example of some failed transactions:

Bank multi send:

> **[Mintscan](https://www.mintscan.io/cosmos/tx/F209FCF2172594901F406D02D398B4734716F6779ADC9BB2E2D133D8F6A5042F?height=21603523)**
>
> Interchain block explorer and data analytics for sovereign blockchain networks.

IBC Ack:

> **[Mintscan](https://www.mintscan.io/cosmos/tx/54078DE2B13CE88879F832F67D033946F6F25C3693B0EEB04C29D2B2C34A2875?height=21603523)**
>
> Interchain block explorer and data analytics for sovereign blockchain networks.

unable to update fee market state: block utilization of 30000783 cannot exceed max block utilization of 30000000

You can verify current cosmoshub max\_gas block params with

```bash
go install cosmossdk.io/tools/hubl/cmd/hubl@latest
hubl cosmoshub q consensus params

```

```json
{
  "params": {
    "block": {
      "max_bytes": "2000000",
      "max_gas": "100000000"
    },
    "evidence": {
      "max_age_num_blocks": "1000000",
      "max_age_duration": "48h0m0s",
      "max_bytes": "50000"
    },
    "validator": {
      "pub_key_types": [
        "ed25519"
      ]
    }
  }
}

```

and feemarket with

```bash
gaiad q feemarket params --output=json --node=https://cosmoshub.rpc.kjnodes.com:443 | jq '.max_block_utilization'

# "30000000"

```

Read more about the feenmarket spec here

> <https://github.com/skip-mev/feemarket/blob/v1.0.4/docs/SPEC.md#maxblockutilization>

## Parameter and new value

Update Feemarket MaxBlockUtilization / max\_block\_utilization to 75000000 (75 million) while leaving all other current mainnet params the same.

```json
        {
            "@type": "/feemarket.feemarket.v1.MsgParams",
            "params": {
                "alpha": "0.000000000000000000",
                "beta": "1.000000000000000000",
                "gamma": "0.000000000000000000",
                "delta": "0.000000000000000000",
                "min_base_gas_price": "0.005000000000000000",
                "min_learning_rate": "0.125000000000000000",
                "max_learning_rate": "0.125000000000000000",
                "max_block_utilization": "75000000",
                "window": "1",
                "fee_denom": "uatom",
                "enabled": true,
                "distribute_fees": false
            },
            "authority": "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn"
        }

```

## Forum post link

> [@\[PROPOSAL #970\] \[ACCEPTED\] Update feemarket max\_block\_utilization to 75m gas](https://forum.cosmos.network/t/proposal-draft-update-feemarket-max-block-utilization-to-100m-gas/14227):
>
> Change log 2024-08-05 Created initial post 2024-08-08 Added JSON param message 2024-08-10 Updated to 75m Summary In v18 the hub added a new [“feemarket” module](https://github.com/skip-mev/feemarket) from the Skip team. In the feemarket params, the max block utilization was set to just 30 million gas while the network allows up to 100 million gas per block. This recently has led to many users questioning why their transactions have failed, at no fault to them. Leading to a desegregated user experience on the hub for interacting. Th…

## IPFS link

## Governance votes

The following items summarize the voting options and what it means for this proposal:

YES - Agree with increasing the feemarket max gas utilization.

NO - Disagree with increasing the feemarket max gas utilization.

NO WITH VETO - A ‘NoWithVeto’ vote indicates a proposal either (1) is deemed to be spam, i.e., irrelevant to Cosmos Hub, (2) disproportionately infringes on minority interests, or (3) violates or encourages violation of the rules of engagement as currently set out by Cosmos Hub governance. If the number of ‘NoWithVeto’ votes is greater than a third of total votes, the proposal is rejected and the deposits are burned.

ABSTAIN - You wish to contribute to quorum but you formally decline to vote either for or against the proposal.

---

<div class="post-metadata">

**Author:** ![jacobgadikian](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/jacobgadikian/32/6994_2.png) [@jacobgadikian](https://forum.cosmos.network/u/jacobgadikian)\
**Post date:** [August 9, 2024, 12:36pm UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/2 "2024-08-09T12:36:56Z")

</div>

50 million?

My understanding is that there’s a little bit of overhead from the fee market itself.

But 50 million sounds quite fine

---

<div class="post-metadata">

**Author:** ![Reecepbcups](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/reecepbcups/32/7334_2.png) [@Reecepbcups](https://forum.cosmos.network/u/Reecepbcups)\
**Post date:** [August 10, 2024, 1:56am UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/3 "2024-08-10T01:56:48Z")

</div>

Talked with Matija, probably targeting 60-80m. 50 isn’t enough % wise from current block fill rates.

---

<div class="post-metadata">

**Author:** ![jacobgadikian](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/jacobgadikian/32/6994_2.png) [@jacobgadikian](https://forum.cosmos.network/u/jacobgadikian)\
**Post date:** [August 10, 2024, 4:11am UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/4 "2024-08-10T04:11:29Z")

</div>

Awesome.

The 30 seemed a little bit low to me.

Thanks!

---

<div class="post-metadata">

**Author:** ![MSalopek](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/msalopek/32/7437_2.png) [@MSalopek](https://forum.cosmos.network/u/MSalopek)\
**Post date:** [August 26, 2024, 12:51pm UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/5 "2024-08-26T12:51:37Z")

</div>

Thank you for raising this!

After some data collection, it was made apparent that there are legitimate use cases for transactions with large gas usage.

Namely, these transactions are:

- various ICA transactions
- various authz transactions
- governance proposals
- governance proposals for deploying permissioned CosmWasm contracts

As stated above, the current gas limit may be problematic for above use cases where the gas usage was found to be in the 15M - 60M range.

## Additional context:

The on-chain `consensus.block.max_gas` parameter must be changed to match the `feemarket.max_block_utilization`.

The current mismatch is problematic because valid Txs would be rejected if their inclusion would exceed the `feemarket.max_block_utilization`. The transactions would not get added back to the mempool because they were marked as invalid by the app. This means the user would have to re-initiate the transaction manually. This degrades UX, as evidenced by issues that were opened on the Gaia repo.

When you check under the hood, this happens because Comet would reap and send to the app up to `consensus.block.max_gas` (100M) worth of transactions, but the app would reject all Txs after reaching `feemarket.max_block_utilization` (30M).  
To avoid further issues, the aforementioned chain params must be synchronized so the Txs that cannot fit into the current block would be added back to the mempool and attempted for inclusion on the next block.

Getting the data:

- `consensus.block.max_gas`

```json
gaiad q consensus params --node "https://cosmos-rpc.polkachu.com:443" -o json | jq .
{
  "params": {
    "block": {
      "max_bytes": "2000000",
      "max_gas": "100000000" // 100M
    },
    "evidence": {
      "max_age_num_blocks": "1000000",
      "max_age_duration": "48h0m0s",
      "max_bytes": "50000"
    },
    "validator": {
      "pub_key_types": [
        "ed25519"
      ]
    }
  }
}

```

- `feemarket.max_block_utilization`

```json
gaiad q feemarket params --node "https://cosmos-rpc.polkachu.com:443" -o json | jq .
{
  "alpha": "0.000000000000000000",
  "beta": "1.000000000000000000",
  "gamma": "0.000000000000000000",
  "delta": "0.000000000000000000",
  "min_base_gas_price": "0.005000000000000000",
  "min_learning_rate": "0.125000000000000000",
  "max_learning_rate": "0.125000000000000000",
  "max_block_utilization": "30000000", // 30M
  "window": "1",
  "fee_denom": "uatom",
  "enabled": true,
  "distribute_fees": false
}

```

## Plan of action:

### Create the proposal

The proposal should include 2 messages:

- change `feemarket.max_block_utilization` to 75M as suggested
- change `consensus.block.max_gas` to match `feemarket.max_block_utilization` (both to 75M)

This way we can avoid sending 2 proposals and instead change these parameters using a single proposal.

If the proposal ends up being too large, we can split it into 2 proposals. In that case we would first update `feemarket.max_block_utilization` to 75M and then update `consensus.block.max_gas` to match `feemarket.max_block_utilization`.

## Test the proposal changes

Before executing the proposal on a mainnet, we should first execute it on a testnet. We should set both testnets to the same values, but for simplicity let’s use `theta-testnet-001` as a reference as it has more users.

## Deploy the proposal

Upon successful testing on the testnet the proposal will be sent to mainnet (`cosmoshub-4`).  
The proposal will be subject to the standard voting period.

## Post-deployment data collection

After deployment, we should collect data on the testnet and mainnet to ensure that the changes have fulfilled their purpose and the main UX concerns have been addressed.

After some time has passed we can consider either increasing the parameters further or decreasing them to match the actual block utilization.

---

<div class="post-metadata">

**Author:** ![lexa](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/lexa/32/7415_2.png) [@lexa](https://forum.cosmos.network/u/lexa)\
**Post date:** [August 28, 2024, 1:54pm UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/6 "2024-08-28T13:54:33Z")

</div>

We’ll start testing on `theta` and report back 🫡

---

<div class="post-metadata">

**Author:** ![MSalopek](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/msalopek/32/7437_2.png) [@MSalopek](https://forum.cosmos.network/u/MSalopek)\
**Post date:** [September 16, 2024, 11:24am UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/7 "2024-09-16T11:24:21Z")

</div>

After testing on localnets and testnets it was made apparent that there is a small discrepancy in chain state between new chains and chains that have upgraded from cosmos-sdk v0.47 to v0.50.

On a local chain starting from block 1, all consensus params are correctly initialized with their zero-values.

On testnet chains that were upgraded from v0.47 it was observed that `MsgUpdateParams` on the consensus keeper fails with a panic.

The cause was identified and the issue pertains to consensus params keeper migration that only partially initialized the consensus param fields during a cosmos-sdk migration operation. This issue does not impede the normal day-to-day network operation. However, the issue prevents consensus params upgrades at this time.

The issue was fixed on cosmos-sdk:

- Issue: [[Bug]: Consensus Params fail to update via MsgUpdateParams · Issue #21483 · cosmos/cosmos-sdk · GitHub](https://github.com/cosmos/cosmos-sdk/issues/21483)
- Fix: [fix(x/consensus)!: update cons params parsing checks by MSalopek · Pull Request #21484 · cosmos/cosmos-sdk · GitHub](https://github.com/cosmos/cosmos-sdk/pull/21484)

The issue was fixed on gaia and included in the gaia v20 software upgrade:

- Fix: [fix!: initialize ConsensusParams Version field by MSalopek · Pull Request #3333 · cosmos/gaia · GitHub](https://github.com/cosmos/gaia/pull/3333)

After gaia v20 upgrade, a proposal should be submitted to the chain. The proposal will fail on execution if submitted before the gaia v20 upgrade takes place.

Proposal draft is available [here](https://pastebin.com/vvGQqBFm).

---

<div class="post-metadata">

**Author:** ![MSalopek](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.cosmos.network/msalopek/32/7437_2.png) [@MSalopek](https://forum.cosmos.network/u/MSalopek)\
**Post date:** [October 16, 2024, 10:51am UTC](https://forum.cosmos.network/t/proposal-970-accepted-update-feemarket-max-block-utilization-to-75m-gas/14227/8 "2024-10-16T10:51:38Z")

</div>

The proposal to update the consensus and feemarket params was posted on chain. You can find the proposal link [here (prop #970)](https://www.mintscan.io/cosmos/proposals/970).

If this proposal does not execute correctly (in case it is approved), there is a backup plan to submit param changes as 2 separate proposals. The backup plan would be executed the same as on testnet:

- [Ping Dashboard - Cosmos Blockchain Explorer And Web Wallet](https://explorer.polypore.xyz/provider/gov/173)
- [Ping Dashboard - Cosmos Blockchain Explorer And Web Wallet](https://explorer.polypore.xyz/provider/gov/200)

@lexa Can we update the title of this post to reflect the current status?
