github osmosis-labs/osmosis v6.3.0
v6.3.0 - Fast IAVL & Minimum Fee for High Gas Fee Transactions

latest releases: adam/sqs-v26-testing, v25.2.0, v25.1.3...
2 years ago

Release v6.3.0 is state-machine compatible with 6.0.0 and contains 2 notable changes.

First, an upgrade to the fast storage version of iavl and cosmos-sdk. It introduces significant query and iteration performance improvements.

Second, a mempool filter for high gas fee transactions to have non-zero fee requirements.

Fast Storage Upgrade

Background

Historically IAVL has had a very slow performance during state machine execution, and for responding to queries to live state. This release speeds up these routines by an order of magnitude, alleviating large amounts of pressure from all users of the IAVL database.

Details

This release introduces an auxiliary fast storage system to IAVL, which represents a copy of the latest state much more amenable to efficient querying and iteration.

Prior to this release, all data gets & iterations suffered two significant performance drawdowns:

  • Every get/iteration is forced to walk the tree structure
  • Every node (including leaves) is stored on a disk, with its key being a SHA256 hash of something. Leaves were Hash(logical key), internal nodes were indexed by their Merkle tree inner node hash as well. This breaks data locality and makes every get that should be in RAM / CPU caches instead be a random leveldb file open.
  • The fast storage nodes are instead indexed by the logical key on the disk. This allows us to preserve data locality for the latest state, significantly improving iterations and queries. (Depending on the particular benchmark, between 5-30x improvements) This implementation introduces a negligible overhead for writes.

Downgrade-re-upgrade protection

We introduced a downgrade and re-upgrade protection where we guard for potential downgrades of iavl and the subsequent enablement of the fast storage again. This is done so by storing the metadata about the current version of the storage and the latest live state stored.

Relevant Upgrades

Minimum Fee for High Gas Fee Transactions

Introduced a mempool filter for high gas fee transactions to have non-zero fee requirements. It is configurable by every full node operator.

In essence, if the gas fee exceeds a configurable threshold, we require the minimum gas price to be at least X where X is another configurable parameter.

Two parameters were introduced:

  1. max-gas-wanted-per-tx (the threshold)
    • This is only for local mempool purposes and, thus, is only run on check tx.
    • Default value of 25000000
  2. min-gas-price-for-high-gas-tx = ".0025" (the minimum price)
    • This is the minimum gas fee any transaction with a high gas demand should have, denominated in uosmo per gas
    • Default value of ".0025"
      • Implies that a transaction with 1 million gas costs (.0025 uosmo/gas) * 1_000_000 gas = .0025 osmo

Check out the full changelog here: https://github.com/osmosis-labs/osmosis/blob/v6.3.0/CHANGELOG.md !

Don't miss a new osmosis release

NewReleases is sending notifications on new releases.