Registry / database / cosmos-iavl

cosmos-iavl

JSON →
library1.3.6gogounverified

Package iavl implements a versioned, snapshottable (immutable) AVL+ tree for persisting key-value pairs.

go get github.com/cosmos/iavl
INSTALL
IMPORT
SIG · COSMOS-IAVL
C
cosmos-iavl
databasegov1.3.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

iavl
✓ github.com/cosmos/iavl

Minimal example creating a mutable IAVL tree, setting a key-value pair, and saving a version.

package main import ( "fmt" "github.com/cosmos/iavl" "github.com/tendermint/tm-db" ) func main() { db, _ := tmdb.NewDB("test", tmdb.GoLevelDBBackend, "/tmp") tree, _ := iavl.NewMutableTree(db, 128) tree.Set([]byte("key"), []byte("value")) _, version, _ := tree.SaveVersion() fmt.Println("saved version:", version) }
Debug
Known issues
breakingBreaking changes between major versions (v0 vs v1) in API and import path.
fix
Use the correct import path for your version: v0.x uses github.com/tendermint/iavl, v1.x uses github.com/cosmos/iavl.
affects: >=0.0.0
Upgrade
Version history
1.3.6latest on pkg.go.dev
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
14
OpenAI (training)
1
Resources
cosmos-iavl — go get cosmos-iavl · libregistry