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