refactor(store/v2): human readable ss/sc types (#21645)

Co-authored-by: auricom <27022259+auricom@users.noreply.github.com>
This commit is contained in:
Julien Robert
2024-09-11 10:21:23 +00:00
committed by GitHub
co-authored by auricom
parent 1d4ecd5e37
commit 071aa508eb
6 changed files with 42 additions and 28 deletions
+6
View File
@@ -17,6 +17,7 @@ import (
serverv2 "cosmossdk.io/server/v2"
grpc "cosmossdk.io/server/v2/api/grpc"
"cosmossdk.io/server/v2/appmanager"
"cosmossdk.io/server/v2/store"
)
type mockInterfaceRegistry struct{}
@@ -61,12 +62,17 @@ func TestServer(t *testing.T) {
err = grpcServer.Init(&mockApp[transaction.Tx]{}, v, logger)
require.NoError(t, err)
storeServer := store.New[transaction.Tx](nil /* nil appCreator as not using CLI commands */)
err = storeServer.Init(&mockApp[transaction.Tx]{}, v, logger)
require.NoError(t, err)
mockServer := &mockServer{name: "mock-server-1", ch: make(chan string, 100)}
server := serverv2.NewServer(
logger,
serverv2.DefaultServerConfig(),
grpcServer,
storeServer,
mockServer,
)
+10 -10
View File
@@ -10,6 +10,12 @@ max-recv-msg-size = 10485760
# The default value is math.MaxInt32.
max-send-msg-size = 2147483647
[mock-server-1]
# Mock field
mock_field = 'default'
# Mock field two
mock_field_two = 1
[server]
# minimum-gas-prices defines the price which a validator is willing to accept for processing a transaction. A transaction's fees must meet the minimum of any denomination specified in this config (e.g. 0.25token1;0.0001token2).
minimum-gas-prices = '0stake'
@@ -19,10 +25,10 @@ minimum-gas-prices = '0stake'
app-db-backend = 'goleveldb'
[store.options]
# State storage database type. Currently we support: 0 for SQLite, 1 for Pebble
ss-type = 0
# State commitment database type. Currently we support:0 for iavl, 1 for iavl v2
sc-type = 0
# SState storage database type. Currently we support: "sqlite" and "pebble"
ss-type = 'sqlite'
# State commitment database type. Currently we support: "iavl" and "iavl-v2"
sc-type = 'iavl'
# Pruning options for state storage
[store.options.ss-pruning-option]
@@ -43,9 +49,3 @@ interval = 100
cache-size = 100000
# If true, the tree will work like no fast storage and always not upgrade fast storage.
skip-fast-storage-upgrade = true
[mock-server-1]
# Mock field
mock_field = 'default'
# Mock field two
mock_field_two = 1