Skip to content

Latest commit

 

History

History
675 lines (559 loc) · 63.1 KB

File metadata and controls

675 lines (559 loc) · 63.1 KB

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

Unreleased

  • ...

v2.11.0

EVM reliability got tighter, gasless onboarding got broader, and CometBFT got a critical security patch. Plus: passkey (ERC-4337) building blocks and better consensus determinism.

1 - Main Highlights

  • Fixed - Successful EVM transactions were sometimes shown as failed due to Cosmos SDK gas-meter issues. No longer. (#2521)
  • New - Governance-allowlisted "always zero gas" EVM contracts can be called by any sender with no gas balance, as long as value is 0. (#2517)
  • Improved - Precompiles now report gas cleanly with dynamic handling, and SDK out-of-gas panics are recovered into normal errors instead of crashing the node. (#2516)
  • Security - Upgraded CometBFT to patched v0.37.18 for CSA-2026-001 (Tachyon), a critical consensus-level issue affecting block time guarantees. (#2512)
  • Consensus safety - Removed nondeterministic Go map iteration in consensus-critical paths (oracle + EVM state commit), addressing intermittent apphash mismatches. (#2503)
  • New - Passkey-secured smart accounts (ERC-4337 style) with P-256 signatures: contracts, SDK, and bundler tooling for developers. (#2443, #2493, #2500)
  • New - Sai trading: EVM trader service. Trades against local network. (#2440)

2 - Added Passkeys + Account Abstraction (ERC-4337)

What it enables: A passkey-secured smart account flow (ERC-4337 style) for Nibiru EVM development and end-to-end testing, built around P-256 signatures.

Includes:

  • PasskeyAccount and PasskeyAccountFactory contracts (minimal ERC-4337 account abstraction, P-256–secured) (#2443)
  • TypeScript passkey-sdk for building UserOperations and talking to a bundler (#2443)
  • Bundler for passkey transactions (#2493)
  • Published passkey-bundler package (#2500)
  • Tooling and docs updates for deploying the factory, running a bundler, and E2E testing the flow

Status: This is primarily a developer-facing foundation (contracts + SDK + bundler workflow). Available for integrators today; coming to end-user surfaces as apps integrate.

3 - Expanded Gasless EVM Calls ("Zero Gas")

What it enables: First-time onboarding and "no gas balance" execution for calls into governance-allowlisted contracts.

How it works:

  • If a transaction calls a governance-allowlisted contract and value == 0, the chain marks it as "zero gas" early in the ante handler.
  • It then skips gas-related checks (fee deduction, balance-vs-cost checks, mempool min gas price checks, and RefundGas) while still enforcing account checks and CanTransfer.
  • A governance-managed list ZeroGasActors.always_zero_gas_contracts allows any sender to invoke specific EVM contracts with zero gas.

Governance: This is controlled by a governance-managed allowlist. Manage via sudo edit-zero-gas and the always_zero_gas_contracts field.

4 - Precompiles: Dynamic Gas + Clean Failure Mode

Key Takeaway: More predictable gas reporting around precompiles and fewer confusing failure modes under OOG.

  • FunToken precompile now supports the dynamic-precompile flow so gas accounting and reporting match the EVM's expectations (better tracing and estimation behavior). (#2516)
  • Removed redundant internal gas deductions that could double-report gas changes to tracers.
  • SDK out-of-gas panics inside bounded meters are recovered and returned as normal out-of-gas errors, so execution fails cleanly instead of crashing the process. (#2447)

5 - Fixed - EVM "False Failed" Transactions

Symptom: Explorers and receipts could show failure even when the EVM execution actually succeeded, triggered by late Cosmos SDK gas-meter errors.

Fix: EVM execution is treated as the ground truth. If the SDK gas meter errors after a successful EVM result, the node logs the issue but does not flip the transaction to failed. (#2521)

What to expect after upgrading: Successful EVM transactions should no longer appear as failed solely due to gas-meter misalignment. Any remaining SDK gas-meter issues should surface as logs, not incorrect tx status.

6 - Fixed - Consensus Determinism (No More Random Map Order)

Why it matters: Go map iteration is nondeterministic and can cause consensus failures when order affects state writes or event emission.

Fixes included:

  • Sorted iteration for oracle validator performance processing and event emission
  • Sorted account address processing in the EVM StateDB commit path
  • Addresses intermittent apphash mismatches observed on long-running mainnet nodes (#2503)

7 - Security Patch - CometBFT CSA-2026-001 (Tachyon)

This release upgrades CometBFT to v0.37.18, which includes the required fix for CSA-2026-001. (#2512)

What class of issue is this? A consensus-level vulnerability in CometBFT's "BFT Time" implementation, stemming from an inconsistency between commit signature verification and block time derivation. The advisory labels it Critical and notes it impacts validators and protocols that rely on block timestamps.

Operator guidance: Treat this upgrade as high priority if you run validators or timestamp-sensitive applications. Upgrade to nibid v2.11.0 (or later) to receive the patched CometBFT.

8 - Appendix for v2.11.0

For Builders

  • Tx status correctness — Successful EVM calls should no longer be mislabeled as failed due to SDK gas-meter issues.
  • Gasless calls — If your contract is allowlisted under always_zero_gas_contracts, any sender can call it with value == 0 and no gas balance.
  • Precompile behavior — Expect cleaner out-of-gas error surfaces and more accurate gas reporting around dynamic precompiles.
  • Passkeys / account abstraction — New contracts and SDK exist for passkey-secured ERC-4337 flows; good time to prototype onboarding without seed phrases.
  • CLI flags — Transaction flags are more concise by default so developers can see command-specific flags more clearly. (#2449)

For Operators / Validators

  • Upgrade type: Release tag and GitHub release; mainnet upgrade applies the same workflow as other versions.
  • Steps: Upgrade binary to nibid v2.11.0, restart. Standard upgrade procedure—no extra state migrations or config changes known.
  • Priority: High. The CometBFT CSA-2026-001 fix is critical for consensus safety.
  • Monitoring checklist:
    • Watch for any lingering "gas-meter misalignment" logs (should not flip tx status).
    • Validate precompile-heavy workloads (FunToken, Wasm, oracle precompiles) for expected behavior under load.
    • Confirm determinism fixes reduce apphash mismatch risk on long-running nodes.

For Contributors / Repo Maintainers

  • Internal Cosmos-SDK moved under internal/cosmos-sdk for smoother core edits. (#2451)
  • Collections library merged into repo; gnark-crypto and go-kzg-4844 updated for compatibility. (#2490)
  • CI / Docker workflow cleanup; release tag trigger fixes.
  • Duplicate nibid add-genesis-account command removed (use nibid genesis add-genesis-account). (#2448)
  • fix(ci): fix release tag trigger
  • feat: upgrade v2.10 in #2504 - (5cfc50e)
  • refactor: omit unnecessary reassignment in #2470 - (8916455)
  • fix(Dockerfile): copy over files before "go mod download"

Refactors and Tech Debt Improvements

  • fix(internal/cosmos-sdk): resolve ledger error in tests using build tags in #2505 - (9547d17)
  • docs: remove duplicate word in comment in #2430 - (798b6d2)
  • sai-trading: project scaffolding with script to deploy all Sai contracts in #2433 - (f77f32f)

Dependencies and CI

  • ci(docker): simplify workflows; free more disk space to fix docker builds; combine into docker.yml
  • docs(changelog): update with version 2.9 and 2.8; fix(justfile/gen-changelog): use config from current branch, not main in #2465 - (9acdf4e)
  • ci(dependabot.yml): ignore updates to Cosmos-SDK, CometBFT, and Wasmd, as they are often breaking changes

v2.9.0

Changes:

  • fix(evmante): use deterministic ResponseDeliverTx gas wanted and gas consumed on failed EVM tx; nonce increment on the ctx should only happen in DeliverTx and ReCheckTx, not CheckTx in #2434 - (68bb5ba)
  • ci(golangci-lint): update linter version to latest (v2.6.1); improve CI caching in #2431 - (ba418d7)

v2.8.0 - 2025-10-28

  • test(oracle): refactor oracle tests to not require running full blockchain networks, keeping them fast, deterministic, and stable in #2425 - (5ff2e08)
  • evm: rewrite eth_estimateGas for panic safety and performance in #2424 - (37dba0a)
  • chore: remove evm-core-ts and move it to ts-sdk in #2423 - (e1401f6)
  • docs(bank): README fixes
  • docs(bank): improve documentation and add section on Nibiru changes in #2421 - (172c008)
  • feat: add recursive check for nested authz exec messages and enforce … in #2420 - (3cdc810)
  • ci: simplify Go caching in CI to prevent file collisions in #2419 - (b1d1c22)
  • fix(evmstate/test): stabilize trace tx tests with deterministic ERC20 transfer recipient in #2418 - (b47e3bd)
  • feat: custom ante NewDeductFeeDecorator allowing 0 fee for zero gas actors in #2415 - (09e58ab)
  • ci: add back coverage reporting using gocovmerge; bring README more up to date in #2416 - (63257f0)
  • refactor(upgrades): simplify upgrade hanlder code to use less abstractions and combine micro-packages in #2413 - (74cb33e)
  • fix(evm-rpc): remove unsafe debug API methods. in #2412 - (e2a1ee8)
  • chore: v2.8.0 upgrade handler in #2411 - (9000cf3)
  • fix(evm-trace-block): handle native tracer errors JSON-RPC errors for "debug_traceBlockByNumber". Fixes Nibiru#2400 bug in #2409 - (e44cbc5)
  • docs: merge PR from @yinwenyu6 . Comments only
  • feat(evm/grpc-query): Update the "/eth.evm.v1.Query/Balance" query to work with "0x" Ethereum hex and "nibi"-prefixed Bech32 address formats in #2410 - (1bfc24d)
  • feat(proto): REST API doc generation for bank, auth, and txs in #2394 - (5dbb398)
  • feat(sudo-ante): implement zero gas actors for invoking whitelisted contract in #2407 - (6316bcd)
  • chore: added monad logo svg in #2406 - (90b951c)
  • chore: additional coin logos which could be used externally in #2405 - (6bb649b)
  • feat(epic-evm): rearchitecture for StateDB safety, fix for consensus failures, performance improvements, consistent simulations, and nonce resolution for pending txs in the mempool in #2397 - (a252c9b)
  • chore: erc20 token registry new token: ynETHx in #2395 - (9219a94)
  • feat(proto): impl script for gRPC Gateway REST doc generation in #2391 - (eb4b67e)
  • chore: erc20 token registry new tokens: cbBTC, uBTC in #2388 - (c1229d0)
  • feat(evm): 63/64 gas clamp for ERC20 calls. Improved VM error surfacing. Add composite Chainlink-like oracle in #2385 - (2f7dbb5)
  • feat(.github/pr-title-lint): Enable "/", capital letters, and "evm" prefix in pull request titles in #2387 - (4d1e13d)
  • feat(ai): start .cursorignore and Gemini code reviews in #2386 - (412abe7)

v2.7.0 - 2025-09-15

  • #2345 - feat(evm): add "eth.evm.v1.MsgConvertEvmToCoin" tx for ERC20 to bank coin conversions with a non-Ethereum transaction. This change introduces new message types, CLI commands, and keeper logic to cover both directions of conversion, including special-case handling for NIBI via WNIBI.
  • #2353 - refactor(oracle): remove dead code from asset registry
  • #2371 - feat(evm): fix UnmarshalJSON to accept ASCII hex strings
  • #2372 - feat(tokenfactory-cli): add CLI commands for set denom functions
  • #2375 - feat(evm): Inject WNIBI.sol for non-mainnet networks in the v2.7.0 upgrade handler
  • #2379 - fix(evm): disallow permissionless creation of FunToken mappings when tokens do not already have metadata.
  • #2381 - feat(evm): Overwrite ERC20 metadata for stNIBI on Nibiru Testnet 2, and make the contract upgradeable.

Dependencies

  • Bump base-x from 3.0.10 to 3.0.11 (#2355)
  • Bump pbkdf2 from 3.1.2 to 3.1.3 (#2356)
  • Bump sha.js from 2.4.11 to 2.4.12 (#2366)
  • Bump github.com/ulikunitz/xz from 0.5.11 to 0.5.14 (#2370)
  • Bump cipher-base from 1.0.4 to 1.0.6 (#2367)
  • Bump github.com/hashicorp/go-getter from 1.7.5 to 1.7.9 (#2364)
  • Bump axios from 1.9.0 to 1.12.1 (#2383)

v2.6.0 - 2025-08-05

  • #2331 - test(evm-e2e): WNIBI tests for deposit, transfer and total supply
  • #2334 - feat(evm-embeds): Publish new version for @nibiruchain/solidity@0.0.6, which updates NibiruOracleChainLinkLike.sol to have additional methods used by Aave.
  • #2340 - fix: evm indexer proper parsing of the start block
  • #2344 - feat(evm): Add some evm messages into the evm codec.
  • #2346 - fix(buf-gen-rs): improve Rust proto binding generation script robustness and get it to work with a forked Cosmos-SDK dependency and exit correctly on failure
  • #2348 - fix(oracle): max expiration a label rather than an invalidation for additional query liveness
  • #2350 - fix(simapp): sim tests with empty validator set panic
  • #2352 - chore(token-registry): Add bank coin versions of USDC and USDT from Stargate and LayerZero, and update ErisEvm.sol to fix redeem
  • #2354 - chore: linter upgrade to v2
  • #2357 - fix: proper statedb isolation in nibiru bank_extension

Dependencies

  • Bump form-data from 4.0.1 to 4.0.4 (#2347)
  • Bump golang.org/x/oauth2 from 0.16.0 to 0.27.0 (#2342)
  • Bump undici from 5.28.5 to 5.29.0 (#2310)
  • Bump base-x from 3.0.10 to 3.0.11 (#2307)

v2.5.0 - 2025-06-09

  • #2311 - refactor: use Go's built-in min and max functions to simplify logic
  • #2314 - refactor(upgrades): add public keepers to upgrade handlers + DRY improvements
  • #2315 - feat(upgrades): implement v2.5.0 upgrade handler that modifies the stNIBI ERC20 and Bank Coin metadata in place
  • #2316 - feat(ux): add GET behavior to the Ethereum JSON-RPC endpoints for Nibiru so they return info instead of a blank page or error.
  • #2324 - fix(evm): adjust the v2.5.0 upgrade handler to maintain the original stNIBI ERC20 contract's state.
  • #2327 - fix(eth): implement unmarshal json for TransactionReceipt
  • #2329 - fix(eth): use evm RPC in tx_info_test
  • #2328 - fix(evm): ensure StateDB doesn't persist between EVM calls

v2.4.0 - 2025-05-29

  • #2274 - feat(evm)!: update to geth v1.13 with EIP-1153, PRECOMPILE_ADDRS, and transient storage support
  • #2275 - feat(evm)!: update to geth v1.14 with tracing updates and new StateDB methods.
    • This upgrade keeps Nibiru's EVM on the Berlin upgrade to avoid incompatibilities stemming from functionality specific to Ethereum's consensus setup. Namely, blobs (Cancun) and Verkle additions for zkEVM.
    • The jump to v1.14 was necessary to use an up-to-date "cockroach/pebble" DB dependency and leverage new generics features added in Go 1.23+.
  • #2289 - fix(eth-rpc): error propagation fixes and tests for the methods exposed by Nibiru's EVM JSON-RPC
  • #2290 - refactor: use importas linter for consistent imports
  • #2296 - chore(ci): use shell script for generating changelog in releases
  • #2297 - fix(evm): fix error handling for revert errors
  • #2298 - fix(eth-rpc): clean up error propagation and descriptions in eth namespace
  • #2300 - refactor(eth-rpc): combine rpc/backend and rpc/rpcapi since they essentially one package
  • #2301 - fix(.github): glob patterns broken in nibiru-go filter for dorny/paths-filter
  • #2306 - feat(evm): add v2.4.0 upgrade handler
  • #2303 - test(eth/rpc/rpcapi): increase coverage of the rpcapi package using JSON-RPC calls

Dependencies

  • Bump golang.org/x/net from 0.37.0 to 0.39.0. (#2284)
  • Bump github.com/golang-jwt/jwt/v4 from 4.5.1 to 4.5.2 (#2294)

v2.3.0 - 2025-04-22

  • #2242 - feat(tokenfactory): tx msg SudoSetDenomMetadata
  • #2244 - refactor(test): update how tests are wired with NewNibiruTestApp
  • #2250 - refactor(ci): separate builds by platform and without goreleaser
  • #2251 - feat(evm): add ERC20 contract with metadata updates
  • #2249 - fix(evm): resetting gas meter for afterOp in bank extension
  • #2257 - fix: simulation tests by register interfaces for vesting and use correct app keys field
  • #2260 - feat(evm): add getErc20Address method to IFunToken
  • #2268 - fix(evm): gas limit for erc20 deploy
  • #2240 - feat: add depinject wiring and wire x/auth module
  • #2246 - feat: add depinject wiring for x/bank module
  • #2248 - feat: add depinject wiring for x/staking module
  • #2253 - feat: add depinject wiring for x/distribution module
  • #2254 - feat: add depinject wiring for x/crisis module
  • #2259 - feat: add depinject wiring for all sdk modules
  • #2261 - feat: add depinject wiring for x/sudo module
  • #2262 - feat: add depinject wiring for x/oracle module
  • #2263 - feat: add depinject wiring for x/epochs module
  • #2265 - feat: add depinject wiring for x/inflation module
  • #2266 - feat: add depinject wiring for x/evm module
  • #2272 - feat: add depinject wiring for x/tokenfactory module
  • #2271 - fix(ci): update tag-pattern for changelog step in releases
  • #2270 - refactor(app): remove private keeper struct and transient/mem keys from app
  • #2288 - chore(ci): add workflow to check for missing upgrade handler
  • #2278 - chore: migrate to cosmossdk.io/mathLegacyDec and cosmossdk.io/math.Int
  • #2293 - ci(release): pack nibid binary with no enclosing directory
  • #2292 - fix: use tmp directory for pre-instantiating app

v2.2.0 - 2025-03-27

  • #2222 - fix(evm): evm indexer proper stopping of the indexer service
  • #2224 - fix(evm): suppressing error on missing block bloom event
  • #2238 - feat(evm-embeds): Add WNIBI.sol implementatino to contracts and related TypeScript and Solidity package updates for npm.
  • #2239 - feat(funtoken): update FunToken.sendToBank to accept EVM and nibi addresses.
  • #2241 - fix(evm): evm-tx-index cli fix to exclude most latest block
  • #2236 - chore: make function comment match function name and fix linter errors
  • #2243 - fix(deps): bump Go to v1.24, similar to #1698
  • #2250 - fix(upgrades): add missing 2.2.0 upgrade handler

Dependencies

  • Bump axios from 1.7.4 to 1.8.2 (#2230)
  • Bump golang.org/x/net from 0.33.0 to 0.37.0 (#2233)
  • chore: update golangci-lint version to v1.64.8 (#2233)
  • Bump [golang.org/x/net](https://github.com/golang/net) from 0.33.0 to 0.37.0. (#2233)
  • Bump github.com/golang/glog from 1.2.0 to 1.2.4 (#2182)

v2.1.0 - 2025-02-25

  • #2104 - chore: update chain IDs
  • #2202 - chore(build): add build tags and missing flags/variables
  • #2206 - ci(chaosnet): fix docker image build
  • #2207 - chore(ci): add cache for chaosnet builds
  • #2209 - refator(ci): Simplify GitHub actions based on conditional paths, removing the need for files like ".github/workflows/skip-unit-tests.yml".
  • #2211 - ci(chaosnet): avoid building on cache injected directories
  • #2212 - fix(evm): proper eth tx logs emission for funtoken operations
  • #2213 - chore(build): include lib versions on cache
  • #2214 - chore(wasm): bump wasmvm to v1.5.8
  • #2068 - feat: enable wasm light clients on IBC (08-wasm)
  • #2217 - fix: app-db-backend not recognized on prune command
  • #2219 - fix(evm): disable unprotected tx check in EVM ante handler
  • #2220 - fix(evm): improved marshaling of the eth tx receipt

v2.0.0-p1 - 2025-02-10

  • fbcca386 fix: revert wasmvm to v1.5.0
  • 533490d0 fix: revert testnet-1 chain id to 7210
  • d8a10921 chore: update changelog for v2 EVM release

v2.0.0 - 2025-02-10

  • #2119 - fix(evm): Guarantee that gas consumed during any send operation of the "NibiruBankKeeper" depends only on the "bankkeeper.BaseKeeper"'s gas consumption.
  • #2120 - fix: Use canonical hexadecimal strings for Eip155 address encoding
  • #2122 - test(evm): more bank extension tests and EVM ABCI integration tests to prevent regressions
  • #2124 - refactor(evm): Remove unnecessary argument in the VerifyFee function, which returns the token payment required based on the effective fee from the tx data. Improve documentation.
  • #2125 - feat(evm-precompile):Emit EVM events created to reflect the ABCI events that occur outside the EVM to make sure that block explorers and indexers can find indexed ABCI event information.
  • #2127 - fix(vesting): disabled built in auth/vesting module functionality
  • #2129 - fix(evm): issue with infinite recursion in erc20 funtoken contracts
  • #2130 - fix(evm): proper nonce management in statedb
  • #2132 - fix(evm): proper tx gas refund
  • #2134 - fix(evm): query of NIBI should use bank state, not the StateDB
  • #2139 - fix(evm): erc20 born funtoken: properly burn bank coins after converting coin back to erc20
  • #2140 - fix(bank): bank keeper extension now charges gas for the bank operations
  • #2141 - refactor: simplify account retrieval operation in nibid q evm account.
  • #2142 - fix(bank): add additional missing methods to the NibiruBankKeeper
  • #2144 - feat(token-registry): Implement strongly typed Nibiru Token Registry and generation command
  • #2145 - chore(token-registry): add xNIBI Astrovault LST to registry
  • #2147 - fix(simapp): manually add x/vesting Cosmos-SDK module types to the codec in simulation tests since they are expected by default
  • #2149 - feat(evm-oracle): add Solidity contract that we can use to expose the Nibiru Oracle in the ChainLink interface. Publish all precompiled contracts and ABIs on npm under the @nibiruchain/solidity package.
  • #2151 - feat(evm): randao support for evm
  • #2152 - fix(precompile): consume gas for precompile calls regardless of error
  • #2154 - fix(evm): JSON encoding for the EIP55Addr struct was not following the Go conventions and needed to include double quotes around the hexadecimal string.
  • #2156 - test(evm-e2e): add E2E test using the Nibiru Oracle's ChainLink impl
  • #2157 - fix(evm): Fix unit inconsistency related to AuthInfo.Fee and txData.Fee using effective fee
  • #2159 - chore(evm): Augment the Wasm msg handler so that wasm contracts cannot send MsgEthereumTx
  • #2160 - fix(evm-precompile): use bank.MsgServer Send in precompile IFunToken.bankMsgSend
  • #2161 - fix(evm): added tx logs events to the funtoken related txs
  • #2162 - test(testutil): try retrying for 'panic: pebbledb: closed'
  • #2167 - refactor(evm): removed blockGasUsed transient variable
  • #2168 - chore(evm-solidity): Move unrelated docs, gen-embeds, and add Solidity docs
  • #2165 - fix(evm): use Singleton StateDB pattern for EVM txs
  • #2169 - fix(evm): Better handling erc20 metadata
  • #2170 - chore: Remove redundant allowUnprotectedTxs
  • #2172 - chore: close iterator in IterateEpochInfo
  • #2173 - fix(evm): clear StateDB between calls
  • #2177 - fix(cmd): Continue from #2127 and unwire vesting flags and logic from genaccounts.go
  • #2176 - tests(evm): add dirty state tests from code4rena audit
  • #2180 - fix(evm): apply gas consumption across the entire EVM codebase at CallContractWithInput
  • #2183 - fix(evm): bank keeper extension gas meter type
  • #2184 - test(evm): e2e tests configuration enhancements
  • #2187 - fix(evm): fix eip55 address encoding
  • #2188 - refactor(evm): update logs emission
  • #2192 - fix(oracle): correctly handle misscount
  • #2197 - chore(evm): Create ethers v6 adapters for Nibiru. Publish as a library on npm (@nibiruchain/evm-core)
  • #2200 - fix(test): evm e2e oracle test fixed pair name

Nibiru EVM | Before Audit 2 - 2024-12-06

The codebase went through a third-party Code4rena Zenith Audit, running from 2024-10-07 until 2024-11-01 and including both a primary review period and mitigation/remission period. This section describes code changes that occurred after that audit in preparation for a second audit starting in November 2024.

  • #2074 - fix(evm-keeper): better utilize ERC20 metadata during FunToken creation. The bank metadata for a new FunToken mapping ties a connection between the Bank Coin's DenomUnit and the ERC20 contract metadata like the name, decimals, and symbol. This change brings parity between EVM wallets, such as MetaMask, and Interchain wallets like Keplr and Leap.
  • #2076 - fix(evm-gas-fees): Use effective gas price in RefundGas and make sure that units are properly reflected on all occurrences of "base fee" in the codebase. This fixes #2059 and the related comments from @Unique-Divine and @berndartmueller.
  • #2084 - feat(evm-forge): foundry support and template for Nibiru EVM development
  • #2086 - fix(evm-precomples): Fix state consistency in precompile execution by ensuring proper journaling of state changes in the StateDB. This pull request makes sure that state is committed as expected, fixes the StateDB.Commit to follow its guidelines more closely, and solves for a critical state inconsistency producible from the FunToken.sol precompiled contract. It also aligns the precompiles to use consistent setup and dynamic gas calculations, addressing the following tickets.
  • #2088 - refactor(evm): remove outdated comment and improper error message text
  • #2089 - better handling of gas consumption within erc20 contract execution
  • #2090 - fix(evm): Account for (1) ERC20 transfers with tokens that return false success values instead of throwing an error and (2) ERC20 transfers with other operations that don't bring about the expected resulting balance for the transfer recipient.
  • #2091 - feat(evm): add fun token creation fee validation
  • #2093 - feat(evm): gas usage in precompiles: limits, local gas meters
  • #2092 - feat(evm): add validation for wasm multi message execution
  • #2094 - fix(evm): Following from the changs in #2086, this pull request implements a new JournalChange struct that saves a deep copy of the state multi store before each state-modifying, Nibiru-specific precompiled contract is called (OnRunStart). Additionally, we commit the StateDB there as well. This guarantees that the non-EVM and EVM state will be in sync even if there are complex, multi-step Ethereum transactions, such as in the case of an EthereumTx that influences the StateDB, then calls a precompile that also changes non-EVM state, and then EVM reverts inside of a try-catch.
  • #2095 - fix(evm): This change records NIBI (ether) transfers on the StateDB during precompiled contract calls using the NibiruBankKeeper, which is struct extension of the bankkeeper.BaseKeeper that is used throughout Nibiru. The NibiruBankKeeper holds a reference to the current EVM StateDB and records balance changes in wei as journal changes automatically. This guarantees that commits and reversions of the StateDB do not misalign with the state of the Bank module. This code change uses the NibiruBankKeeper on all modules that depend on x/bank, such as the EVM and Wasm modules.
  • #2097 - feat(evm): Add new query to get dated price from the oracle precompile
  • #2100 - refactor: cleanup statedb and precompile sections
  • #2098 - test(evm): statedb tests for race conditions within funtoken precompile
  • #2101 - fix(evm): tx receipt proper marshalling
  • #2105 - test(evm): precompile call with revert
  • #2106 - chore: scheduled basic e2e tests for evm testnet endpoint
  • #2107 - feat(evm-funtoken-precompile): Implement methods: balance, bankBalance, whoAmI
  • #2108 - fix(evm): removed deprecated root key from eth_getTransactionReceipt
  • #2110 - fix(evm): Restore StateDB to its state prior to ApplyEvmMsg call to ensure deterministic gas usage. This fixes an issue where the StateDB pointer field in NibiruBankKeeper was being updated during readonly query endpoints like eth_estimateGas, leading to non-deterministic gas usage in subsequent transactions.
  • #2111 - fix: e2e-evm-cron.yml
  • #2114 - fix(evm): make gas cost zero in conditional bank keeper flow
  • #2116 - fix(precompile-funtoken.go): Fixes a bug where the err != nil check is missing in the bankBalance precompile method
  • #2117 - fix(oracle): The timestamps resulting from ctx.WithBlock* don't actually correspond to the block header information from specified blocks in the chain's history, so the oracle exchange rates need a way to correctly retrieve this information. This change fixes that discrepancy, giving the expected block timestamp for the EVM's oracle precompiled contract. The change also simplifies and corrects the code in x/oracle.

Nibiru EVM | Before Audit 1 - 2024-10-18

  • #1837 - feat(eth): protos, eth types, and evm module types
  • #1838 - feat(eth): Go-ethereum, crypto, encoding, and unit tests for evm/types
  • #1841 - feat(eth): Collections encoders for bytes, Ethereum addresses, and Ethereum hashes
  • #1855 - feat(eth-pubsub): Implement in-memory EventBus for real-time topic management and event distribution
  • #1856 - feat(eth-rpc): Conversion types and functions between Ethereum txs and blocks and Tendermint ones.
  • #1861 - feat(eth-rpc): RPC backend, Ethereum tracer, KV indexer, and RPC APIs
  • #1869 - feat(eth): Module and start of keeper tests
  • #1871 - feat(evm): app config and json-rpc
  • #1873 - feat(evm): keeper collections and grpc query impls for EthAccount, NibiruAccount
  • #1883 - feat(evm): keeper logic, Ante handlers, EthCall, and EVM transactions.
  • #1887 - test(evm): eth api integration test suite
  • #1889 - feat: implemented basic evm tx methods
  • #1895 - refactor(geth): Reference go-ethereum as a submodule for easier change tracking with upstream
  • #1901 - test(evm): more e2e test contracts for edge cases
  • #1907 - test(evm): grpc_query full coverage
  • #1909 - chore(evm): set is_london true by default and removed from config
  • #1911 - chore(evm): simplified config by removing old eth forks
  • #1912 - test(evm): unit tests for evm_ante
  • #1914 - refactor(evm): Remove dead code and document non-EVM ante handler
  • #1917 - test(e2e-evm): TypeScript support. Type generation from compiled contracts. Formatter for TS code.
  • #1922 - feat(evm): tracer option is read from the config.
  • #1936 - feat(evm): EVM fungible token protobufs and encoding tests
  • #1947 - fix(evm): fix FunToken state marshalling
  • #1949 - feat(evm): add fungible token mapping queries
  • #1950 - feat(evm): Tx to create FunToken mapping from ERC20, contract embeds, and ERC20 queries.
  • #1956 - feat(evm): msg to send bank coin to erc20
  • #1958 - chore(evm): wiped deprecated evm apis: miner, personal
  • #1959 - feat(evm): Add precompile to the EVM that enables transfers of ERC20 tokens to "nibi" accounts as regular Ethereum transactions
  • #1960 - test(network): graceful cleanup for more consistent CI runs
  • #1961 - chore(test): reverted funtoken precompile test back to the isolated state
  • #1962 - chore(evm): code cleanup, unused code, typos, styles, warnings
  • #1963 - feat(evm): Deduct a fee during the creation of a FunToken mapping. Implemented by deductCreateFunTokenFee inside of the eth.evm.v1.MsgCreateFunToken transaction.
  • #1965 - refactor(evm): remove evm post-processing hooks
  • #1966 - refactor(evm): clean up AnteHandler setup
  • #1967 - feat(evm): export genesis
  • #1968 - refactor(evm): funtoken events, cli commands and queries
  • #1970 - refactor(evm): move evm antehandlers to separate package. Remove "gosdk/sequence_test.go", which causes a race condition in CI.
  • #1971 - feat(evm): typed events for contract creation, contract execution and transfer
  • #1973 - chore(appconst): Add chain IDs ending in "3" to the "knownEthChainIDMap". This makes it possible to use devnet 3 and testnet 3.
  • #1976 - refactor(evm): unique chain ids for all networks
  • #1977 - fix(localnet): rolled back change of evm validator address with cosmos derivation path
  • #1979 - refactor(db): use pebbledb as the default db in integration tests
  • #1981 - fix(evm): remove isCheckTx() short circuit on AnteDecVerifyEthAcc
  • #1982 - feat(evm): add GlobalMinGasPrices
  • #1983 - chore(evm): remove ExtensionOptionsWeb3Tx and ExtensionOptionDynamicFeeTx
  • #1984 - refactor(evm): embeds
  • #1985 - feat(evm)!: Use atto denomination for the wei units in the EVM so that NIBI is "ether" to clients. Only micronibi (unibi) amounts can be transferred. All clients follow the constraint equation, 1 ether == 1 NIBI == 10^6 unibi == 10^18 wei.
  • #1986 - feat(evm): Combine both account queries into "/eth.evm.v1.Query/EthAccount", accepting both nibi-prefixed Bech32 addresses and Ethereum-type hexadecimal addresses as input.
  • #1989 - refactor(evm): simplify evm module address
  • #1996 - perf(evm-keeper-precompile): implement sorted map for k.precompiles to remove dead code
  • #1997 - refactor(evm): Remove unnecessary params: "enable_call", "enable_create".
  • #2000 - refactor(evm): simplify ERC-20 keeper methods
  • #2001 - refactor(evm): simplify FunToken methods and tests
  • #2002 - feat(evm): Add the account query to the EVM command. Cover the CLI with tests.
  • #2003 - fix(evm): fix FunToken conversions between Cosmos and EVM
  • #2004 - refactor(evm)!: replace HexAddr with EIP55Addr
  • #2006 - test(evm): e2e tests for eth_* endpoints
  • #2008 - refactor(evm): clean up precompile setups
  • #2013 - chore(evm): Set appropriate gas value for the required gas of the "IFunToken.sol" precompile.
  • #2014 - feat(evm): Emit block bloom event in EndBlock hook.
  • #2017 - fix(evm): Fix DynamicFeeTx gas cap parameters
  • #2019 - chore(evm): enabled debug rpc api on localnet.
  • #2020 - test(evm): e2e tests for debug namespace
  • #2022 - feat(evm): debug_traceCall method implemented
  • #2023 - fix(evm)!: adjusted generation and parsing of the block bloom events
  • #2030 - refactor(eth/rpc): Delete unused code and improve logging in the eth and debug namespaces
  • #2031 - fix(evm): debug calls with custom tracer and tracer options
  • #2032 - feat(evm): ante handler to prohibit authz grant evm messages
  • #2039 - refactor(rpc-backend): remove unnecessary interface code
  • #2044 - feat(evm): evm tx indexer service implemented
  • #2045 - test(evm): backend tests with test network and real txs
  • #2053 - refactor(evm): converted untyped event to typed and cleaned up
  • #2054 - feat(evm-precompile): Precompile for one-way EVM calls to invoke/execute Wasm contracts.
  • #2060 - fix(evm-precompiles): add assertNumArgs validation
  • #2056 - feat(evm): add oracle precompile
  • #2065 - refactor(evm)!: Refactor out dead code from the evm.Params
  • #2135 - feat(evm): add precompile for calling bank to evm from evm

State Machine Breaking (Other)

For next mainnet version

  • #1766 - refactor(app-wasmext)!: remove wasmbinding CosmosMsg::Custom bindings.
  • #1776 - feat(inflation): make inflation params a collection and add commands to update them
  • #1872 - chore(math): use cosmossdk.io/math to replace sdk types
  • #1874 - chore(proto): remove the proto stringer as per Cosmos SDK migration guidelines
  • #1932 - fix(gosdk): fix keyring import functions

Dapp modules: perp, spot, oracle, etc

  • #1573 - feat(perp): Close markets and compute settlement price
  • #1632 - feat(perp): Add settle position transaction
  • #1656 - feat(perp): Make the collateral denom a stateful collections.Item
  • #1663 - feat(perp): Add volume based rebates
  • #1669 - feat(perp): add query to get collateral metadata
  • #1677 - fix(perp): make Gen_market set initial perp versions
  • #1680 - feat(perp): MsgShiftPegMultiplier, MsgShiftSwapInvariant.
  • #1683 - feat(perp): Add StartDnREpoch to AfterEpochEnd hook
  • #1686 - test(perp): add more tests for perp module msg server for DnR
  • #1687 - chore(wasmbinding): delete CustomQuerier since we have QueryRequest::Stargate now
  • #1705 - feat(perp): Add oracle pair to market object
  • #1718 - fix(perp): fees does not require additional funds
  • #1734 - feat(perp): MsgDonateToPerpFund sudo call as part of #1642
  • #1749 - feat(perp): move close market from Wasm Binding to MsgCloseMarket
  • #1752 - feat(oracle): MsgEditOracleParams sudo tx msg as part of #1642
  • #1755 - feat(oracle): Add more events on validator's performance
  • #1764 - fix(perp): make updateswapinvariant aware of total short supply to avoid panics
  • #1710 - refactor(perp): Clean and organize module errors for x/perp

Non-breaking/Compatible Improvements

  • #1893 - feat(gosdk): migrate Go-sdk into the Nibiru blockchain repo.
  • #1899 - build(deps): cometbft v0.37.5, cosmos-sdk v0.47.11, proto-builder v0.14.0
  • #1913 - fix(tests): race condition from heavy Network tests
  • #1992 - chore: enabled grpc for localnet
  • #1999 - chore: update nibi go package version to v2
  • #2050 - refactor(oracle): remove unused code and collapse empty client/cli directory

Dependencies

  • Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.18.1 to 2.19.1 (#1767, #1782)
  • Bump robinraju/release-downloader from 1.8 to 1.11 (#1783, #1839, #1948)
  • Bump github.com/prometheus/client_golang from 1.17.0 to 1.18.0 (#1750)
  • Bump golang.org/x/crypto from 0.15.0 to 0.31.0 (#1724, #1843, #2123)
  • Bump github.com/holiman/uint256 from 1.2.3 to 1.2.4 (#1730)
  • Bump github.com/dvsekhvalnov/jose2go from 1.5.0 to 1.6.0 (#1733)
  • Bump github.com/spf13/cast from 1.5.1 to 1.6.0 (#1689)
  • Bump cosmossdk.io/math from 1.1.2 to 1.4.0 (#1676, #2115)
  • Bump github.com/grpc-ecosystem/grpc-gateway/v2 from 2.18.0 to 2.18.1 (#1675)
  • Bump actions/setup-go from 4 to 5 (#1696)
  • Bump golang from 1.19 to 1.21 (#1698)
  • #1678 - chore(deps): collections to v0.4.0 for math.Int value encoder
  • Bump golang.org/x/net from 0.0.0-20220607020251-c690dde0001d to 0.33.0 (#1849, #2175)
  • Bump golang.org/x/net from 0.20.0 to 0.23.0 (#1850)
  • Bump github.com/supranational/blst from 0.3.8-0.20220526154634-513d2456b344 to 0.3.11 (#1851)
  • Bump golangci/golangci-lint-action from 4 to 6 (#1854, #1867)
  • Bump github.com/hashicorp/go-getter from 1.7.1 to 1.7.5 (#1858, #1938)
  • Bump github.com/btcsuite/btcd from 0.23.3 to 0.24.2 (#1862, #2070)
  • Bump pozetroninc/github-action-get-latest-release from 0.7.0 to 0.8.0 (#1863)
  • Bump bufbuild/buf-setup-action from 1.30.1 to 1.47.2 (#1891, #1900, #1923, #1972, #1974, #1988, #2043, #2057, #2062, #2069, #2102, #2113)
  • Bump axios from 1.7.3 to 1.7.4 (#2016)
  • Bump github.com/CosmWasm/wasmvm from 1.5.0 to 1.5.5 (#2047)
  • Bump docker/build-push-action from 5 to 6 (#1924)
  • Bump codecov/codecov-action from 4 to 5 (#2112)
  • Bump undici from 5.28.4 to 5.28.5 (#2174)

v1.5.0 - 2024-06-21

Nibiru v1.5.0 enables IBC CosmWasm smart contracts.

Features

  • #1931 - feat(ibc): add wasm route to IBC router

v1.4.0 - 2024-06-04

Nibiru v1.4.0 adds PebbleDB support and increases the wasm contract size limit to 3MB.

State Machine Breaking

  • #1906 - feat(wasm): increase contract size limit to 3MB

Features

  • #1818 - feat: add pebbledb support
  • #1908 - chore: make pebbledb the default db backend

v1.3.0 - 2024-05-07

Nibiru v1.3.0 adds interchain accounts.

Features

  • #1820 - feat: add interchain accounts

Bug Fixes

  • #1864 - fix(ica): add ICA controller stack

Improvements

  • #1859 - refactor(oracle): add oracle slashing events

LEGACY CHANGELOG