Raise Maximum Gas to 300M and Lower Max Bytes to 5MB

This is a continuation of the discussion in the previous thread and will be put to chain as a text proposal on the 1st of January to approve this path of action before the next software upgrade.

Proposal Text

This proposal would signal approval for raising the block gas limit on Osmosis to 300 million while lowering the maximum size of a block in bytes to 5MB in a future software upgrade proposal.

Background

Maximum Gas

Blocks on Osmosis are composed of transactions that reserve space in the form of a request for Gas.

The Maximum Gas per block is currently set to 120,000,000, with a typical transaction requesting between 100,000 and 1,000,000 gas, depending on the complexity.

With the recent increase in transactions requiring more gas (e.g., contracts and swaps that cross tick boundaries), the Maximum gas per block has been hit more and more frequently resulting in delayed transactions for users and the base fee increasing for transactions.

This proposal asks that the Maximum Gas parameter be increased to 300,000,000, resulting in around a two and a half times increased capacity per block on Osmosis, increasing the number of transactions that can be processed per block, and so the chain’s throughput. A subsequent parameter change proposal may further increase this after the software upgrade proposal reenables these parameters.

Maximum Bytes

With 10 gas used being approximately equal to 1 byte, there is a theoretical maximum block size of 12,000,000 bytes currently. However, this is not all used, just potentially reserved within the block since the Gas Used is always lower than Gas Wanted.

Maximum size is also set lower than this as well to ensure that blocks stay manageable in size. This Maximum Bytes parameter is currently set to 10485760.

Increasing Maximum Gas increases the amount of reserved gas within a block while increasing the chances of the maximum block size being reached through increased gas usage.

As raised previously by Notional, 10MB may be too large a block size with the current implementations and should be reduced somewhat until improvements in p2p bandwidth within Tendermint are made.

While there is already a soft 25M gas per transaction cap on most nodes, which caps a single transaction to 2.5MB max, surge capacity has been needed in the past for contract uploads up to 50M gas so the proposed maximum block size is proposed to be set at 5 MB (5242880).

Implications for Fee Market

Fees will rise faster when the chain has excessive traffic with these settings. As these changes will be part of a software upgrade, they will come with adaptations to the fee market to ensure the rate of change remains reasonable.

Target On-Chain Date: 1st January 2024

3 Likes

Right now I need to twist your brain a little bit, what if we 10x the cost per byte?

Wouldn’t that need additional capacity for contract uploads then?

Honestly not my specialty, up until recently I thought Gas was the only thing that mattered here!

1 Like

Increasing each blocks capacity for gas helps to address the levana problem but it does not help to address potential spam issues related to the version of the IBC go library that osmosis currently uses.

So we could kind of end up in the same place again unless we raised the cost of bytes which seemed to me to be kind of critical to any type of harmful spam.

I support this proposal

Yeah, you mean that more transactions can be handled, but the cost of spamming the chain does not increase, right?

So (correct me if I’m wrong) you are proposing to also make transactions in general more expensive so that the cost of spamming also increases?

More expensive transactions hardly seems like the solution. Fix the loopholes for the arbitrage high gas fee enforcement and get validators to agree to set a high arb gas fee in their config.

2 Likes

It has been set higher recently, but not enforced. It was a request for the validators, not sure if it has been tracked who is using it with higher settings

Strong support from my side as well.

I support the proposal to increase the maximum gas limit per block on Osmosis to 300 million, coupled with a reduction in block size to 5 MB. These measures should enhance network performance, ensuring more efficient transaction processing. It’s crucial that corresponding fee market adjustments accompany these changes. I anticipate a positive contribution to the development of Osmosis.