binaryholdings / cosmprund

116 stars 71 forks source link

error on cosmos hub #12

Open satman81 opened 1 year ago

satman81 commented 1 year ago

HI, getting this error:

./cosmprund prune ~/.gaiad/data/ --cosmos-sdk=false
pruning state store
Error: from height 0 and to height -10 must be greater than 0

OR with cosmos-sdk true:

/cosmprund prune ~/.gaiad/data/ --cosmos-sdk=true
pruning application state
0
panic: runtime error: slice bounds out of range [:-10]

goroutine 1 [running]:
github.com/binaryholdings/cosmos-pruner/cmd.pruneAppState({0x7fffe000d252?, 0xc0004cbf50?})
        /home/cosmos/cosmprund/cmd/pruner.go:628 +0x3785
github.com/binaryholdings/cosmos-pruner/cmd.pruneCmd.func1(0xc0004eac80?, {0xc0004afa60, 0x1, 0x2})
        /home/cosmos/cosmprund/cmd/pruner.go:57 +0xff
github.com/spf13/cobra.(*Command).execute(0xc0004eac80, {0xc0004afa40, 0x2, 0x2})
        /home/cosmos/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:856 +0x67c
github.com/spf13/cobra.(*Command).ExecuteC(0xc0004eaa00)
        /home/cosmos/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:974 +0x3bd
github.com/spf13/cobra.(*Command).Execute(...)
        /home/cosmos/go/pkg/mod/github.com/spf13/cobra@v1.3.0/command.go:902
github.com/binaryholdings/cosmos-pruner/cmd.Execute()
        /home/cosmos/cosmprund/cmd/root.go:91 +0x38
main.main()
        /home/cosmos/cosmprund/main.go:8 +0x17
cosmos@E3-2288G:~/cosmprund/build$ ./cosmprund prune ~/.gaiad/data/ --cosmos-sdk=false
pruning state store
Error: from height 0 and to height -10 must be greater than 0
cosmos@E3-2288G:~/cosmprund/build$ ./cosmprund prune ~/.gaiad/data/ --cosmos-sdk=false
pruning state store
Error: from height 0 and to height -10 must be greater than 0
cosmos@E3-2288G:~/cosmprund/build$ ./cosmprund prune ~/.gaiad/data/ --cosmos-sdk=true
pruning application state
0
panic: runtime error: slice bounds out of range [:-10]

goroutine 1 [running]:
github.com/binaryholdings/cosmos-pruner/cmd.pruneAppState({0x7fffdd720252?, 0xc000e06ba0?})
        /home/cosmos/cosmprund/cmd/pruner.go:628 +0x3785
parveenkaushikmajra commented 2 months ago

@satman81 I am also having the same error. Do you have any options?