Skip to content

Commit 71a207f

Browse files
committed
Ignore Version during Set Earliest Version
1 parent 5b53230 commit 71a207f

File tree

5 files changed

+9
-14
lines changed

5 files changed

+9
-14
lines changed

app/test_state_store.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func (s *InMemoryStateStore) GetEarliestVersion() (int64, error) {
143143
return s.earliestVersion, nil
144144
}
145145

146-
func (s *InMemoryStateStore) SetEarliestVersion(version int64) error {
146+
func (s *InMemoryStateStore) SetEarliestVersion(version int64, ignoreVersion bool) error {
147147
s.mu.Lock()
148148
defer s.mu.Unlock()
149149

app/test_state_store_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func TestGetLatestVersionAndSetLatestVersion(t *testing.T) {
126126
func TestGetEarliestVersionAndSetEarliestVersion(t *testing.T) {
127127
store := NewInMemoryStateStore()
128128

129-
err := store.SetEarliestVersion(1)
129+
err := store.SetEarliestVersion(1, false)
130130
assert.NoError(t, err)
131131

132132
version, err := store.GetEarliestVersion()

go.mod

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,6 @@ require (
125125
github.com/fzipp/gocyclo v0.5.1 // indirect
126126
github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff // indirect
127127
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 // indirect
128-
github.com/ghodss/yaml v1.0.0 // indirect
129128
github.com/go-critic/go-critic v0.6.3 // indirect
130129
github.com/go-kit/kit v0.12.0 // indirect
131130
github.com/go-kit/log v0.2.1 // indirect
@@ -173,7 +172,6 @@ require (
173172
github.com/gostaticanalysis/nilerr v0.1.1 // indirect
174173
github.com/grpc-ecosystem/go-grpc-middleware v1.3.0 // indirect
175174
github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 // indirect
176-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 // indirect
177175
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect
178176
github.com/hashicorp/errwrap v1.0.0 // indirect
179177
github.com/hashicorp/go-bexpr v0.1.10 // indirect
@@ -348,12 +346,12 @@ require (
348346
replace (
349347
github.com/CosmWasm/wasmd => github.com/sei-protocol/sei-wasmd v0.2.8
350348
github.com/confio/ics23/go => github.com/cosmos/cosmos-sdk/ics23/go v0.8.0
351-
github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.45
349+
github.com/cosmos/cosmos-sdk => github.com/sei-protocol/sei-cosmos v0.3.48-0.20241126210539-099ae57ebf31
352350
github.com/cosmos/iavl => github.com/sei-protocol/sei-iavl v0.2.0
353351
github.com/cosmos/ibc-go/v3 => github.com/sei-protocol/sei-ibc-go/v3 v3.3.2
354352
github.com/ethereum/go-ethereum => github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7
355353
github.com/gogo/protobuf => github.com/regen-network/protobuf v1.3.3-alpha.regen.1
356-
github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.45
354+
github.com/sei-protocol/sei-db => github.com/sei-protocol/sei-db v0.0.46-0.20241126205848-cf2c44b0f02f
357355
// Latest goleveldb is broken, we have to stick to this version
358356
github.com/syndtr/goleveldb => github.com/syndtr/goleveldb v1.0.1-0.20210819022825-2ae1ddf74ef7
359357
github.com/tendermint/tendermint => github.com/sei-protocol/sei-tendermint v0.4.3

go.sum

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,6 @@ github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2Gihuqh
457457
github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc=
458458
github.com/getkin/kin-openapi v0.53.0/go.mod h1:7Yn5whZr5kJi6t+kShccXS8ae1APpYTW6yheSwk8Yi4=
459459
github.com/ghemawat/stream v0.0.0-20171120220530-696b145b53b9/go.mod h1:106OIgooyS7OzLDOpUGgm9fA3bQENb/cFSyyBmMoJDs=
460-
github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk=
461460
github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04=
462461
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
463462
github.com/gin-contrib/sse v0.1.0 h1:Y/yl/+YNO8GZSjAhjMsSuLt29uWRFHdHYUb5lYOV9qE=
@@ -766,8 +765,6 @@ github.com/grpc-ecosystem/grpc-gateway v1.9.5/go.mod h1:vNeuVxBJEsws4ogUvrchl83t
766765
github.com/grpc-ecosystem/grpc-gateway v1.12.1/go.mod h1:8XEsbTttt/W+VvjtQhLACqCisSPWTxCZ7sBRjU6iH9c=
767766
github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo=
768767
github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw=
769-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0 h1:ad0vkEBuk23VJzZR9nkLVG0YAoN9coASF1GusYX6AlU=
770-
github.com/grpc-ecosystem/grpc-gateway/v2 v2.23.0/go.mod h1:igFoXX2ELCW06bol23DWPB5BEWfZISOzSP5K2sbLea0=
771768
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c h1:6rhixN/i8ZofjG1Y75iExal34USq5p+wiN1tpie8IrU=
772769
github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c/go.mod h1:NMPJylDgVpX0MLRlPy15sqSwOFv/U1GZ2m21JhFfek0=
773770
github.com/guptarohit/asciigraph v0.5.5/go.mod h1:dYl5wwK4gNsnFf9Zp+l06rFiDZ5YtXM6x7SRWZ3KGag=
@@ -1350,10 +1347,10 @@ github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7
13501347
github.com/sei-protocol/go-ethereum v1.13.5-sei-9.0.20241120141252-bf6b5923d7d7/go.mod h1:kcRZmuzRn1lVejiFNTz4l4W7imnpq1bDAnuKS/RyhbQ=
13511348
github.com/sei-protocol/goutils v0.0.2 h1:Bfa7Sv+4CVLNM20QcpvGb81B8C5HkQC/kW1CQpIbXDA=
13521349
github.com/sei-protocol/goutils v0.0.2/go.mod h1:iYE2DuJfEnM+APPehr2gOUXfuLuPsVxorcDO+Tzq9q8=
1353-
github.com/sei-protocol/sei-cosmos v0.3.45 h1:l6ss5Y4OC+vvu+74lWz8EUBJN68x0CRuaEYtqA+TvOs=
1354-
github.com/sei-protocol/sei-cosmos v0.3.45/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk=
1355-
github.com/sei-protocol/sei-db v0.0.45 h1:95ygzGFMyvaGwEUmzlKi8MxwXfbluoNzbaIjy9zOG6o=
1356-
github.com/sei-protocol/sei-db v0.0.45/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA=
1350+
github.com/sei-protocol/sei-cosmos v0.3.48-0.20241126210539-099ae57ebf31 h1:DpsBpGgtu2NRk8qqzXlLyJzc6Wv7LBD0rG2/bu1MdsM=
1351+
github.com/sei-protocol/sei-cosmos v0.3.48-0.20241126210539-099ae57ebf31/go.mod h1:ZwWxF/69WlcLEn4BzVjPPToTFkE2sjPanU8PNNyKoOk=
1352+
github.com/sei-protocol/sei-db v0.0.46-0.20241126205848-cf2c44b0f02f h1:cEJiTuj1rsdOc2wmXtzLA20b9cxjQqMsrCzkBsWM8bs=
1353+
github.com/sei-protocol/sei-db v0.0.46-0.20241126205848-cf2c44b0f02f/go.mod h1:m5g7p0QeAS3dNJHIl28zQpzOgxQmvYqPb7t4hwgIOCA=
13571354
github.com/sei-protocol/sei-iavl v0.2.0 h1:OisPjXiDT+oe+aeckzDEFgkZCYuUjHgs/PP8DPicN+I=
13581355
github.com/sei-protocol/sei-iavl v0.2.0/go.mod h1:qRf8QYUPfrAO7K6VDB2B2l/N7K5L76OorioGBcJBIbw=
13591356
github.com/sei-protocol/sei-ibc-go/v3 v3.3.2 h1:BaMZ6gjwqe3R/5dLmcJ1TkSZ3omcWy2TjaAZAeOJH44=

tools/migration/ss/migrator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ func (m *Migrator) Migrate(version int64, homeDir string) error {
6565
}
6666

6767
// Set earliest and latest version in the database
68-
err = m.stateStore.SetEarliestVersion(1)
68+
err = m.stateStore.SetEarliestVersion(1, true)
6969
if err != nil {
7070
return err
7171
}

0 commit comments

Comments
 (0)