Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: bump up cosmos sdk@v0.45.10 #783

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
dd303f4
fix: update x/mint parameter validation (backport #12384) (#12396)
mergify[bot] Jun 30, 2022
f79440f
chore: optimize get last completed upgrade (#12268)
robert-zaremba Jul 3, 2022
8400625
fix: Simulation is not deterministic due to GenTx (backport #12374) (…
adu-web3 Jul 4, 2022
cd576d7
fix: use go install instead of go get in makefile (#12435)
julienrbrt Jul 4, 2022
abfb005
chore: fumpt sdk v45 series #12442
faddat Jul 5, 2022
e0179be
feat: Move AppModule.BeginBlock and AppModule.EndBlock to extension i…
mergify[bot] Jul 19, 2022
e41d7cd
feat: add message index event attribute to authz message execution (b…
mergify[bot] Jul 22, 2022
bee2746
chore(store): upgrade iavl to v0.19.0 (backport #12626) (#12697)
mergify[bot] Jul 23, 2022
081106a
feat: Add `GetParamSetIfExists` to prevent panic on breaking param ch…
fedekunze Jul 26, 2022
ac4886e
feat: Add convenience method for constructing key to access account's…
mergify[bot] Aug 2, 2022
e17c69a
chore: bump tm in 0.45.x (#12784)
tac0turtle Aug 4, 2022
dc1ceb6
chore: 0.45.7 changelog prep (#12821)
tac0turtle Aug 4, 2022
263ef5e
docs(staking): typo in staking/state (backport #12834) (#12836)
mergify[bot] Aug 7, 2022
4f852dd
chore: fee payer event (backport #12850) (#12856)
mergify[bot] Aug 8, 2022
4362a52
chore: changelog update (backport #12859) (#12862)
mergify[bot] Aug 8, 2022
2df8bc6
fix: Use fixed length hex for pointer at FwdCapabilityKey (backport #…
yihuang Aug 9, 2022
49bf1ee
feat: deterministic map iteration (backport #12781) (#12944)
mergify[bot] Aug 18, 2022
f140302
chore: bump tendermint to `0.34.21` and iavl to `0.19.1` (#12970)
julienrbrt Aug 19, 2022
d477274
fix: proper error when parsing telemetry configuration (backport #129…
mergify[bot] Aug 23, 2022
17f314c
ci: fix release notes not populated by goreleaser (#13019)
mergify[bot] Aug 24, 2022
0efebd9
fix: missing return statement in BaseApp.Query (backport #13046) (#13…
mergify[bot] Aug 25, 2022
6ea09cb
chore: v0.45.8 release changelog (#13053)
julienrbrt Aug 25, 2022
21f2b6b
fix: call `SetIAVLCacheSize` with the configured value in simapp (bac…
mergify[bot] Aug 31, 2022
a02979d
feat: Add a cli cmd to prune old states according to current settings…
mergify[bot] Sep 2, 2022
d32022d
fix: rollback command don't actually delete multistore versions (back…
yihuang Sep 5, 2022
a276eda
fix: make linting work on 45 (#13185)
faddat Sep 8, 2022
5dc8b40
feat: configurable fastnode (backport #13321) (#13338)
mergify[bot] Sep 20, 2022
c37d9c8
fix: ensure withdraw_rewards events are always emitted on reward with…
mergify[bot] Sep 20, 2022
49cb9f4
imp(keyring): improve UX for keyring.List (#13369)
fedekunze Sep 27, 2022
c0e06d0
feat: ADR-038 Part 2: StreamingService interface, file writing implem…
yihuang Oct 3, 2022
819ee4d
feat: gRPC query for operator and chain configuration (backport #1348…
mergify[bot] Oct 11, 2022
8eb0635
chore: CHANGELOG update (backport #13536) (#13538)
mergify[bot] Oct 13, 2022
44f279c
refactor: Improve AllocateTokens (backport #13524) (#13527)
mergify[bot] Oct 13, 2022
822ecf5
chore: make iavl fast node migration off by default (#13540)
tac0turtle Oct 13, 2022
24f54b0
Merge pull request from GHSA-3qp7-gj37-g9rx
ebuchman Oct 14, 2022
4ad3a21
fix: move ics23 to correct folder (#13549)
aaronc Oct 14, 2022
191c8d8
fix: fix liveness tests #13551
ValarDragon Oct 14, 2022
08eafce
feat: add `GenSignedMockTx` (#13557)
julienrbrt Oct 16, 2022
1a8b7f1
fix: fix `make proto-gen` (#13564)
julienrbrt Oct 17, 2022
8563283
feat: [REDO] gRPC query for operator and chain configuration (backpor…
alexanderbez Oct 18, 2022
9fab156
chore: bump tendermint to `0.34.22` (#13585)
julienrbrt Oct 19, 2022
9a562b2
fix: (v0.45.x) regression in return value of WithdrawDelegationReward…
nddeluca Oct 20, 2022
ced46b3
fix(server): v0.45.x Populate the PruningKeepEvery config entry in Ge…
SpicyLemon Oct 21, 2022
3b4afa3
feat(cli): add module-account cli cmd and grpc get api (backport #136…
mergify[bot] Oct 24, 2022
c0b3a4e
chore: prepare 0.45.10 changelog (#13624)
julienrbrt Oct 24, 2022
db50658
update proto
dudong2 Nov 2, 2022
b071e7f
fix build
dudong2 Nov 2, 2022
fc22bb2
fix test
dudong2 Nov 3, 2022
44e57d8
chore: change default value of iavl-disable-fastnode to true
dudong2 Nov 3, 2022
ef6d4c4
test: remove TestCacheKVConcurrency
dudong2 Nov 7, 2022
fdbcc4b
chore: fix test build
dudong2 Nov 7, 2022
121a43e
docs: add changelog
dudong2 Nov 7, 2022
d550c31
Merge branch 'rc9/v0.46.0' into dudong2/feat/bump-up-cosmos-sdk@v0.45.10
dudong2 Nov 8, 2022
b9ac7df
chore: apply pr reviews
dudong2 Nov 10, 2022
a9f3751
chore: remove awkward new line in comment
dudong2 Nov 10, 2022
92112b8
fix: lint error
dudong2 Nov 10, 2022
725aaad
chore: add cosmos.base.node.v1beta1.Service/Config for REST api
dudong2 Nov 16, 2022
7576587
chore: apply pr reviews
dudong2 Nov 16, 2022
f0aacab
Merge branch 'rc9/v0.46.0' into dudong2/feat/bump-up-cosmos-sdk@v0.45.10
dudong2 Nov 16, 2022
f188296
chore: fix lint files
dudong2 Nov 16, 2022
b733391
feat: revert ostracon/abci/types.proto
dudong2 Nov 16, 2022
8686cc6
Merge remote-tracking branch 'lbm-sdk-upstream/rc9/v0.46.0' into dudo…
dudong2 Nov 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
chore(store): upgrade iavl to v0.19.0 (backport #12626) (#12697)
  • Loading branch information
mergify[bot] authored and dudong2 committed Nov 1, 2022
commit bee2746426341634dae82516a3b820d600475011
4 changes: 2 additions & 2 deletions baseapp/baseapp_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ func useDefaultLoader(app *BaseApp) {
}

func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) {
rs := rootmulti.NewStore(db)
rs := rootmulti.NewStore(db, log.NewNopLogger())
rs.SetPruning(store.PruneNothing)
key := sdk.NewKVStoreKey(storeKey)
rs.MountStoreWithDB(key, store.StoreTypeIAVL, nil)
Expand All @@ -276,7 +276,7 @@ func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) {
}

func checkStore(t *testing.T, db dbm.DB, ver int64, storeKey string, k, v []byte) {
rs := rootmulti.NewStore(db)
rs := rootmulti.NewStore(db, log.NewNopLogger())
rs.SetPruning(store.PruneDefault)
key := sdk.NewKVStoreKey(storeKey)
rs.MountStoreWithDB(key, store.StoreTypeIAVL, nil)
Expand Down
2 changes: 1 addition & 1 deletion server/rollback.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ application.
return fmt.Errorf("failed to rollback tendermint state: %w", err)
}
// rollback the multistore
cms := rootmulti.NewStore(db)
cms := rootmulti.NewStore(db, ctx.Logger)
cms.RollbackToVersion(height)

fmt.Printf("Rolled back state to height %d and hash %X", height, hash)
Expand Down
2 changes: 1 addition & 1 deletion store/cachekv/store_bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func benchmarkRandomSet(b *testing.B, keysize int) {
kvstore.Set(k, value)
}

iter := kvstore.Iterator(keys[0], keys[b.N])
iter := kvstore.Iterator(nil, nil)
defer iter.Close()

for _ = iter.Key(); iter.Valid(); iter.Next() {
Expand Down
53 changes: 48 additions & 5 deletions store/iavl/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"time"

ics23 "github.com/confio/ics23/go"

"github.com/cosmos/iavl"
dbm "github.com/tendermint/tm-db"

abci "github.com/line/ostracon/abci/types"
"github.com/line/ostracon/libs/log"
occrypto "github.com/line/ostracon/proto/ostracon/crypto"
dbm "github.com/tendermint/tm-db"

"github.com/line/lbm-sdk/store/cachekv"
"github.com/line/lbm-sdk/store/listenkv"
Expand Down Expand Up @@ -44,20 +45,35 @@ type Store struct {
// LoadStore returns an IAVL Store as a CommitKVStore. Internally, it will load the
// store's version (id) from the provided DB. An error is returned if the version
// fails to load, or if called with a positive version on an empty tree.
func LoadStore(db dbm.DB, id types.CommitID, lazyLoading bool, cacheSize int, disableFastNode bool) (types.CommitKVStore, error) {
return LoadStoreWithInitialVersion(db, id, lazyLoading, 0, cacheSize, disableFastNode)
func LoadStore(db dbm.DB, logger log.Logger, key types.StoreKey, id types.CommitID, lazyLoading bool, cacheSize int, disableFastNode bool) (types.CommitKVStore, error) {
return LoadStoreWithInitialVersion(db, logger, key, id, lazyLoading, 0, cacheSize, disableFastNode)
}

// LoadStoreWithInitialVersion returns an IAVL Store as a CommitKVStore setting its initialVersion
// to the one given. Internally, it will load the store's version (id) from the
// provided DB. An error is returned if the version fails to load, or if called with a positive
// version on an empty tree.
func LoadStoreWithInitialVersion(db dbm.DB, id types.CommitID, lazyLoading bool, initialVersion uint64, cacheSize int, disableFastNode bool) (types.CommitKVStore, error) {
func LoadStoreWithInitialVersion(db dbm.DB, logger log.Logger, key types.StoreKey, id types.CommitID, lazyLoading bool, initialVersion uint64, cacheSize int, disableFastNode bool) (types.CommitKVStore, error) {
tree, err := iavl.NewMutableTreeWithOpts(db, cacheSize, &iavl.Options{InitialVersion: initialVersion}, disableFastNode)
if err != nil {
return nil, err
}

isUpgradeable, err := tree.IsUpgradeable()
if err != nil {
return nil, err
}

if isUpgradeable && logger != nil {
logger.Info(
"Upgrading IAVL storage for faster queries + execution on live state. This may take a while",
"store_key", key.String(),
"version", initialVersion,
"commit", fmt.Sprintf("%X", id),
"is_lazy", lazyLoading,
)
}

if lazyLoading {
_, err = tree.LazyLoadVersion(id.Version)
} else {
Expand All @@ -68,6 +84,10 @@ func LoadStoreWithInitialVersion(db dbm.DB, id types.CommitID, lazyLoading bool,
return nil, err
}

if logger != nil {
logger.Debug("Finished loading IAVL tree")
}

return &Store{
tree: tree,
}, nil
Expand Down Expand Up @@ -386,3 +406,26 @@ func getProofFromTree(tree *iavl.MutableTree, key []byte, exists bool) *occrypto
op := types.NewIavlCommitmentOp(key, commitmentProof)
return &occrypto.ProofOps{Ops: []occrypto.ProofOp{op.ProofOp()}}
}

//----------------------------------------

// Implements types.Iterator.
type iavlIterator struct {
dbm.Iterator
}

var _ types.Iterator = (*iavlIterator)(nil)

// newIAVLIterator will create a new iavlIterator.
// CONTRACT: Caller must release the iavlIterator, as each one creates a new
// goroutine.
func newIAVLIterator(tree *iavl.ImmutableTree, start, end []byte, ascending bool) *iavlIterator {
iterator, err := tree.Iterator(start, end, ascending)
if err != nil {
panic(err)
}
iter := &iavlIterator{
Iterator: iterator,
}
return iter
}
10 changes: 6 additions & 4 deletions store/iavl/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,12 @@ import (
"testing"

"github.com/cosmos/iavl"
abci "github.com/line/ostracon/abci/types"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"

abci "github.com/line/ostracon/abci/types"
"github.com/line/ostracon/libs/log"

"github.com/line/lbm-sdk/store/cachekv"
"github.com/line/lbm-sdk/store/types"
"github.com/line/lbm-sdk/types/kv"
Expand Down Expand Up @@ -98,17 +100,17 @@ func TestLoadStore(t *testing.T) {
require.Equal(t, string(hcStore.Get([]byte("hello"))), "ciao")

// Querying a new store at some previous non-pruned height H
newHStore, err := LoadStore(db, cIDH, false, DefaultIAVLCacheSize, false)
newHStore, err := LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), cIDH, false, DefaultIAVLCacheSize, false)
require.NoError(t, err)
require.Equal(t, string(newHStore.Get([]byte("hello"))), "hallo")

// Querying a new store at some previous pruned height Hp
newHpStore, err := LoadStore(db, cIDHp, false, DefaultIAVLCacheSize, false)
newHpStore, err := LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), cIDHp, false, DefaultIAVLCacheSize, false)
require.NoError(t, err)
require.Equal(t, string(newHpStore.Get([]byte("hello"))), "hola")

// Querying a new store at current height H
newHcStore, err := LoadStore(db, cIDHc, false, DefaultIAVLCacheSize, false)
newHcStore, err := LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), cIDHc, false, DefaultIAVLCacheSize, false)
require.NoError(t, err)
require.Equal(t, string(newHcStore.Get([]byte("hello"))), "ciao")
}
Expand Down
2 changes: 0 additions & 2 deletions store/iavl/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ type (
GetImmutable(version int64) (*iavl.ImmutableTree, error)
SetInitialVersion(version uint64)
Iterator(start, end []byte, ascending bool) (types.Iterator, error)
AvailableVersions() []int
LoadVersionForOverwriting(targetVersion int64) (int64, error)
}

// immutableTree is a simple wrapper around a reference to an iavl.ImmutableTree
Expand Down
6 changes: 0 additions & 6 deletions store/iavl/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ func TestImmutableTreePanics(t *testing.T) {
require.Panics(t, func() { it.Remove([]byte{}) })
require.Panics(t, func() { it.SaveVersion() }) // nolint:errcheck
require.Panics(t, func() { it.DeleteVersion(int64(1)) }) // nolint:errcheck
require.Panics(t, func() { it.LoadVersionForOverwriting(int64(1)) })
require.Equal(t, it.AvailableVersions(), []int{})

val, err := it.GetVersioned(nil, 1)
require.Error(t, err)
require.Nil(t, val)

val, proof, err := it.GetVersionedWithProof(nil, 1)
require.Error(t, err)
Expand Down
10 changes: 6 additions & 4 deletions store/rootmulti/proof_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ package rootmulti
import (
"testing"

abci "github.com/line/ostracon/abci/types"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"

abci "github.com/line/ostracon/abci/types"
"github.com/line/ostracon/libs/log"

"github.com/line/lbm-sdk/store/iavl"
"github.com/line/lbm-sdk/store/types"
)

func TestVerifyIAVLStoreQueryProof(t *testing.T) {
// Create main tree for testing.
db := dbm.NewMemDB()
iStore, err := iavl.LoadStore(db, types.CommitID{}, false, iavl.DefaultIAVLCacheSize, false)
iStore, err := iavl.LoadStore(db, log.NewNopLogger(), types.NewKVStoreKey("test"), types.CommitID{}, false, iavl.DefaultIAVLCacheSize, false)
store := iStore.(*iavl.Store)
require.Nil(t, err)
store.Set([]byte("MYKEY"), []byte("MYVALUE"))
Expand Down Expand Up @@ -57,7 +59,7 @@ func TestVerifyIAVLStoreQueryProof(t *testing.T) {
func TestVerifyMultiStoreQueryProof(t *testing.T) {
// Create main tree for testing.
db := dbm.NewMemDB()
store := NewStore(db)
store := NewStore(db, log.NewNopLogger())
iavlStoreKey := types.NewKVStoreKey("iavlStoreKey")

store.MountStoreWithDB(iavlStoreKey, types.StoreTypeIAVL, nil)
Expand Down Expand Up @@ -112,7 +114,7 @@ func TestVerifyMultiStoreQueryProof(t *testing.T) {
func TestVerifyMultiStoreQueryProofAbsence(t *testing.T) {
// Create main tree for testing.
db := dbm.NewMemDB()
store := NewStore(db)
store := NewStore(db, log.NewNopLogger())
iavlStoreKey := types.NewKVStoreKey("iavlStoreKey")

store.MountStoreWithDB(iavlStoreKey, types.StoreTypeIAVL, nil)
Expand Down
9 changes: 5 additions & 4 deletions store/rootmulti/snapshot_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (
"math/rand"
"testing"

"github.com/line/ostracon/libs/log"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

Expand All @@ -22,7 +23,7 @@ import (
)

func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) *rootmulti.Store {
multiStore := rootmulti.NewStore(db)
multiStore := rootmulti.NewStore(db, log.NewNopLogger())
r := rand.New(rand.NewSource(49872768940)) // Fixed seed for deterministic tests

keys := []*types.KVStoreKey{}
Expand Down Expand Up @@ -54,7 +55,7 @@ func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) *
}

func newMultiStoreWithMixedMounts(db dbm.DB) *rootmulti.Store {
store := rootmulti.NewStore(db)
store := rootmulti.NewStore(db, log.NewNopLogger())
store.MountStoreWithDB(types.NewKVStoreKey("iavl1"), types.StoreTypeIAVL, nil)
store.MountStoreWithDB(types.NewKVStoreKey("iavl2"), types.StoreTypeIAVL, nil)
store.MountStoreWithDB(types.NewKVStoreKey("iavl3"), types.StoreTypeIAVL, nil)
Expand Down Expand Up @@ -233,7 +234,7 @@ func benchmarkMultistoreSnapshot(b *testing.B, stores uint8, storeKeys uint64) {
b.StartTimer()

for i := 0; i < b.N; i++ {
target := rootmulti.NewStore(dbm.NewMemDB())
target := rootmulti.NewStore(dbm.NewMemDB(), log.NewNopLogger())
for key := range source.GetStores() {
target.MountStoreWithDB(key, types.StoreTypeIAVL, nil)
}
Expand Down Expand Up @@ -268,7 +269,7 @@ func benchmarkMultistoreSnapshotRestore(b *testing.B, stores uint8, storeKeys ui
b.StartTimer()

for i := 0; i < b.N; i++ {
target := rootmulti.NewStore(dbm.NewMemDB())
target := rootmulti.NewStore(dbm.NewMemDB(), log.NewNopLogger())
for key := range source.GetStores() {
target.MountStoreWithDB(key, types.StoreTypeIAVL, nil)
}
Expand Down
16 changes: 10 additions & 6 deletions store/rootmulti/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ import (
iavltree "github.com/cosmos/iavl"
protoio "github.com/gogo/protobuf/io"
gogotypes "github.com/gogo/protobuf/types"
abci "github.com/line/ostracon/abci/types"
"github.com/pkg/errors"
dbm "github.com/tendermint/tm-db"

abci "github.com/line/ostracon/abci/types"
"github.com/line/ostracon/libs/log"

snapshottypes "github.com/line/lbm-sdk/snapshots/types"
"github.com/line/lbm-sdk/store/cachemulti"
"github.com/line/lbm-sdk/store/dbadapter"
Expand All @@ -41,6 +43,7 @@ const (
// the CommitMultiStore interface.
type Store struct {
db dbm.DB
logger log.Logger
lastCommitInfo *types.CommitInfo
pruningOpts types.PruningOptions
iavlCacheSize int
Expand Down Expand Up @@ -70,17 +73,18 @@ var (
// store will be created with a PruneNothing pruning strategy by default. After
// a store is created, KVStores must be mounted and finally LoadLatestVersion or
// LoadVersion must be called.
func NewStore(db dbm.DB) *Store {
func NewStore(db dbm.DB, logger log.Logger) *Store {
return &Store{
db: db,
logger: logger,
pruningOpts: types.PruneNothing,
iavlCacheSize: iavl.DefaultIAVLCacheSize,
iavlDisableFastNode: iavlDisablefastNodeDefault,
storesParams: make(map[types.StoreKey]storeParams),
stores: make(map[types.StoreKey]types.CommitKVStore),
keysByName: make(map[string]types.StoreKey),
pruneHeights: make([]int64, 0),
listeners: make(map[types.StoreKey][]types.WriteListener),
iavlCacheSize: iavl.DefaultIAVLCacheSize,
iavlDisableFastNode: iavlDisablefastNodeDefault,
}
}

Expand Down Expand Up @@ -842,9 +846,9 @@ func (rs *Store) loadCommitStoreFromParams(key types.StoreKey, id types.CommitID
var err error

if params.initialVersion == 0 {
store, err = iavl.LoadStore(db, id, rs.lazyLoading, rs.iavlCacheSize, rs.iavlDisableFastNode)
store, err = iavl.LoadStore(db, rs.logger, key, id, rs.lazyLoading, rs.iavlCacheSize, rs.iavlDisableFastNode)
} else {
store, err = iavl.LoadStoreWithInitialVersion(db, id, rs.lazyLoading, params.initialVersion, rs.iavlCacheSize, rs.iavlDisableFastNode)
store, err = iavl.LoadStoreWithInitialVersion(db, rs.logger, key, id, rs.lazyLoading, params.initialVersion, rs.iavlCacheSize, rs.iavlDisableFastNode)
}

if err != nil {
Expand Down
15 changes: 8 additions & 7 deletions store/rootmulti/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,10 @@ import (

"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
dbm "github.com/tendermint/tm-db"

abci "github.com/line/ostracon/abci/types"
dbm "github.com/tendermint/tm-db"
"github.com/line/ostracon/libs/log"

"github.com/line/lbm-sdk/codec"
codecTypes "github.com/line/lbm-sdk/codec/types"
Expand All @@ -26,7 +27,7 @@ import (

func TestStoreType(t *testing.T) {
db := dbm.NewMemDB()
store := NewStore(db)
store := NewStore(db, log.NewNopLogger())
store.MountStoreWithDB(types.NewKVStoreKey("store1"), types.StoreTypeIAVL, db)
}

Expand All @@ -49,7 +50,7 @@ func TestGetCommitKVStore(t *testing.T) {

func TestStoreMount(t *testing.T) {
db := dbm.NewMemDB()
store := NewStore(db)
store := NewStore(db, log.NewNopLogger())

key1 := types.NewKVStoreKey("store1")
key2 := types.NewKVStoreKey("store2")
Expand Down Expand Up @@ -772,7 +773,7 @@ var (
)

func newMultiStoreWithMounts(db dbm.DB, pruningOpts types.PruningOptions) *Store {
store := NewStore(db)
store := NewStore(db, log.NewNopLogger())
store.pruningOpts = pruningOpts

store.MountStoreWithDB(testStoreKey1, types.StoreTypeIAVL, nil)
Expand All @@ -783,7 +784,7 @@ func newMultiStoreWithMounts(db dbm.DB, pruningOpts types.PruningOptions) *Store
}

func newMultiStoreWithMixedMounts(db dbm.DB) *Store {
store := NewStore(db)
store := NewStore(db, log.NewNopLogger())
store.MountStoreWithDB(types.NewKVStoreKey("iavl1"), types.StoreTypeIAVL, nil)
store.MountStoreWithDB(types.NewKVStoreKey("iavl2"), types.StoreTypeIAVL, nil)
store.MountStoreWithDB(types.NewKVStoreKey("iavl3"), types.StoreTypeIAVL, nil)
Expand All @@ -793,7 +794,7 @@ func newMultiStoreWithMixedMounts(db dbm.DB) *Store {
}

func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) *Store {
multiStore := NewStore(db)
multiStore := NewStore(db, log.NewNopLogger())
r := rand.New(rand.NewSource(49872768940)) // Fixed seed for deterministic tests

keys := []*types.KVStoreKey{}
Expand Down Expand Up @@ -825,7 +826,7 @@ func newMultiStoreWithGeneratedData(db dbm.DB, stores uint8, storeKeys uint64) *
}

func newMultiStoreWithModifiedMounts(db dbm.DB, pruningOpts types.PruningOptions) (*Store, *types.StoreUpgrades) {
store := NewStore(db)
store := NewStore(db, log.NewNopLogger())
store.pruningOpts = pruningOpts

store.MountStoreWithDB(types.NewKVStoreKey("store1"), types.StoreTypeIAVL, nil)
Expand Down
Loading