Skip to content

Commit

Permalink
chore: disable pruning by default (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
artemijspavlovs authored Jul 31, 2024
1 parent 503a33a commit 7986b06
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 51 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ require (
github.com/cosmos/gogoproto v1.4.11
github.com/cosmos/ibc-go/v6 v6.3.0
github.com/dvsekhvalnov/jose2go v1.5.0
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240708144829-21faaaf4ce25
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240729074116-005f2bb6dd18
github.com/dymensionxyz/dymint v1.2.0-rc01
github.com/ethereum/go-ethereum v1.12.0
github.com/evmos/evmos/v12 v12.1.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -567,8 +567,8 @@ github.com/dvsekhvalnov/jose2go v1.5.0 h1:3j8ya4Z4kMCwT5nXIKFSV84YS+HdqSSO0VsTQx
github.com/dvsekhvalnov/jose2go v1.5.0/go.mod h1:QsHjhyTlD/lAVqn/NSbVZmSCGeDehTB/mPZadG+mhXU=
github.com/dymensionxyz/cosmosclient v0.4.2-beta h1:sokBefcN1tIOlUKmB8Q2E9XMJ93LueqtFThiM/kA4DI=
github.com/dymensionxyz/cosmosclient v0.4.2-beta/go.mod h1:GQQu3ITEjWfi5ULR2B6X2i2YZNennY1yzcT5qdL4MGI=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240708144829-21faaaf4ce25 h1:G0IDuzZGfWgl2mdvmsPTl+yCD5aaymnaG6N2XAB9t8A=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240708144829-21faaaf4ce25/go.mod h1:M7YD1jsbAUYlnpfE0cj0MP0esKI3J6NsrVFAit+Rx+8=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240729074116-005f2bb6dd18 h1:LAcB7zrQ4S8A4d/j6Hk3mS/1Rq1IPSSyQPejB4KGeHc=
github.com/dymensionxyz/dymension-rdk v1.6.1-0.20240729074116-005f2bb6dd18/go.mod h1:M7YD1jsbAUYlnpfE0cj0MP0esKI3J6NsrVFAit+Rx+8=
github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56 h1:cmpJYdRviuUfmlJdHrcAND8Jd6JIY4rp63bWAQzPr54=
github.com/dymensionxyz/dymension/v3 v3.1.0-rc03.0.20240411195658-f7cd96f53b56/go.mod h1:3Pfrr8j/BR9ztNKztGfC5PqDiO6CcrzMLCJtFtPEVW4=
github.com/dymensionxyz/dymint v1.2.0-rc01 h1:zFHUXmy/07Bs7/qSRzGnGdRipgCm4GGAsoxF1+OCwS8=
Expand Down
93 changes: 45 additions & 48 deletions rollappd/cmd/root.go
Original file line number Diff line number Diff line change
@@ -1,45 +1,45 @@
package cmd

import (
"errors"
"io"
"os"

"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
"github.com/cosmos/cosmos-sdk/client/debug"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/keys"
pruningtypes "github.com/cosmos/cosmos-sdk/pruning/types"
sdk "github.com/cosmos/cosmos-sdk/types"

"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/server"
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/version"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
"github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"
"github.com/spf13/cobra"
tmcfg "github.com/tendermint/tendermint/config"
tmcli "github.com/tendermint/tendermint/libs/cli"
tmlog "github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
etherminthd "github.com/evmos/evmos/v12/crypto/hd"

berpcconfig "github.com/bcdevtools/block-explorer-rpc-cosmos/be_rpc/config"
rdkserver "github.com/dymensionxyz/dymension-rdk/server"
"github.com/dymensionxyz/dymension-rdk/utils"
dymintconf "github.com/dymensionxyz/dymint/config"
"github.com/dymensionxyz/rollapp-wasm/app"
"github.com/dymensionxyz/rollapp-wasm/app/params"
"errors"
"io"
"os"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
"github.com/cosmos/cosmos-sdk/client/debug"
"github.com/cosmos/cosmos-sdk/client/flags"
"github.com/cosmos/cosmos-sdk/client/keys"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/client/rpc"
"github.com/cosmos/cosmos-sdk/server"
serverconfig "github.com/cosmos/cosmos-sdk/server/config"
servertypes "github.com/cosmos/cosmos-sdk/server/types"
"github.com/cosmos/cosmos-sdk/version"
authcmd "github.com/cosmos/cosmos-sdk/x/auth/client/cli"
"github.com/cosmos/cosmos-sdk/x/auth/types"
banktypes "github.com/cosmos/cosmos-sdk/x/bank/types"
genutilcli "github.com/cosmos/cosmos-sdk/x/genutil/client/cli"
"github.com/prometheus/client_golang/prometheus"
"github.com/spf13/cast"
"github.com/spf13/cobra"
tmcfg "github.com/tendermint/tendermint/config"
tmcli "github.com/tendermint/tendermint/libs/cli"
tmlog "github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"
"github.com/CosmWasm/wasmd/x/wasm"
wasmkeeper "github.com/CosmWasm/wasmd/x/wasm/keeper"
etherminthd "github.com/evmos/evmos/v12/crypto/hd"
berpcconfig "github.com/bcdevtools/block-explorer-rpc-cosmos/be_rpc/config"
rdkserver "github.com/dymensionxyz/dymension-rdk/server"
rdkserverconfig "github.com/dymensionxyz/dymension-rdk/server/config"
"github.com/dymensionxyz/dymension-rdk/utils"
dymintconf "github.com/dymensionxyz/dymint/config"
"github.com/dymensionxyz/rollapp-wasm/app"
"github.com/dymensionxyz/rollapp-wasm/app/params"
)

const rollappAscii = `
Expand Down Expand Up @@ -131,15 +131,12 @@ func initTendermintConfig() *tmcfg.Config {
// initAppConfig helps to override default appConfig template and configs.
// return "", nil if no custom configuration is required for the application.
func initAppConfig() (string, interface{}) {
customAppTemplate := serverconfig.DefaultConfigTemplate
srvCfg := serverconfig.DefaultConfig()

//Default pruning for a rollapp, represent 2 weeks of states kept while pruning in intervals of 10 minutes
srvCfg.Pruning = pruningtypes.PruningOptionCustom
srvCfg.PruningInterval = "18000"
srvCfg.PruningKeepRecent = "6048000"

return customAppTemplate, srvCfg
customAppTemplate := serverconfig.DefaultConfigTemplate
srvCfg := serverconfig.DefaultConfig()

rdkserverconfig.SetDefaultPruningSettings(srvCfg)

return customAppTemplate, srvCfg
}

func initRootCmd(
Expand Down

0 comments on commit 7986b06

Please sign in to comment.