From 27a231ae4816fd8c3ee39a1cc02eccf977fb1b79 Mon Sep 17 00:00:00 2001 From: cool-developer <51834436+cool-develope@users.noreply.github.com> Date: Wed, 20 Mar 2024 18:23:41 -0400 Subject: [PATCH 01/20] feat(store/v2): add the catch up process in the migration (#19454) --- store/batch.go | 2 +- store/internal/encoding/changeset.go | 125 ++++++++++++++++ store/internal/encoding/changeset_test.go | 94 ++++++++++++ store/migration/manager.go | 166 ++++++++++++++++++++-- store/migration/manager_test.go | 10 +- store/root/migrate_test.go | 162 +++++++++++++++++++++ store/root/store.go | 115 +++++++++++---- store/root/store_test.go | 4 +- store/snapshots/manager_test.go | 11 ++ store/storage/pebbledb/batch.go | 3 +- store/storage/rocksdb/batch.go | 3 +- store/storage/sqlite/batch.go | 16 ++- store/storage/store.go | 6 +- store/store.go | 6 + 14 files changed, 668 insertions(+), 55 deletions(-) create mode 100644 store/internal/encoding/changeset.go create mode 100644 store/internal/encoding/changeset_test.go create mode 100644 store/root/migrate_test.go diff --git a/store/batch.go b/store/batch.go index 752a7147f52b..36178a6a6327 100644 --- a/store/batch.go +++ b/store/batch.go @@ -13,7 +13,7 @@ type Batch interface { Write() error // Reset resets the batch. - Reset() + Reset() error } // RawBatch represents a group of writes. They may or may not be written atomically depending on the diff --git a/store/internal/encoding/changeset.go b/store/internal/encoding/changeset.go new file mode 100644 index 000000000000..8aefed75c327 --- /dev/null +++ b/store/internal/encoding/changeset.go @@ -0,0 +1,125 @@ +package encoding + +import ( + "bytes" + "fmt" + + corestore "cosmossdk.io/core/store" +) + +// encodedSize returns the size of the encoded Changeset. +func encodedSize(cs *corestore.Changeset) int { + size := EncodeUvarintSize(uint64(len(cs.Changes))) + for _, changes := range cs.Changes { + size += EncodeBytesSize(changes.Actor) + size += EncodeUvarintSize(uint64(len(changes.StateChanges))) + for _, pair := range changes.StateChanges { + size += EncodeBytesSize(pair.Key) + size += EncodeUvarintSize(1) // pair.Remove + if !pair.Remove { + size += EncodeBytesSize(pair.Value) + } + } + } + return size +} + +// MarshalChangeset returns the encoded byte representation of Changeset. +// NOTE: The Changeset is encoded as follows: +// - number of store keys (uvarint) +// - for each store key: +// -- store key (bytes) +// -- number of pairs (uvarint) +// -- for each pair: +// --- key (bytes) +// --- remove (1 byte) +// --- value (bytes) +func MarshalChangeset(cs *corestore.Changeset) ([]byte, error) { + var buf bytes.Buffer + buf.Grow(encodedSize(cs)) + + if err := EncodeUvarint(&buf, uint64(len(cs.Changes))); err != nil { + return nil, err + } + for _, changes := range cs.Changes { + if err := EncodeBytes(&buf, changes.Actor); err != nil { + return nil, err + } + if err := EncodeUvarint(&buf, uint64(len(changes.StateChanges))); err != nil { + return nil, err + } + for _, pair := range changes.StateChanges { + if err := EncodeBytes(&buf, pair.Key); err != nil { + return nil, err + } + if pair.Remove { + if err := EncodeUvarint(&buf, 1); err != nil { + return nil, err + } + } else { + if err := EncodeUvarint(&buf, 0); err != nil { + return nil, err + } + if err := EncodeBytes(&buf, pair.Value); err != nil { + return nil, err + } + } + } + } + + return buf.Bytes(), nil +} + +// UnmarshalChangeset decodes the Changeset from the given byte slice. +func UnmarshalChangeset(cs *corestore.Changeset, buf []byte) error { + storeCount, n, err := DecodeUvarint(buf) + if err != nil { + return err + } + buf = buf[n:] + changes := make([]corestore.StateChanges, storeCount) + for i := uint64(0); i < storeCount; i++ { + storeKey, n, err := DecodeBytes(buf) + if err != nil { + return err + } + buf = buf[n:] + + pairCount, n, err := DecodeUvarint(buf) + if err != nil { + return err + } + buf = buf[n:] + + pairs := make([]corestore.KVPair, pairCount) + for j := uint64(0); j < pairCount; j++ { + pairs[j].Key, n, err = DecodeBytes(buf) + if err != nil { + return err + } + buf = buf[n:] + + remove, n, err := DecodeUvarint(buf) + if err != nil { + return err + } + buf = buf[n:] + if remove == 0 { + pairs[j].Remove = false + pairs[j].Value, n, err = DecodeBytes(buf) + if err != nil { + return err + } + buf = buf[n:] + } else if remove == 1 { + pairs[j].Remove = true + } else { + return fmt.Errorf("invalid remove flag: %d", remove) + } + } + changes[i] = corestore.StateChanges{Actor: storeKey, StateChanges: pairs} + } + cs.Changes = changes + + return nil +} diff --git a/store/internal/encoding/changeset_test.go b/store/internal/encoding/changeset_test.go new file mode 100644 index 000000000000..ae6cb4e2d4a4 --- /dev/null +++ b/store/internal/encoding/changeset_test.go @@ -0,0 +1,94 @@ +package encoding + +import ( + "testing" + + corestore "cosmossdk.io/core/store" + "github.com/stretchr/testify/require" +) + +func TestChangesetMarshal(t *testing.T) { + testcases := []struct { + name string + changeset *corestore.Changeset + encodedSize int + encodedBytes []byte + }{ + { + name: "empty", + changeset: corestore.NewChangeset(), + encodedSize: 1, + encodedBytes: []byte{0x0}, + }, + { + name: "one store", + changeset: &corestore.Changeset{Changes: []corestore.StateChanges{ + { + Actor: []byte("storekey"), + StateChanges: corestore.KVPairs{ + {Key: []byte("key"), Value: []byte("value"), Remove: false}, + }, + }, + }}, + encodedSize: 1 + 1 + 8 + 1 + 1 + 3 + 1 + 1 + 5, + encodedBytes: []byte{0x1, 0x8, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x6b, 0x65, 0x79, 0x1, 0x3, 0x6b, 0x65, 0x79, 0x0, 0x5, 0x76, 0x61, 0x6c, 0x75, 0x65}, + }, + { + name: "one remove store", + changeset: &corestore.Changeset{Changes: []corestore.StateChanges{ + { + Actor: []byte("storekey"), + StateChanges: corestore.KVPairs{ + {Key: []byte("key"), Remove: true}, + }, + }, + }}, + encodedSize: 1 + 1 + 8 + 1 + 1 + 3 + 1, + encodedBytes: []byte{0x1, 0x8, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x6b, 0x65, 0x79, 0x1, 0x3, 0x6b, 0x65, 0x79, 0x1}, + }, + { + name: "two stores", + changeset: &corestore.Changeset{Changes: []corestore.StateChanges{ + { + Actor: []byte("storekey1"), + StateChanges: corestore.KVPairs{ + {Key: []byte("key1"), Value: []byte("value1"), Remove: false}, + }, + }, + { + Actor: []byte("storekey2"), + StateChanges: corestore.KVPairs{ + {Key: []byte("key2"), Value: []byte("value2"), Remove: false}, + {Key: []byte("key1"), Remove: true}, + }, + }, + }}, + encodedSize: 2 + 1 + 9 + 1 + 1 + 4 + 1 + 6 + 1 + 9 + 1 + 1 + 4 + 1 + 1 + 6 + 1 + 4 + 1, + // encodedBytes: it is not deterministic, + }, + } + + for _, tc := range testcases { + t.Run(tc.name, func(t *testing.T) { + // check the encoded size + require.Equal(t, encodedSize(tc.changeset), tc.encodedSize, "encoded size mismatch") + // check the encoded bytes + encodedBytes, err := MarshalChangeset(tc.changeset) + require.NoError(t, err, "marshal error") + if len(tc.encodedBytes) != 0 { + require.Equal(t, encodedBytes, tc.encodedBytes, "encoded bytes mismatch") + } + // check the unmarshaled changeset + cs := corestore.NewChangeset() + require.NoError(t, UnmarshalChangeset(cs, encodedBytes), "unmarshal error") + require.Equal(t, len(tc.changeset.Changes), len(cs.Changes), "unmarshaled changeset store size mismatch") + for i, changes := range tc.changeset.Changes { + require.Equal(t, changes.Actor, cs.Changes[i].Actor, "unmarshaled changeset store key mismatch") + require.Equal(t, len(changes.StateChanges), len(cs.Changes[i].StateChanges), "unmarshaled changeset StateChanges size mismatch") + for j, pair := range changes.StateChanges { + require.Equal(t, pair, cs.Changes[i].StateChanges[j], "unmarshaled changeset pair mismatch") + } + } + }) + } +} diff --git a/store/migration/manager.go b/store/migration/manager.go index 112996042a60..285709351c59 100644 --- a/store/migration/manager.go +++ b/store/migration/manager.go @@ -1,11 +1,20 @@ package migration import ( + "encoding/binary" + "fmt" + "sync" + "time" + "golang.org/x/sync/errgroup" corestore "cosmossdk.io/core/store" "cosmossdk.io/log" + "cosmossdk.io/store/v2" + "cosmossdk.io/store/v2/commitment" + "cosmossdk.io/store/v2/internal/encoding" "cosmossdk.io/store/v2/snapshots" + "cosmossdk.io/store/v2/storage" ) const ( @@ -13,25 +22,69 @@ const ( defaultChannelBufferSize = 1024 // defaultStorageBufferSize is the default buffer size for the storage snapshotter. defaultStorageBufferSize = 1024 + + migrateChangesetKeyFmt = "m/cs_%x" // m/cs_ ) +// VersionedChangeset is a pair of version and Changeset. +type VersionedChangeset struct { + Version uint64 + Changeset *corestore.Changeset +} + // Manager manages the migration of the whole state from store/v1 to store/v2. type Manager struct { logger log.Logger snapshotsManager *snapshots.Manager - storageSnapshotter snapshots.StorageSnapshotter - commitSnapshotter snapshots.CommitSnapshotter + stateStorage *storage.StorageStore + stateCommitment *commitment.CommitStore + + db store.RawDB + mtx sync.Mutex // mutex for migratedVersion + migratedVersion uint64 + + chChangeset <-chan *VersionedChangeset + chDone <-chan struct{} } // NewManager returns a new Manager. -func NewManager(sm *snapshots.Manager, ss snapshots.StorageSnapshotter, cs snapshots.CommitSnapshotter, logger log.Logger) *Manager { +func NewManager(db store.RawDB, sm *snapshots.Manager, ss *storage.StorageStore, sc *commitment.CommitStore, logger log.Logger) *Manager { return &Manager{ - logger: logger, - snapshotsManager: sm, - storageSnapshotter: ss, - commitSnapshotter: cs, + logger: logger, + snapshotsManager: sm, + stateStorage: ss, + stateCommitment: sc, + db: db, + } +} + +// Start starts the whole migration process. +// It migrates the whole state at the given version to the new store/v2 (both SC and SS). +// It also catches up the Changesets which are committed while the migration is in progress. +// `chChangeset` is the channel to receive the committed Changesets from the RootStore. +// `chDone` is the channel to receive the done signal from the RootStore. +// NOTE: It should be called by the RootStore, running in the background. +func (m *Manager) Start(version uint64, chChangeset <-chan *VersionedChangeset, chDone <-chan struct{}) error { + m.chChangeset = chChangeset + m.chDone = chDone + + go func() { + if err := m.writeChangeset(); err != nil { + m.logger.Error("failed to write changeset", "err", err) + } + }() + + if err := m.Migrate(version); err != nil { + return fmt.Errorf("failed to migrate state: %w", err) } + + return m.Sync() +} + +// GetStateCommitment returns the state commitment. +func (m *Manager) GetStateCommitment() *commitment.CommitStore { + return m.stateCommitment } // Migrate migrates the whole state at the given height to the new store/v2. @@ -49,13 +102,106 @@ func (m *Manager) Migrate(height uint64) error { eg := new(errgroup.Group) eg.Go(func() error { - return m.storageSnapshotter.Restore(height, chStorage) + return m.stateStorage.Restore(height, chStorage) }) eg.Go(func() error { defer close(chStorage) - _, err := m.commitSnapshotter.Restore(height, 0, ms, chStorage) + _, err := m.stateCommitment.Restore(height, 0, ms, chStorage) return err }) - return eg.Wait() + if err := eg.Wait(); err != nil { + return err + } + + m.mtx.Lock() + m.migratedVersion = height + m.mtx.Unlock() + + return nil +} + +// writeChangeset writes the Changeset to the db. +func (m *Manager) writeChangeset() error { + for vc := range m.chChangeset { + cs := vc.Changeset + buf := make([]byte, 8) + binary.BigEndian.PutUint64(buf, vc.Version) + csKey := []byte(fmt.Sprintf(migrateChangesetKeyFmt, buf)) + csBytes, err := encoding.MarshalChangeset(cs) + if err != nil { + return fmt.Errorf("failed to marshal changeset: %w", err) + } + + batch := m.db.NewBatch() + defer batch.Close() + + if err := batch.Set(csKey, csBytes); err != nil { + return fmt.Errorf("failed to write changeset to db.Batch: %w", err) + } + if err := batch.Write(); err != nil { + return fmt.Errorf("failed to write changeset to db: %w", err) + } + } + + return nil +} + +// GetMigratedVersion returns the migrated version. +// It is used to check the migrated version in the RootStore. +func (m *Manager) GetMigratedVersion() uint64 { + m.mtx.Lock() + defer m.mtx.Unlock() + return m.migratedVersion +} + +// Sync catches up the Changesets which are committed while the migration is in progress. +// It should be called after the migration is done. +func (m *Manager) Sync() error { + version := m.GetMigratedVersion() + if version == 0 { + return fmt.Errorf("migration is not done yet") + } + version += 1 + + for { + select { + case <-m.chDone: + return nil + default: + buf := make([]byte, 8) + binary.BigEndian.PutUint64(buf, version) + csKey := []byte(fmt.Sprintf(migrateChangesetKeyFmt, buf)) + csBytes, err := m.db.Get(csKey) + if err != nil { + return fmt.Errorf("failed to get changeset from db: %w", err) + } + if csBytes == nil { + // wait for the next changeset + time.Sleep(100 * time.Millisecond) + continue + } + + cs := corestore.NewChangeset() + if err := encoding.UnmarshalChangeset(cs, csBytes); err != nil { + return fmt.Errorf("failed to unmarshal changeset: %w", err) + } + + if err := m.stateCommitment.WriteBatch(cs); err != nil { + return fmt.Errorf("failed to write changeset to commitment: %w", err) + } + if _, err := m.stateCommitment.Commit(version); err != nil { + return fmt.Errorf("failed to commit changeset to commitment: %w", err) + } + if err := m.stateStorage.ApplyChangeset(version, cs); err != nil { + return fmt.Errorf("failed to write changeset to storage: %w", err) + } + + m.mtx.Lock() + m.migratedVersion = version + m.mtx.Unlock() + + version += 1 + } + } } diff --git a/store/migration/manager_test.go b/store/migration/manager_test.go index 69cf3b923863..0985dd561550 100644 --- a/store/migration/manager_test.go +++ b/store/migration/manager_test.go @@ -50,7 +50,7 @@ func setupMigrationManager(t *testing.T) (*Manager, *commitment.CommitStore) { newCommitStore, err := commitment.NewCommitStore(multiTrees1, db1, nil, log.NewNopLogger()) // for store/v2 require.NoError(t, err) - return NewManager(snapshotsManager, newStorageStore, newCommitStore, log.NewNopLogger()), commitStore + return NewManager(db, snapshotsManager, newStorageStore, newCommitStore, log.NewNopLogger()), commitStore } func TestMigrateState(t *testing.T) { @@ -78,17 +78,17 @@ func TestMigrateState(t *testing.T) { for version := uint64(1); version < toVersion; version++ { for _, storeKey := range storeKeys { for i := 0; i < keyCount; i++ { - val, err := m.commitSnapshotter.(*commitment.CommitStore).Get([]byte(storeKey), toVersion-1, []byte(fmt.Sprintf("key-%d-%d", version, i))) + val, err := m.stateCommitment.Get([]byte(storeKey), toVersion-1, []byte(fmt.Sprintf("key-%d-%d", version, i))) require.NoError(t, err) require.Equal(t, []byte(fmt.Sprintf("value-%d-%d", version, i)), val) } } } // check the latest state - val, err := m.commitSnapshotter.(*commitment.CommitStore).Get([]byte("store1"), toVersion-1, []byte("key-100-1")) + val, err := m.stateCommitment.Get([]byte("store1"), toVersion-1, []byte("key-100-1")) require.NoError(t, err) require.Nil(t, val) - val, err = m.commitSnapshotter.(*commitment.CommitStore).Get([]byte("store2"), toVersion-1, []byte("key-100-0")) + val, err = m.stateCommitment.Get([]byte("store2"), toVersion-1, []byte("key-100-0")) require.NoError(t, err) require.Nil(t, val) @@ -96,7 +96,7 @@ func TestMigrateState(t *testing.T) { for version := uint64(1); version < toVersion; version++ { for _, storeKey := range storeKeys { for i := 0; i < keyCount; i++ { - val, err := m.storageSnapshotter.(*storage.StorageStore).Get([]byte(storeKey), toVersion-1, []byte(fmt.Sprintf("key-%d-%d", version, i))) + val, err := m.stateStorage.Get([]byte(storeKey), toVersion-1, []byte(fmt.Sprintf("key-%d-%d", version, i))) require.NoError(t, err) require.Equal(t, []byte(fmt.Sprintf("value-%d-%d", version, i)), val) } diff --git a/store/root/migrate_test.go b/store/root/migrate_test.go new file mode 100644 index 000000000000..63919d667f96 --- /dev/null +++ b/store/root/migrate_test.go @@ -0,0 +1,162 @@ +package root + +import ( + "fmt" + "testing" + "time" + + "github.com/stretchr/testify/suite" + + corestore "cosmossdk.io/core/store" + "cosmossdk.io/log" + "cosmossdk.io/store/v2" + "cosmossdk.io/store/v2/commitment" + "cosmossdk.io/store/v2/commitment/iavl" + dbm "cosmossdk.io/store/v2/db" + "cosmossdk.io/store/v2/migration" + "cosmossdk.io/store/v2/snapshots" + "cosmossdk.io/store/v2/storage" + "cosmossdk.io/store/v2/storage/sqlite" +) + +var ( + storeKeys = []string{"store1", "store2", "store3"} +) + +type MigrateStoreTestSuite struct { + suite.Suite + + rootStore store.RootStore +} + +func TestMigrateStoreTestSuite(t *testing.T) { + suite.Run(t, &MigrateStoreTestSuite{}) +} + +func (s *MigrateStoreTestSuite) SetupTest() { + testLog := log.NewTestLogger(s.T()) + nopLog := log.NewNopLogger() + + mdb := dbm.NewMemDB() + multiTrees := make(map[string]commitment.Tree) + for _, storeKey := range storeKeys { + prefixDB := dbm.NewPrefixDB(mdb, []byte(storeKey)) + multiTrees[storeKey] = iavl.NewIavlTree(prefixDB, nopLog, iavl.DefaultConfig()) + } + orgSC, err := commitment.NewCommitStore(multiTrees, mdb, nil, testLog) + s.Require().NoError(err) + + // apply changeset against the original store + toVersion := uint64(200) + keyCount := 10 + for version := uint64(1); version <= toVersion; version++ { + cs := corestore.NewChangeset() + for _, storeKey := range storeKeys { + for i := 0; i < keyCount; i++ { + cs.Add([]byte(storeKey), []byte(fmt.Sprintf("key-%d-%d", version, i)), []byte(fmt.Sprintf("value-%d-%d", version, i)), false) + } + } + s.Require().NoError(orgSC.WriteBatch(cs)) + _, err = orgSC.Commit(version) + s.Require().NoError(err) + } + + // create a new storage and commitment stores + sqliteDB, err := sqlite.New(s.T().TempDir()) + s.Require().NoError(err) + ss := storage.NewStorageStore(sqliteDB, nil, testLog) + + multiTrees1 := make(map[string]commitment.Tree) + for _, storeKey := range storeKeys { + multiTrees1[storeKey] = iavl.NewIavlTree(dbm.NewMemDB(), nopLog, iavl.DefaultConfig()) + } + sc, err := commitment.NewCommitStore(multiTrees1, dbm.NewMemDB(), nil, testLog) + s.Require().NoError(err) + + snapshotsStore, err := snapshots.NewStore(s.T().TempDir()) + s.Require().NoError(err) + snapshotManager := snapshots.NewManager(snapshotsStore, snapshots.NewSnapshotOptions(1500, 2), orgSC, nil, nil, testLog) + migrationManager := migration.NewManager(dbm.NewMemDB(), snapshotManager, ss, sc, testLog) + + // assume no storage store, simulate the migration process + s.rootStore, err = New(testLog, ss, orgSC, migrationManager, nil) + s.Require().NoError(err) +} + +func (s *MigrateStoreTestSuite) TestMigrateState() { + err := s.rootStore.LoadLatestVersion() + s.Require().NoError(err) + originalLatestVersion, err := s.rootStore.GetLatestVersion() + s.Require().NoError(err) + + // start the migration process + s.rootStore.StartMigration() + + // continue to apply changeset against the original store + latestVersion := originalLatestVersion + 1 + keyCount := 10 + for ; latestVersion < 2*originalLatestVersion; latestVersion++ { + cs := corestore.NewChangeset() + for _, storeKey := range storeKeys { + for i := 0; i < keyCount; i++ { + cs.Add([]byte(storeKey), []byte(fmt.Sprintf("key-%d-%d", latestVersion, i)), []byte(fmt.Sprintf("value-%d-%d", latestVersion, i)), false) + } + } + _, err := s.rootStore.WorkingHash(cs) + s.Require().NoError(err) + _, err = s.rootStore.Commit(cs) + s.Require().NoError(err) + + // check if the migration is completed + ver, err := s.rootStore.GetStateStorage().GetLatestVersion() + s.Require().NoError(err) + if ver == latestVersion { + break + } + + // add some delay to simulate the consensus process + time.Sleep(100 * time.Millisecond) + } + + // check if the migration is successful + version, err := s.rootStore.GetLatestVersion() + s.Require().NoError(err) + s.Require().Equal(latestVersion, version) + + // query against the migrated store + for version := uint64(1); version <= latestVersion; version++ { + for _, storeKey := range storeKeys { + for i := 0; i < keyCount; i++ { + targetVersion := version + if version < originalLatestVersion { + targetVersion = originalLatestVersion + } + res, err := s.rootStore.Query([]byte(storeKey), targetVersion, []byte(fmt.Sprintf("key-%d-%d", version, i)), true) + s.Require().NoError(err) + s.Require().Equal([]byte(fmt.Sprintf("value-%d-%d", version, i)), res.Value) + } + } + } + + // prune the old versions + err = s.rootStore.Prune(latestVersion - 1) + s.Require().NoError(err) + + // apply changeset against the migrated store + for version := latestVersion + 1; version <= latestVersion+10; version++ { + cs := corestore.NewChangeset() + for _, storeKey := range storeKeys { + for i := 0; i < keyCount; i++ { + cs.Add([]byte(storeKey), []byte(fmt.Sprintf("key-%d-%d", version, i)), []byte(fmt.Sprintf("value-%d-%d", version, i)), false) + } + } + _, err := s.rootStore.WorkingHash(cs) + s.Require().NoError(err) + _, err = s.rootStore.Commit(cs) + s.Require().NoError(err) + } + + version, err = s.rootStore.GetLatestVersion() + s.Require().NoError(err) + s.Require().Equal(latestVersion+10, version) +} diff --git a/store/root/store.go b/store/root/store.go index bd751f76bca9..68944c209d24 100644 --- a/store/root/store.go +++ b/store/root/store.go @@ -4,6 +4,7 @@ import ( "bytes" "fmt" "slices" + "sync" "time" "github.com/cockroachdb/errors" @@ -14,6 +15,7 @@ import ( "cosmossdk.io/log" "cosmossdk.io/store/v2" "cosmossdk.io/store/v2/metrics" + "cosmossdk.io/store/v2/migration" "cosmossdk.io/store/v2/proof" ) @@ -27,8 +29,8 @@ type Store struct { logger log.Logger initialVersion uint64 - // stateStore reflects the state storage backend - stateStore store.VersionedDatabase + // stateStorage reflects the state storage backend + stateStorage store.VersionedDatabase // stateCommitment reflects the state commitment (SC) backend stateCommitment store.Committer @@ -44,30 +46,43 @@ type Store struct { // telemetry reflects a telemetry agent responsible for emitting metrics (if any) telemetry metrics.StoreMetrics + + // Migration related fields + // migrationManager reflects the migration manager used to migrate state from v1 to v2 + migrationManager *migration.Manager + // chChangeset reflects the channel used to send the changeset to the migration manager + chChangeset chan *migration.VersionedChangeset + // chDone reflects the channel used to signal the migration manager that the migration + // is done + chDone chan struct{} + // isMigrating reflects whether the store is currently migrating + isMigrating bool } func New( logger log.Logger, ss store.VersionedDatabase, sc store.Committer, + mm *migration.Manager, m metrics.StoreMetrics, ) (store.RootStore, error) { return &Store{ - logger: logger.With("module", "root_store"), - initialVersion: 1, - stateStore: ss, - stateCommitment: sc, - telemetry: m, + logger: logger.With("module", "root_store"), + initialVersion: 1, + stateStorage: ss, + stateCommitment: sc, + migrationManager: mm, + telemetry: m, }, nil } // Close closes the store and resets all internal fields. Note, Close() is NOT // idempotent and should only be called once. func (s *Store) Close() (err error) { - err = errors.Join(err, s.stateStore.Close()) + err = errors.Join(err, s.stateStorage.Close()) err = errors.Join(err, s.stateCommitment.Close()) - s.stateStore = nil + s.stateStorage = nil s.stateCommitment = nil s.lastCommitInfo = nil s.commitHeader = nil @@ -107,7 +122,7 @@ func (s *Store) StateAt(v uint64) (corestore.ReaderMap, error) { } func (s *Store) GetStateStorage() store.VersionedDatabase { - return s.stateStore + return s.stateStorage } func (s *Store) GetStateCommitment() store.Committer { @@ -116,32 +131,17 @@ func (s *Store) GetStateCommitment() store.Committer { // LastCommitID returns a CommitID based off of the latest internal CommitInfo. // If an internal CommitInfo is not set, a new one will be returned with only the -// latest version set, which is based off of the SS view. +// latest version set, which is based off of the SC view. func (s *Store) LastCommitID() (proof.CommitID, error) { if s.lastCommitInfo != nil { return s.lastCommitInfo.CommitID(), nil } - // XXX/TODO: We cannot use SS to get the latest version when lastCommitInfo - // is nil if SS is flushed asynchronously. This is because the latest version - // in SS might not be the latest version in the SC stores. - // - // Ref: https://github.com/cosmos/cosmos-sdk/issues/17314 - latestVersion, err := s.stateStore.GetLatestVersion() - if err != nil { - return proof.CommitID{}, err - } - - // sanity check: ensure integrity of latest version against SC - scVersion, err := s.stateCommitment.GetLatestVersion() + latestVersion, err := s.stateCommitment.GetLatestVersion() if err != nil { return proof.CommitID{}, err } - if scVersion != latestVersion { - return proof.CommitID{}, fmt.Errorf("SC and SS version mismatch; got: %d, expected: %d", scVersion, latestVersion) - } - return proof.CommitID{Version: latestVersion}, nil } @@ -163,7 +163,7 @@ func (s *Store) Query(storeKey []byte, version uint64, key []byte, prove bool) ( defer s.telemetry.MeasureSince(now, "root_store", "query") } - val, err := s.stateStore.Get(storeKey, version, key) + val, err := s.stateStorage.Get(storeKey, version, key) if err != nil || val == nil { // fallback to querying SC backend if not found in SS backend // @@ -256,6 +256,21 @@ func (s *Store) WorkingHash(cs *corestore.Changeset) ([]byte, error) { } if s.workingHash == nil { + // if migration is in progress, send the changeset to the migration manager + if s.isMigrating { + // if the migration manager has already migrated to the version, close the + // channels and replace the state commitment + if s.migrationManager.GetMigratedVersion() == s.lastCommitInfo.Version { + close(s.chDone) + close(s.chChangeset) + s.isMigrating = false + s.stateCommitment = s.migrationManager.GetStateCommitment() + s.logger.Info("migration completed", "version", s.lastCommitInfo.Version) + } else { + s.chChangeset <- &migration.VersionedChangeset{Version: s.lastCommitInfo.Version + 1, Changeset: cs} + } + } + if err := s.writeSC(cs); err != nil { return nil, err } @@ -291,7 +306,13 @@ func (s *Store) Commit(cs *corestore.Changeset) ([]byte, error) { // commit SS async eg.Go(func() error { - if err := s.stateStore.ApplyChangeset(version, cs); err != nil { + // if we're migrating, we don't want to commit to the state storage + // to avoid parallel writes + if s.isMigrating { + return nil + } + + if err := s.stateStorage.ApplyChangeset(version, cs); err != nil { return fmt.Errorf("failed to commit SS: %w", err) } @@ -327,7 +348,7 @@ func (s *Store) Prune(version uint64) error { defer s.telemetry.MeasureSince(now, "root_store", "prune") } - if err := s.stateStore.Prune(version); err != nil { + if err := s.stateStorage.Prune(version); err != nil { return fmt.Errorf("failed to prune SS store: %w", err) } @@ -338,6 +359,40 @@ func (s *Store) Prune(version uint64) error { return nil } +// StartMigration starts the migration process and initializes the channels. +// An error is returned if migration is already in progress. +// NOTE: This method should only be called once after loadVersion. +func (s *Store) StartMigration() error { + if s.isMigrating { + return fmt.Errorf("migration already in progress") + } + + // buffer at most 1 changeset, if the receiver is behind attempting to buffer + // more than 1 will block. + s.chChangeset = make(chan *migration.VersionedChangeset, 1) + // it is used to signal the migration manager that the migration is done + s.chDone = make(chan struct{}) + + s.isMigrating = true + + mtx := sync.Mutex{} + mtx.Lock() + go func() { + version := s.lastCommitInfo.Version + s.logger.Info("starting migration", "version", version) + mtx.Unlock() + if err := s.migrationManager.Start(version, s.chChangeset, s.chDone); err != nil { + s.logger.Error("failed to start migration", "err", err) + } + }() + + // wait for the migration manager to start + mtx.Lock() + defer mtx.Unlock() + + return nil +} + // writeSC accepts a Changeset and writes that as a batch to the underlying SC // tree, which allows us to retrieve the working hash of the SC tree. Finally, // we construct a *CommitInfo and set that as lastCommitInfo. Note, this should diff --git a/store/root/store_test.go b/store/root/store_test.go index 6773d496c7b0..d6c52367a265 100644 --- a/store/root/store_test.go +++ b/store/root/store_test.go @@ -52,7 +52,7 @@ func (s *RootStoreTestSuite) SetupTest() { sc, err := commitment.NewCommitStore(map[string]commitment.Tree{testStoreKey: tree, testStoreKey2: tree2, testStoreKey3: tree3}, dbm.NewMemDB(), nil, noopLog) s.Require().NoError(err) - rs, err := New(noopLog, ss, sc, nil) + rs, err := New(noopLog, ss, sc, nil, nil) s.Require().NoError(err) s.rootStore = rs @@ -68,7 +68,7 @@ func (s *RootStoreTestSuite) TestGetStateCommitment() { } func (s *RootStoreTestSuite) TestGetStateStorage() { - s.Require().Equal(s.rootStore.GetStateStorage(), s.rootStore.(*Store).stateStore) + s.Require().Equal(s.rootStore.GetStateStorage(), s.rootStore.(*Store).stateStorage) } func (s *RootStoreTestSuite) TestSetInitialVersion() { diff --git a/store/snapshots/manager_test.go b/store/snapshots/manager_test.go index b06c28216320..8295bdf5f665 100644 --- a/store/snapshots/manager_test.go +++ b/store/snapshots/manager_test.go @@ -232,6 +232,17 @@ func TestManager_Restore(t *testing.T) { Metadata: types.Metadata{ChunkHashes: checksums(chunks)}, }) require.NoError(t, err) + + // Feeding the chunks should work + for i, chunk := range chunks { + done, err := manager.RestoreChunk(chunk) + require.NoError(t, err) + if i == len(chunks)-1 { + assert.True(t, done) + } else { + assert.False(t, done) + } + } } func TestManager_TakeError(t *testing.T) { diff --git a/store/storage/pebbledb/batch.go b/store/storage/pebbledb/batch.go index ae542b94bfc2..fed8c8a1b34c 100644 --- a/store/storage/pebbledb/batch.go +++ b/store/storage/pebbledb/batch.go @@ -41,8 +41,9 @@ func (b *Batch) Size() int { return b.batch.Len() } -func (b *Batch) Reset() { +func (b *Batch) Reset() error { b.batch.Reset() + return nil } func (b *Batch) set(storeKey []byte, tombstone uint64, key, value []byte) error { diff --git a/store/storage/rocksdb/batch.go b/store/storage/rocksdb/batch.go index 65954f1fa237..98d7d33f152e 100644 --- a/store/storage/rocksdb/batch.go +++ b/store/storage/rocksdb/batch.go @@ -44,8 +44,9 @@ func (b Batch) Size() int { return len(b.batch.Data()) } -func (b Batch) Reset() { +func (b Batch) Reset() error { b.batch.Clear() + return nil } func (b Batch) Set(storeKey []byte, key, value []byte) error { diff --git a/store/storage/sqlite/batch.go b/store/storage/sqlite/batch.go index fe04f1c265d2..ceb5e29ee625 100644 --- a/store/storage/sqlite/batch.go +++ b/store/storage/sqlite/batch.go @@ -23,19 +23,21 @@ type batchOp struct { } type Batch struct { + db *sql.DB tx *sql.Tx ops []batchOp size int version uint64 } -func NewBatch(storage *sql.DB, version uint64) (*Batch, error) { - tx, err := storage.Begin() +func NewBatch(db *sql.DB, version uint64) (*Batch, error) { + tx, err := db.Begin() if err != nil { return nil, fmt.Errorf("failed to create SQL transaction: %w", err) } return &Batch{ + db: db, tx: tx, ops: make([]batchOp, 0), version: version, @@ -46,10 +48,18 @@ func (b *Batch) Size() int { return b.size } -func (b *Batch) Reset() { +func (b *Batch) Reset() error { b.ops = nil b.ops = make([]batchOp, 0) b.size = 0 + + tx, err := b.db.Begin() + if err != nil { + return err + } + + b.tx = tx + return nil } func (b *Batch) Set(storeKey []byte, key, value []byte) error { diff --git a/store/storage/store.go b/store/storage/store.go index 8179836619f6..436682c7f500 100644 --- a/store/storage/store.go +++ b/store/storage/store.go @@ -130,11 +130,13 @@ func (ss *StorageStore) Restore(version uint64, chStorage <-chan *corestore.Stat if err := b.Set(kvPair.Actor, kv.Key, kv.Value); err != nil { return err } - if b.Size() > defaultBatchBufferSize { if err := b.Write(); err != nil { return err } + if err := b.Reset(); err != nil { + return err + } } } } @@ -145,7 +147,7 @@ func (ss *StorageStore) Restore(version uint64, chStorage <-chan *corestore.Stat } } - return ss.db.SetLatestVersion(version) + return nil } // Close closes the store. diff --git a/store/store.go b/store/store.go index e8437eee756e..bffede6ec3a4 100644 --- a/store/store.go +++ b/store/store.go @@ -72,6 +72,12 @@ type RootStore interface { // old versions of the RootStore by the CLI. Prune(version uint64) error + // StartMigration starts a migration process to migrate the RootStore/v1 to the + // SS and SC backends of store/v2. + // It runs in a separate goroutine and replaces the current RootStore with the + // migrated new backends once the migration is complete. + StartMigration() error + // SetMetrics sets the telemetry handler on the RootStore. SetMetrics(m metrics.Metrics) From 3cf87f96ceb3eedd57954faf42f910331656adae Mon Sep 17 00:00:00 2001 From: Snoppy Date: Thu, 21 Mar 2024 16:58:52 +0800 Subject: [PATCH 02/20] chore: fix typos (#19813) --- docs/architecture/PROCESS.md | 2 +- docs/rfc/PROCESS.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/architecture/PROCESS.md b/docs/architecture/PROCESS.md index ff6ba408b3e6..a237d0c65360 100644 --- a/docs/architecture/PROCESS.md +++ b/docs/architecture/PROCESS.md @@ -8,7 +8,7 @@ ## What is an ADR? -An ADR is a document to document an implementation and design that may or may not have been discussed in an RFC. While an RFC is meant to replace synchronous communication in a distributed environment, an ADR is meant to document an already made decision. An ADR won't come with much of a communication overhead because the discussion was recorded in an RFC or a synchronous discussion. If the consensus came from a synchoronus discussion then a short excerpt should be added to the ADR to explain the goals. +An ADR is a document to document an implementation and design that may or may not have been discussed in an RFC. While an RFC is meant to replace synchronous communication in a distributed environment, an ADR is meant to document an already made decision. An ADR won't come with much of a communication overhead because the discussion was recorded in an RFC or a synchronous discussion. If the consensus came from a synchronous discussion then a short excerpt should be added to the ADR to explain the goals. ## ADR life cycle diff --git a/docs/rfc/PROCESS.md b/docs/rfc/PROCESS.md index f6e96f16787b..9517868b5568 100644 --- a/docs/rfc/PROCESS.md +++ b/docs/rfc/PROCESS.md @@ -14,7 +14,7 @@ The main difference the Cosmos SDK is defining as a differentiation between RFC ## RFC life cycle -RFC creation is an **iterative** process. An RFC is meant as a distributed colloboration session, it may have many comments and is usually the bi-product of no working group or synchronous communication +RFC creation is an **iterative** process. An RFC is meant as a distributed collaboration session, it may have many comments and is usually the bi-product of no working group or synchronous communication 1. Proposals could start with a new GitHub Issue, be a result of existing Issues or a discussion. From d67d1458834139c922a8502e4c3b41c7644d3cb4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 09:59:43 +0100 Subject: [PATCH 03/20] build(deps): Bump github.com/pelletier/go-toml/v2 from 2.1.1 to 2.2.0 in /tools/hubl (#19806) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- client/v2/go.mod | 2 +- client/v2/go.sum | 4 ++-- go.mod | 2 +- go.sum | 4 ++-- simapp/go.mod | 2 +- simapp/go.sum | 4 ++-- simapp/gomod2nix.toml | 4 ++-- tests/go.mod | 2 +- tests/go.sum | 4 ++-- tests/starship/tests/go.mod | 2 +- tests/starship/tests/go.sum | 4 ++-- tools/confix/go.mod | 2 +- tools/confix/go.sum | 4 ++-- tools/cosmovisor/go.mod | 2 +- tools/cosmovisor/go.sum | 4 ++-- tools/hubl/go.mod | 2 +- tools/hubl/go.sum | 4 ++-- x/accounts/defaults/lockup/go.mod | 2 +- x/accounts/defaults/lockup/go.sum | 4 ++-- x/accounts/go.mod | 2 +- x/accounts/go.sum | 4 ++-- x/auth/go.mod | 2 +- x/auth/go.sum | 4 ++-- x/authz/go.mod | 2 +- x/authz/go.sum | 4 ++-- x/bank/go.mod | 2 +- x/bank/go.sum | 4 ++-- x/circuit/go.mod | 2 +- x/circuit/go.sum | 4 ++-- x/distribution/go.mod | 2 +- x/distribution/go.sum | 4 ++-- x/evidence/go.mod | 2 +- x/evidence/go.sum | 4 ++-- x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 4 ++-- x/gov/go.mod | 2 +- x/gov/go.sum | 4 ++-- x/group/go.mod | 2 +- x/group/go.sum | 4 ++-- x/mint/go.mod | 2 +- x/mint/go.sum | 4 ++-- x/nft/go.mod | 2 +- x/nft/go.sum | 4 ++-- x/params/go.mod | 2 +- x/params/go.sum | 4 ++-- x/protocolpool/go.mod | 2 +- x/protocolpool/go.sum | 4 ++-- x/slashing/go.mod | 2 +- x/slashing/go.sum | 4 ++-- x/staking/go.mod | 2 +- x/staking/go.sum | 4 ++-- x/upgrade/go.mod | 2 +- x/upgrade/go.sum | 4 ++-- 53 files changed, 80 insertions(+), 80 deletions(-) diff --git a/client/v2/go.mod b/client/v2/go.mod index b24d41b428d7..821bbce49f63 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -118,7 +118,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/client/v2/go.sum b/client/v2/go.sum index dffbcc92afda..9f04d1e09392 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -561,8 +561,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/go.mod b/go.mod index 895c17bbd0ae..47067100387d 100644 --- a/go.mod +++ b/go.mod @@ -136,7 +136,7 @@ require ( github.com/nxadm/tail v1.4.8 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/go.sum b/go.sum index 57522eaf4005..2605bbecb2ea 100644 --- a/go.sum +++ b/go.sum @@ -559,8 +559,8 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/simapp/go.mod b/simapp/go.mod index 8490159af19c..45af063cb38c 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -164,7 +164,7 @@ require ( github.com/muesli/termenv v0.15.2 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/simapp/go.sum b/simapp/go.sum index 7fd1bbc72fbb..40599c836e1a 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -850,8 +850,8 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index 055502e8a139..8dfb96a08a78 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -384,8 +384,8 @@ schema = 3 version = "v1.1.0" hash = "sha256-U4IS0keJa4BSBSeEBqtIV1Zg6N4b0zFiKfzN9ua4pWQ=" [mod."github.com/pelletier/go-toml/v2"] - version = "v2.1.1" - hash = "sha256-BQtflYQ8Dt7FL/yFI9OnxwvsRk0oEO37ZXuGXFveVpo=" + version = "v2.2.0" + hash = "sha256-hbjvVGN0puPwpMq2bDlixeuUj8+we3BOgwZuY7/SM+Y=" [mod."github.com/petermattis/goid"] version = "v0.0.0-20231207134359-e60b3f734c67" hash = "sha256-73DbyhUTwYhqmvbcI96CNblTrfl6uz9OvM6z/h8j5TM=" diff --git a/tests/go.mod b/tests/go.mod index b21d6d8ce9b8..2c3b075f3957 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -164,7 +164,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/tests/go.sum b/tests/go.sum index c9c8ad192032..eb3683b46def 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -832,8 +832,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/tests/starship/tests/go.mod b/tests/starship/tests/go.mod index 8df32a66da17..abe71f582536 100644 --- a/tests/starship/tests/go.mod +++ b/tests/starship/tests/go.mod @@ -192,7 +192,7 @@ require ( github.com/onsi/gomega v1.27.4 // indirect github.com/opencontainers/image-spec v1.1.0-rc2.0.20221005185240-3a7f492d3f1b // indirect github.com/opencontainers/runc v1.1.12 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/tests/starship/tests/go.sum b/tests/starship/tests/go.sum index 7c71de0441ba..8ed047a58f53 100644 --- a/tests/starship/tests/go.sum +++ b/tests/starship/tests/go.sum @@ -832,8 +832,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/tools/confix/go.mod b/tools/confix/go.mod index d08990903af6..917ecb3440b9 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -6,7 +6,7 @@ require ( github.com/cosmos/cosmos-sdk v0.50.5 github.com/creachadair/atomicfile v0.3.3 github.com/creachadair/tomledit v0.0.26 - github.com/pelletier/go-toml/v2 v2.1.1 + github.com/pelletier/go-toml/v2 v2.2.0 github.com/spf13/cobra v1.8.0 github.com/spf13/viper v1.18.2 golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 diff --git a/tools/confix/go.sum b/tools/confix/go.sum index c386cf1cca54..2de6fe6180f1 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -570,8 +570,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index 6f9586bd3cdf..14868b9e9c9c 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -124,7 +124,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index b3a06d571b71..1065559c29e2 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -832,8 +832,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/tools/hubl/go.mod b/tools/hubl/go.mod index 8b36b25760db..67e9829ee8fe 100644 --- a/tools/hubl/go.mod +++ b/tools/hubl/go.mod @@ -10,7 +10,7 @@ require ( github.com/cockroachdb/errors v1.11.1 github.com/cosmos/cosmos-sdk v0.50.5 github.com/manifoldco/promptui v0.9.0 - github.com/pelletier/go-toml/v2 v2.1.1 + github.com/pelletier/go-toml/v2 v2.2.0 github.com/spf13/cobra v1.8.0 google.golang.org/grpc v1.62.1 google.golang.org/protobuf v1.33.0 diff --git a/tools/hubl/go.sum b/tools/hubl/go.sum index becfc2ee033f..b43e01d0ae34 100644 --- a/tools/hubl/go.sum +++ b/tools/hubl/go.sum @@ -570,8 +570,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index 0aa46ff0fc86..4bcb06047d73 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -109,7 +109,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/accounts/defaults/lockup/go.sum b/x/accounts/defaults/lockup/go.sum index 196fd6a9e879..a9d9a2495952 100644 --- a/x/accounts/defaults/lockup/go.sum +++ b/x/accounts/defaults/lockup/go.sum @@ -523,8 +523,8 @@ github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144T github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= github.com/pelletier/go-toml/v2 v2.0.8/go.mod h1:vuYfssBdrU2XDZ9bYydBu6t+6a6PYNcZljzZR9VXg+4= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 6121fe4e2e33..b455a0fad116 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -113,7 +113,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/accounts/go.sum b/x/accounts/go.sum index bf644ddab1de..7f434ef0d373 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/auth/go.mod b/x/auth/go.mod index 9c257ae380dd..31ac6444143f 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -120,7 +120,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/auth/go.sum b/x/auth/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/auth/go.sum +++ b/x/auth/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/authz/go.mod b/x/authz/go.mod index 1262c450495b..d67729761d15 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -116,7 +116,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/authz/go.sum b/x/authz/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/bank/go.mod b/x/bank/go.mod index 15d50337d5ac..b400b3d00783 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -115,7 +115,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/bank/go.sum b/x/bank/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 6593e91b9c31..9bab85d2f69d 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -114,7 +114,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/distribution/go.mod b/x/distribution/go.mod index c85f5a62d6a0..6c80a28c0e48 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -118,7 +118,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect github.com/prometheus/client_golang v1.19.0 // indirect diff --git a/x/distribution/go.sum b/x/distribution/go.sum index 1e7095cfdb39..079a1243d684 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -555,8 +555,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index f2458d5ec112..ce2381d5a76e 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -116,7 +116,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 7f341c716a56..0ff48ecf3c34 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -121,7 +121,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index 1746f5fcaed9..7891e8dc7399 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -563,8 +563,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/gov/go.mod b/x/gov/go.mod index 54cd2315be84..44b3c88cdc5f 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -122,7 +122,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/gov/go.sum b/x/gov/go.sum index 1746f5fcaed9..7891e8dc7399 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -563,8 +563,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/group/go.mod b/x/group/go.mod index e9034adfdc8b..bd05585efc09 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -124,7 +124,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/group/go.sum b/x/group/go.sum index 8220ce575da3..040f3920ae6d 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -563,8 +563,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/mint/go.mod b/x/mint/go.mod index 0a27a9f890d3..0bfc6df7602a 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -115,7 +115,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/mint/go.sum b/x/mint/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/nft/go.mod b/x/nft/go.mod index 1a4dbdcc36ef..4c1d939573e7 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -114,7 +114,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/nft/go.sum b/x/nft/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/params/go.mod b/x/params/go.mod index 4864fc565e1c..3b1b2e783f16 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -116,7 +116,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/params/go.sum b/x/params/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 7dd949f0bfd0..dd94596edb45 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -116,7 +116,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index b77840696322..b965c8dde259 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -117,7 +117,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/slashing/go.sum b/x/slashing/go.sum index f3e1b4f47150..04d17199a06c 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -555,8 +555,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/staking/go.mod b/x/staking/go.mod index d2e52c3fbca4..6d554a890e61 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -118,7 +118,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/staking/go.sum b/x/staking/go.sum index 046ebfecd550..7fe9f10d9703 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -553,8 +553,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 5e3ad6c9ac12..22cb2f093aa1 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -141,7 +141,7 @@ require ( github.com/mtibben/percent v0.2.1 // indirect github.com/oasisprotocol/curve25519-voi v0.0.0-20230904125328-1f23a7beb09a // indirect github.com/oklog/run v1.1.0 // indirect - github.com/pelletier/go-toml/v2 v2.1.1 // indirect + github.com/pelletier/go-toml/v2 v2.2.0 // indirect github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index d3f21be0cced..0cec244fb455 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -850,8 +850,8 @@ github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0Mw github.com/pascaldekloe/goe v0.1.0/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pborman/uuid v1.2.0/go.mod h1:X/NO0urCmaxf9VXbdlT7C2Yzkj2IKimNn4k+gtPdI/k= github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic= -github.com/pelletier/go-toml/v2 v2.1.1 h1:LWAJwfNvjQZCFIDKWYQaM62NcYeYViCmWIwmOStowAI= -github.com/pelletier/go-toml/v2 v2.1.1/go.mod h1:tJU2Z3ZkXwnxa4DPO899bsyIoywizdUvyaeZurnPPDc= +github.com/pelletier/go-toml/v2 v2.2.0 h1:QLgLl2yMN7N+ruc31VynXs1vhMZa7CeHHejIeBAsoHo= +github.com/pelletier/go-toml/v2 v2.2.0/go.mod h1:1t835xjRzz80PqgE6HHgN2JOsmgYu/h4qDAS4n929Rs= github.com/performancecopilot/speed v3.0.0+incompatible/go.mod h1:/CLtqpZ5gBg1M9iaPbIdPPGyKcA8hKdoy6hAWba7Yac= github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5/go.mod h1:jvVRKCrJTQWu0XVbaOlby/2lO20uSCHEMzzplHXte1o= github.com/petermattis/goid v0.0.0-20231207134359-e60b3f734c67 h1:jik8PHtAIsPlCRJjJzl4udgEf7hawInF9texMeO2jrU= From 13db28a39b33006185a9e26bd30c83694cfa9007 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 21 Mar 2024 15:47:35 +0530 Subject: [PATCH 04/20] build(deps): Bump cosmossdk.io/store from 1.0.2 to 1.1.0 in /x/evidence (#19808) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- x/evidence/go.mod | 10 +++++----- x/evidence/go.sum | 20 ++++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/x/evidence/go.mod b/x/evidence/go.mod index ce2381d5a76e..718f6b6d47d8 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -10,7 +10,7 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/log v1.3.1 cosmossdk.io/math v1.3.0 - cosmossdk.io/store v1.0.2 + cosmossdk.io/store v1.1.0 github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 @@ -55,7 +55,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/iavl v1.0.0 // indirect + github.com/cosmos/iavl v1.1.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect github.com/danieljoos/wincred v1.2.0 // indirect @@ -67,7 +67,7 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dustin/go-humanize v1.0.1 // indirect github.com/dvsekhvalnov/jose2go v1.6.0 // indirect - github.com/emicklei/dot v1.6.0 // indirect + github.com/emicklei/dot v1.6.1 // indirect github.com/fatih/color v1.15.0 // indirect github.com/felixge/httpsnoop v1.0.4 // indirect github.com/fsnotify/fsnotify v1.7.0 // indirect @@ -123,7 +123,7 @@ require ( github.com/prometheus/client_golang v1.19.0 // indirect github.com/prometheus/client_model v0.6.0 // indirect github.com/prometheus/common v0.50.0 // indirect - github.com/prometheus/procfs v0.12.0 // indirect + github.com/prometheus/procfs v0.13.0 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rogpeppe/go-internal v1.12.0 // indirect github.com/rs/cors v1.8.3 // indirect @@ -147,7 +147,7 @@ require ( go.etcd.io/bbolt v1.3.7 // indirect go.uber.org/multierr v1.11.0 // indirect golang.org/x/crypto v0.21.0 // indirect - golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 // indirect + golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f // indirect golang.org/x/mod v0.15.0 // indirect golang.org/x/net v0.22.0 // indirect golang.org/x/sync v0.6.0 // indirect diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 7fe9f10d9703..21b29d66575d 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -12,8 +12,8 @@ cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= -cosmossdk.io/store v1.0.2 h1:lSg5BTvJBHUDwswNNyeh4K/CbqiHER73VU4nDNb8uk0= -cosmossdk.io/store v1.0.2/go.mod h1:EFtENTqVTuWwitGW1VwaBct+yDagk7oG/axBMPH+FXs= +cosmossdk.io/store v1.1.0 h1:LnKwgYMc9BInn9PhpTFEQVbL9UK475G2H911CGGnWHk= +cosmossdk.io/store v1.1.0/go.mod h1:oZfW/4Fc/zYqu3JmQcQdUJ3fqu5vnYTn3LZFFy8P8ng= cosmossdk.io/x/tx v0.13.1 h1:Mg+EMp67Pz+NukbJqYxuo8uRp7N/a9uR+oVS9pONtj8= cosmossdk.io/x/tx v0.13.1/go.mod h1:CBCU6fsRVz23QGFIQBb1DNX2DztJCf3jWyEkHY2nJQ0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= @@ -143,8 +143,8 @@ github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= -github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= -github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= +github.com/cosmos/iavl v1.1.1 h1:64nTi8s3gEoGqhA8TyAWFWfz7/pg0anKzHNSc1ETc7Q= +github.com/cosmos/iavl v1.1.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= github.com/cosmos/ics23/go v0.10.0/go.mod h1:ZfJSmng/TBNTBkFemHHHj5YY7VAU/MBU980F4VU1NG0= github.com/cosmos/ledger-cosmos-go v0.13.3 h1:7ehuBGuyIytsXbd4MP43mLeoN2LTOEnk5nvue4rK+yM= @@ -189,8 +189,8 @@ github.com/eapache/go-resiliency v1.1.0/go.mod h1:kFI+JgMyC7bLPUVY133qvEBtVayf5m github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21/go.mod h1:+020luEh2TKB4/GOp8oxxtq0Daoen/Cii55CzbTV6DU= github.com/eapache/queue v1.1.0/go.mod h1:6eCeP0CKFpHLu8blIFXhExK/dRa7WDZfr6jVFPTqq+I= github.com/edsrzf/mmap-go v1.0.0/go.mod h1:YO35OhQPt3KJa3ryjFM5Bs14WD66h8eGKpfaBNrHW5M= -github.com/emicklei/dot v1.6.0 h1:vUzuoVE8ipzS7QkES4UfxdpCwdU2U97m2Pb2tQCoYRY= -github.com/emicklei/dot v1.6.0/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= +github.com/emicklei/dot v1.6.1 h1:ujpDlBkkwgWUY+qPId5IwapRW/xEoligRSYjioR6DFI= +github.com/emicklei/dot v1.6.1/go.mod h1:DeV7GvQtIw4h2u73RKBkkFdvVAz0D9fzeJrgPW6gy/s= github.com/envoyproxy/go-control-plane v0.6.9/go.mod h1:SBwIajubJHhxtWwsL9s8ss4safvEdbitLhGGK48rN6g= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -603,8 +603,8 @@ github.com/prometheus/procfs v0.0.2/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsT github.com/prometheus/procfs v0.0.8/go.mod h1:7Qr8sr6344vo1JqZ6HhLceV9o3AJ1Ff+GxbHq6oeK9A= github.com/prometheus/procfs v0.1.3/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= github.com/prometheus/procfs v0.3.0/go.mod h1:lV6e/gmhEcM9IjHGsFOCxxuZ+z1YqCvr4OA4YeYWdaU= -github.com/prometheus/procfs v0.12.0 h1:jluTpSng7V9hY0O2R9DzzJHYb2xULk9VTR1V1R/k6Bo= -github.com/prometheus/procfs v0.12.0/go.mod h1:pcuDEFsWDnvcgNzo4EEweacyhjeA9Zk3cnaOZAZEfOo= +github.com/prometheus/procfs v0.13.0 h1:GqzLlQyfsPbaEHaQkO7tbDlriv/4o5Hudv6OXHGKX7o= +github.com/prometheus/procfs v0.13.0/go.mod h1:cd4PFCR54QLnGKPaKGA6l+cfuNXtht43ZKY6tow0Y1g= github.com/rcrowley/go-metrics v0.0.0-20181016184325-3113b8401b8a/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 h1:N/ElC8H3+5XpJzTSTfLsJV/mx9Q9g7kxmchpfZyxgzM= github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475/go.mod h1:bCqnVzQkZxMG4s8nGwiZ5l3QUCyqpo9Y+/ZMZ9VjZe4= @@ -754,8 +754,8 @@ golang.org/x/crypto v0.21.0/go.mod h1:0BP7YvVV9gBbVKyeTG0Gyn+gZm94bibOW5BjDEYAOM golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225 h1:LfspQV/FYTatPTr/3HzIcmiUFH7PGP+OQ6mgDYo3yuQ= -golang.org/x/exp v0.0.0-20240222234643-814bf88cf225/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= +golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f h1:3CW0unweImhOzd5FmYuRsD4Y4oQFKZIjAnKbjV4WIrw= +golang.org/x/exp v0.0.0-20240314144324-c7f7c6466f7f/go.mod h1:CxmFvTBINI24O/j8iY7H1xHzx2i4OsyguNBmN/uPtqc= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= From 9933a444c4d92fc6784a9f828e5d4ebff9b81395 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Toledano?= Date: Thu, 21 Mar 2024 12:21:19 +0100 Subject: [PATCH 05/20] refactor(x/protocol): remove Accounts.String() (#19815) --- x/protocolpool/depinject.go | 7 +- x/protocolpool/keeper/genesis.go | 12 ++- x/protocolpool/keeper/grpc_query_test.go | 15 +-- x/protocolpool/keeper/keeper.go | 52 ++++++--- x/protocolpool/keeper/keeper_test.go | 5 +- x/protocolpool/keeper/msg_server.go | 16 +-- x/protocolpool/keeper/msg_server_test.go | 111 ++++++++++++-------- x/protocolpool/simulation/operations.go | 6 +- x/protocolpool/simulation/proposals.go | 16 ++- x/protocolpool/simulation/proposals_test.go | 8 +- 10 files changed, 160 insertions(+), 88 deletions(-) diff --git a/x/protocolpool/depinject.go b/x/protocolpool/depinject.go index 97c588f7db99..bf141436b5bb 100644 --- a/x/protocolpool/depinject.go +++ b/x/protocolpool/depinject.go @@ -53,7 +53,12 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) } - k := keeper.NewKeeper(in.Codec, in.Environment, in.AccountKeeper, in.BankKeeper, in.StakingKeeper, authority.String()) + authorityAddr, err := in.AccountKeeper.AddressCodec().BytesToString(authority) + if err != nil { + panic(err) + } + + k := keeper.NewKeeper(in.Codec, in.Environment, in.AccountKeeper, in.BankKeeper, in.StakingKeeper, authorityAddr) m := NewAppModule(in.Codec, k, in.AccountKeeper, in.BankKeeper) return ModuleOutputs{ diff --git a/x/protocolpool/keeper/genesis.go b/x/protocolpool/keeper/genesis.go index 51b193178f24..c5211513d99d 100644 --- a/x/protocolpool/keeper/genesis.go +++ b/x/protocolpool/keeper/genesis.go @@ -54,8 +54,12 @@ func (k Keeper) InitGenesis(ctx context.Context, data *types.GenesisState) error func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) { var cf []*types.ContinuousFund err := k.ContinuousFund.Walk(ctx, nil, func(key sdk.AccAddress, value types.ContinuousFund) (stop bool, err error) { + recipient, err := k.authKeeper.AddressCodec().BytesToString(key) + if err != nil { + return true, err + } cf = append(cf, &types.ContinuousFund{ - Recipient: key.String(), + Recipient: recipient, Percentage: value.Percentage, Expiry: value.Expiry, }) @@ -67,8 +71,12 @@ func (k Keeper) ExportGenesis(ctx context.Context) (*types.GenesisState, error) var budget []*types.Budget err = k.BudgetProposal.Walk(ctx, nil, func(key sdk.AccAddress, value types.Budget) (stop bool, err error) { + recipient, err := k.authKeeper.AddressCodec().BytesToString(key) + if err != nil { + return true, err + } budget = append(budget, &types.Budget{ - RecipientAddress: key.String(), + RecipientAddress: recipient, TotalBudget: value.TotalBudget, ClaimedAmount: value.ClaimedAmount, StartTime: value.StartTime, diff --git a/x/protocolpool/keeper/grpc_query_test.go b/x/protocolpool/keeper/grpc_query_test.go index 14e0ff2a0a6d..2fc082b811e8 100644 --- a/x/protocolpool/keeper/grpc_query_test.go +++ b/x/protocolpool/keeper/grpc_query_test.go @@ -6,6 +6,7 @@ import ( "cosmossdk.io/math" "cosmossdk.io/x/protocolpool/types" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -14,6 +15,8 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { period := time.Duration(60) * time.Second zeroCoin := sdk.NewCoin("foo", math.ZeroInt()) nextClaimFrom := startTime.Add(period) + recipientStrAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(recipientAddr) + suite.Require().NoError(err) testCases := []struct { name string preRun func() @@ -34,7 +37,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { { name: "no budget proposal found", req: &types.QueryUnclaimedBudgetRequest{ - Address: recipientAddr.String(), + Address: recipientStrAddr, }, expErr: true, expErrMsg: "no budget proposal found for address", @@ -44,7 +47,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { preRun: func() { // Prepare a valid budget proposal budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -54,7 +57,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { suite.Require().NoError(err) }, req: &types.QueryUnclaimedBudgetRequest{ - Address: recipientAddr.String(), + Address: recipientStrAddr, }, expErr: false, unclaimedFunds: &fooCoin, @@ -72,7 +75,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { preRun: func() { // Prepare a valid budget proposal budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -83,7 +86,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { // Claim the funds once msg := &types.MsgClaimBudget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, } suite.mockSendCoinsFromModuleToAccount(recipientAddr) _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) @@ -91,7 +94,7 @@ func (suite *KeeperTestSuite) TestUnclaimedBudget() { }, req: &types.QueryUnclaimedBudgetRequest{ - Address: recipientAddr.String(), + Address: recipientStrAddr, }, expErr: false, unclaimedFunds: &fooCoin2, diff --git a/x/protocolpool/keeper/keeper.go b/x/protocolpool/keeper/keeper.go index 1f91bcdb7ed7..cbfe25c1d23a 100644 --- a/x/protocolpool/keeper/keeper.go +++ b/x/protocolpool/keeper/keeper.go @@ -113,16 +113,21 @@ func (k Keeper) GetCommunityPool(ctx context.Context) (sdk.Coins, error) { return k.bankKeeper.GetAllBalances(ctx, moduleAccount.GetAddress()), nil } -func (k Keeper) withdrawContinuousFund(ctx context.Context, recipient sdk.AccAddress) (sdk.Coin, error) { +func (k Keeper) withdrawContinuousFund(ctx context.Context, recipientAddr string) (sdk.Coin, error) { + recipient, err := k.authKeeper.AddressCodec().StringToBytes(recipientAddr) + if err != nil { + return sdk.Coin{}, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) + } + cf, err := k.ContinuousFund.Get(ctx, recipient) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return sdk.Coin{}, fmt.Errorf("no continuous fund found for recipient: %s", recipient.String()) + return sdk.Coin{}, fmt.Errorf("no continuous fund found for recipient: %s", recipientAddr) } - return sdk.Coin{}, fmt.Errorf("get continuous fund failed for recipient: %s", recipient.String()) + return sdk.Coin{}, fmt.Errorf("get continuous fund failed for recipient: %s", recipientAddr) } if cf.Expiry != nil && cf.Expiry.Before(k.environment.HeaderService.GetHeaderInfo(ctx).Time) { - return sdk.Coin{}, fmt.Errorf("cannot withdraw continuous funds: continuous fund expired for recipient: %s", recipient.String()) + return sdk.Coin{}, fmt.Errorf("cannot withdraw continuous funds: continuous fund expired for recipient: %s", recipientAddr) } toDistributeAmount, err := k.ToDistribute.Get(ctx) @@ -138,15 +143,20 @@ func (k Keeper) withdrawContinuousFund(ctx context.Context, recipient sdk.AccAdd } // withdraw continuous fund - withdrawnAmount, err := k.withdrawRecipientFunds(ctx, recipient) + withdrawnAmount, err := k.withdrawRecipientFunds(ctx, recipientAddr) if err != nil { - return sdk.Coin{}, fmt.Errorf("error while withdrawing recipient funds for recipient: %s", recipient.String()) + return sdk.Coin{}, fmt.Errorf("error while withdrawing recipient funds for recipient: %s", recipientAddr) } return withdrawnAmount, nil } -func (k Keeper) withdrawRecipientFunds(ctx context.Context, recipient sdk.AccAddress) (sdk.Coin, error) { +func (k Keeper) withdrawRecipientFunds(ctx context.Context, recipientAddr string) (sdk.Coin, error) { + recipient, err := k.authKeeper.AddressCodec().StringToBytes(recipientAddr) + if err != nil { + return sdk.Coin{}, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) + } + // get allocated continuous fund fundsAllocated, err := k.RecipientFundDistribution.Get(ctx, recipient) if err != nil { @@ -165,7 +175,7 @@ func (k Keeper) withdrawRecipientFunds(ctx context.Context, recipient sdk.AccAdd withdrawnAmount := sdk.NewCoin(denom, fundsAllocated) err = k.DistributeFromStreamFunds(ctx, sdk.NewCoins(withdrawnAmount), recipient) if err != nil { - return sdk.Coin{}, fmt.Errorf("error while distributing funds to the recipient %s: %v", recipient.String(), err) + return sdk.Coin{}, fmt.Errorf("error while distributing funds to the recipient %s: %v", recipientAddr, err) } // reset fund distribution @@ -257,8 +267,12 @@ func (k Keeper) iterateAndUpdateFundsDistribution(ctx context.Context, toDistrib // Calculate totalPercentageToBeDistributed and store values err := k.RecipientFundPercentage.Walk(ctx, nil, func(key sdk.AccAddress, value math.Int) (stop bool, err error) { + addr, err := k.authKeeper.AddressCodec().BytesToString(key) + if err != nil { + return true, err + } totalPercentageToBeDistributed = totalPercentageToBeDistributed.Add(value) - recipientFundMap[key.String()] = value + recipientFundMap[addr] = value return false, nil }) if err != nil { @@ -306,9 +320,14 @@ func (k Keeper) iterateAndUpdateFundsDistribution(ctx context.Context, toDistrib return k.ToDistribute.Set(ctx, math.ZeroInt()) } -func (k Keeper) claimFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { +func (k Keeper) claimFunds(ctx context.Context, recipientAddr string) (amount sdk.Coin, err error) { + recipient, err := k.authKeeper.AddressCodec().StringToBytes(recipientAddr) + if err != nil { + return sdk.Coin{}, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) + } + // get claimable funds from distribution info - amount, err = k.getClaimableFunds(ctx, recipient) + amount, err = k.getClaimableFunds(ctx, recipientAddr) if err != nil { return sdk.Coin{}, fmt.Errorf("error getting claimable funds: %w", err) } @@ -322,11 +341,16 @@ func (k Keeper) claimFunds(ctx context.Context, recipient sdk.AccAddress) (amoun return amount, nil } -func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) (amount sdk.Coin, err error) { +func (k Keeper) getClaimableFunds(ctx context.Context, recipientAddr string) (amount sdk.Coin, err error) { + recipient, err := k.authKeeper.AddressCodec().StringToBytes(recipientAddr) + if err != nil { + return sdk.Coin{}, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) + } + budget, err := k.BudgetProposal.Get(ctx, recipient) if err != nil { if errors.Is(err, collections.ErrNotFound) { - return sdk.Coin{}, fmt.Errorf("no budget found for recipient: %s", recipient.String()) + return sdk.Coin{}, fmt.Errorf("no budget found for recipient: %s", recipientAddr) } return sdk.Coin{}, err } @@ -340,7 +364,7 @@ func (k Keeper) getClaimableFunds(ctx context.Context, recipient sdk.AccAddress) return sdk.Coin{}, err } // Return the end of the budget - return sdk.Coin{}, fmt.Errorf("budget ended for recipient: %s", recipient.String()) + return sdk.Coin{}, fmt.Errorf("budget ended for recipient: %s", recipientAddr) } } diff --git a/x/protocolpool/keeper/keeper_test.go b/x/protocolpool/keeper/keeper_test.go index fec0abd80cbc..6df649c7b782 100644 --- a/x/protocolpool/keeper/keeper_test.go +++ b/x/protocolpool/keeper/keeper_test.go @@ -68,13 +68,16 @@ func (s *KeeperTestSuite) SetupTest() { stakingKeeper.EXPECT().BondDenom(ctx).Return("stake", nil).AnyTimes() s.stakingKeeper = stakingKeeper + authority, err := accountKeeper.AddressCodec().BytesToString(authtypes.NewModuleAddress(types.GovModuleName)) + s.Require().NoError(err) + poolKeeper := poolkeeper.NewKeeper( encCfg.Codec, environment, accountKeeper, bankKeeper, stakingKeeper, - authtypes.NewModuleAddress(types.GovModuleName).String(), + authority, ) s.ctx = ctx s.poolKeeper = poolKeeper diff --git a/x/protocolpool/keeper/msg_server.go b/x/protocolpool/keeper/msg_server.go index fd5015607d98..4c03c08e85cf 100644 --- a/x/protocolpool/keeper/msg_server.go +++ b/x/protocolpool/keeper/msg_server.go @@ -26,12 +26,7 @@ func NewMsgServerImpl(keeper Keeper) types.MsgServer { } func (k MsgServer) ClaimBudget(ctx context.Context, msg *types.MsgClaimBudget) (*types.MsgClaimBudgetResponse, error) { - recipient, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(msg.RecipientAddress) - if err != nil { - return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) - } - - amount, err := k.claimFunds(ctx, recipient) + amount, err := k.claimFunds(ctx, msg.RecipientAddress) if err != nil { return nil, err } @@ -164,12 +159,7 @@ func (k MsgServer) CreateContinuousFund(ctx context.Context, msg *types.MsgCreat } func (k MsgServer) WithdrawContinuousFund(ctx context.Context, msg *types.MsgWithdrawContinuousFund) (*types.MsgWithdrawContinuousFundResponse, error) { - recipient, err := k.Keeper.authKeeper.AddressCodec().StringToBytes(msg.RecipientAddress) - if err != nil { - return nil, sdkerrors.ErrInvalidAddress.Wrapf("invalid recipient address: %s", err) - } - - amount, err := k.withdrawContinuousFund(ctx, recipient) + amount, err := k.withdrawContinuousFund(ctx, msg.RecipientAddress) if err != nil { return nil, err } @@ -202,7 +192,7 @@ func (k MsgServer) CancelContinuousFund(ctx context.Context, msg *types.MsgCance } // withdraw funds if any are allocated - withdrawnFunds, err := k.withdrawRecipientFunds(ctx, recipient) + withdrawnFunds, err := k.withdrawRecipientFunds(ctx, msg.RecipientAddress) if err != nil && !errorspkg.Is(err, types.ErrNoRecipientFund) { return nil, fmt.Errorf("error while withdrawing already allocated funds for recipient %s: %v", msg.RecipientAddress, err) } diff --git a/x/protocolpool/keeper/msg_server_test.go b/x/protocolpool/keeper/msg_server_test.go index e5f6638ee3b5..ed0343403153 100644 --- a/x/protocolpool/keeper/msg_server_test.go +++ b/x/protocolpool/keeper/msg_server_test.go @@ -8,6 +8,7 @@ import ( "cosmossdk.io/math" "cosmossdk.io/x/protocolpool/types" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -24,6 +25,8 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { invalidStartTime := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(-15 * time.Second) period := time.Duration(60) * time.Second zeroPeriod := time.Duration(0) * time.Second + recipientStrAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(recipientAddr) + suite.Require().NoError(err) testCases := map[string]struct { input *types.MsgSubmitBudgetProposal expErr bool @@ -44,7 +47,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { "empty authority": { input: &types.MsgSubmitBudgetProposal{ Authority: "", - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -56,7 +59,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { "invalid authority": { input: &types.MsgSubmitBudgetProposal{ Authority: "invalid_authority", - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -68,7 +71,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { "invalid budget": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &invalidCoin, StartTime: &startTime, Tranches: 2, @@ -80,7 +83,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { "invalid start time": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &invalidStartTime, Tranches: 2, @@ -92,7 +95,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { "invalid tranches": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 0, @@ -104,7 +107,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { "invalid period": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -116,7 +119,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { "all good": { input: &types.MsgSubmitBudgetProposal{ Authority: suite.poolKeeper.GetAuthority(), - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -144,6 +147,8 @@ func (suite *KeeperTestSuite) TestMsgSubmitBudgetProposal() { func (suite *KeeperTestSuite) TestMsgClaimBudget() { startTime := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(-70 * time.Second) period := time.Duration(60) * time.Second + recipientStrAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(recipientAddr) + suite.Require().NoError(err) testCases := map[string]struct { preRun func() @@ -167,7 +172,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { startTime := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(3600 * time.Second) // Prepare the budget proposal with a future start time budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -185,7 +190,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { startTime := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(-50 * time.Second) // Prepare the budget proposal with start time and a short period budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 1, @@ -202,7 +207,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { preRun: func() { // Prepare the budget proposal with valid start time and period budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -219,7 +224,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { preRun: func() { // Prepare the budget proposal with valid start time and period budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -230,7 +235,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { // Claim the funds once msg := &types.MsgClaimBudget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, } suite.mockSendCoinsFromModuleToAccount(recipientAddr) _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) @@ -247,7 +252,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { oneMonthPeriod := time.Duration(oneMonthInSeconds) * time.Second // Prepare the budget proposal with valid start time and period of 1 month (in seconds) budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTimeBeforeMonth, Tranches: 2, @@ -258,7 +263,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { // Claim the funds once msg := &types.MsgClaimBudget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, } suite.mockSendCoinsFromModuleToAccount(recipientAddr) _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) @@ -278,7 +283,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { preRun: func() { // Prepare the budget proposal with valid start time and period budget := types.Budget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, TotalBudget: &fooCoin, StartTime: &startTime, Tranches: 2, @@ -289,7 +294,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { // Claim the funds once msg := &types.MsgClaimBudget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, } suite.mockSendCoinsFromModuleToAccount(recipientAddr) _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) @@ -303,7 +308,7 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { // Claim the funds twice msg = &types.MsgClaimBudget{ - RecipientAddress: recipientAddr.String(), + RecipientAddress: recipientStrAddr, } suite.mockSendCoinsFromModuleToAccount(recipientAddr) _, err = suite.msgServer.ClaimBudget(suite.ctx, msg) @@ -321,8 +326,10 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { if tc.preRun != nil { tc.preRun() } + addr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(tc.recipientAddress) + suite.Require().NoError(err) msg := &types.MsgClaimBudget{ - RecipientAddress: tc.recipientAddress.String(), + RecipientAddress: addr, } suite.mockSendCoinsFromModuleToAccount(tc.recipientAddress) resp, err := suite.msgServer.ClaimBudget(suite.ctx, msg) @@ -338,9 +345,16 @@ func (suite *KeeperTestSuite) TestMsgClaimBudget() { } func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { + addressCodec := codectestutil.CodecOptions{}.GetAddressCodec() recipient := sdk.AccAddress([]byte("recipientAddr1__________________")) + recipientStrAddr, err := addressCodec.BytesToString(recipient) + suite.Require().NoError(err) recipient2 := sdk.AccAddress([]byte("recipientAddr2___________________")) + recipient2StrAddr, err := addressCodec.BytesToString(recipient2) + suite.Require().NoError(err) recipient3 := sdk.AccAddress([]byte("recipientAddr3___________________")) + recipient3StrAddr, err := addressCodec.BytesToString(recipient3) + suite.Require().NoError(err) testCases := map[string]struct { preRun func() recipientAddress []sdk.AccAddress @@ -366,7 +380,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(oneMonthInSeconds) * time.Second) cf := types.ContinuousFund{ - Recipient: recipient.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, } @@ -384,7 +398,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { percentage, err = math.LegacyNewDecFromStr("0.9") suite.Require().NoError(err) cf = types.ContinuousFund{ - Recipient: recipient2.String(), + Recipient: recipient2StrAddr, Percentage: percentage, Expiry: &expiry, } @@ -412,7 +426,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { suite.Require().NoError(err) expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(-1) * time.Second) cf := types.ContinuousFund{ - Recipient: recipient.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, } @@ -431,7 +445,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(oneMonthInSeconds) * time.Second) cf := types.ContinuousFund{ - Recipient: recipient.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, } @@ -456,7 +470,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { percentage, err := math.LegacyNewDecFromStr("0.2") suite.Require().NoError(err) cf := types.ContinuousFund{ - Recipient: recipient.String(), + Recipient: recipientStrAddr, Percentage: percentage, } // Set continuous fund @@ -484,7 +498,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(oneMonthInSeconds) * time.Second) cf := types.ContinuousFund{ - Recipient: recipient.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, } @@ -514,7 +528,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(oneMonthInSeconds) * time.Second) cf := types.ContinuousFund{ - Recipient: recipient.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, } @@ -532,7 +546,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { percentage2, err := math.LegacyNewDecFromStr("0.2") suite.Require().NoError(err) cf = types.ContinuousFund{ - Recipient: recipient2.String(), + Recipient: recipient2StrAddr, Percentage: percentage, Expiry: &expiry, } @@ -550,7 +564,7 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { percentage3, err := math.LegacyNewDecFromStr("0.3") suite.Require().NoError(err) cf = types.ContinuousFund{ - Recipient: recipient3.String(), + Recipient: recipient3StrAddr, Percentage: percentage2, Expiry: &expiry, } @@ -581,8 +595,10 @@ func (suite *KeeperTestSuite) TestWithdrawContinuousFund() { if tc.preRun != nil { tc.preRun() } + addr, err := addressCodec.BytesToString(tc.recipientAddress[0]) + suite.Require().NoError(err) msg := &types.MsgWithdrawContinuousFund{ - RecipientAddress: tc.recipientAddress[0].String(), + RecipientAddress: addr, } suite.mockWithdrawContinuousFund() @@ -617,6 +633,8 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { invalidExpirty := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(-15 * time.Second) oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(oneMonthInSeconds) * time.Second) + recipientStrAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(recipientAddr) + suite.Require().NoError(err) testCases := map[string]struct { preRun func() input *types.MsgCreateContinuousFund @@ -636,7 +654,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "empty authority": { input: &types.MsgCreateContinuousFund{ Authority: "", - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, }, @@ -646,7 +664,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "invalid authority": { input: &types.MsgCreateContinuousFund{ Authority: "invalid_authority", - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, }, @@ -656,7 +674,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "zero percentage": { input: &types.MsgCreateContinuousFund{ Authority: suite.poolKeeper.GetAuthority(), - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: math.LegacyNewDec(0), Expiry: &expiry, }, @@ -666,7 +684,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "negative percentage": { input: &types.MsgCreateContinuousFund{ Authority: suite.poolKeeper.GetAuthority(), - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: negativePercentage, Expiry: &expiry, }, @@ -676,7 +694,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "invalid percentage": { input: &types.MsgCreateContinuousFund{ Authority: suite.poolKeeper.GetAuthority(), - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: math.LegacyNewDec(1), Expiry: &expiry, }, @@ -686,7 +704,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "invalid expiry": { input: &types.MsgCreateContinuousFund{ Authority: suite.poolKeeper.GetAuthority(), - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &invalidExpirty, }, @@ -696,7 +714,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "all good": { input: &types.MsgCreateContinuousFund{ Authority: suite.poolKeeper.GetAuthority(), - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, }, @@ -705,10 +723,12 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { "total funds percentage > 100": { preRun: func() { percentage, err := math.LegacyNewDecFromStr("0.9") + suite.Require().NoError(err) recipient2 := sdk.AccAddress([]byte("recipientAddr2___________________")) + recipient2StrAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(recipient2) suite.Require().NoError(err) cf := types.ContinuousFund{ - Recipient: recipient2.String(), + Recipient: recipient2StrAddr, Percentage: percentage, Expiry: &time.Time{}, } @@ -720,7 +740,7 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { }, input: &types.MsgCreateContinuousFund{ Authority: suite.poolKeeper.GetAuthority(), - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, }, @@ -752,8 +772,11 @@ func (suite *KeeperTestSuite) TestCreateContinuousFund() { // canceling a fund with no recipient found, canceling a fund with unclaimed funds for the recipient, // and canceling a fund with no errors. func (suite *KeeperTestSuite) TestCancelContinuousFund() { + recipientStrAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(recipientAddr) + suite.Require().NoError(err) recipient2 := sdk.AccAddress([]byte("recipientAddr2___________________")) - + recipient2StrAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(recipient2) + suite.Require().NoError(err) testCases := map[string]struct { preRun func() recipientAddr sdk.AccAddress @@ -792,7 +815,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(oneMonthInSeconds) * time.Second) cf := types.ContinuousFund{ - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, } @@ -810,7 +833,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { percentage, err = math.LegacyNewDecFromStr("0.3") suite.Require().NoError(err) cf = types.ContinuousFund{ - Recipient: recipient2.String(), + Recipient: recipient2StrAddr, Percentage: percentage, Expiry: &expiry, } @@ -832,7 +855,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { // withdraw funds for fund request 2 suite.mockWithdrawContinuousFund() - msg := &types.MsgWithdrawContinuousFund{RecipientAddress: recipient2.String()} + msg := &types.MsgWithdrawContinuousFund{RecipientAddress: recipient2StrAddr} _, err = suite.msgServer.WithdrawContinuousFund(suite.ctx, msg) suite.Require().NoError(err) }, @@ -852,7 +875,7 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { oneMonthInSeconds := int64(30 * 24 * 60 * 60) // Approximate number of seconds in 1 month expiry := suite.environment.HeaderService.GetHeaderInfo(suite.ctx).Time.Add(time.Duration(oneMonthInSeconds) * time.Second) cf := types.ContinuousFund{ - Recipient: recipientAddr.String(), + Recipient: recipientStrAddr, Percentage: percentage, Expiry: &expiry, } @@ -875,9 +898,11 @@ func (suite *KeeperTestSuite) TestCancelContinuousFund() { if tc.preRun != nil { tc.preRun() } + addr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(tc.recipientAddr) + suite.Require().NoError(err) msg := &types.MsgCancelContinuousFund{ Authority: suite.poolKeeper.GetAuthority(), - RecipientAddress: tc.recipientAddr.String(), + RecipientAddress: addr, } resp, err := suite.msgServer.CancelContinuousFund(suite.ctx, msg) if tc.expErr { diff --git a/x/protocolpool/simulation/operations.go b/x/protocolpool/simulation/operations.go index 9774dbd01209..004b850d52be 100644 --- a/x/protocolpool/simulation/operations.go +++ b/x/protocolpool/simulation/operations.go @@ -72,7 +72,11 @@ func SimulateMsgFundCommunityPool(txConfig client.TxConfig, ak types.AccountKeep } } - msg := types.NewMsgFundCommunityPool(fundAmount, funder.Address.String()) + funderAddr, err := ak.AddressCodec().BytesToString(funder.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, sdk.MsgTypeURL(&types.MsgFundCommunityPool{}), "unable to get funder address"), nil, err + } + msg := types.NewMsgFundCommunityPool(fundAmount, funderAddr) txCtx := simulation.OperationInput{ R: r, diff --git a/x/protocolpool/simulation/proposals.go b/x/protocolpool/simulation/proposals.go index 8559a1095af5..9a1af074a53b 100644 --- a/x/protocolpool/simulation/proposals.go +++ b/x/protocolpool/simulation/proposals.go @@ -28,7 +28,7 @@ func ProposalMsgs() []simtypes.WeightedProposalMsg { } } -func SimulateMsgCommunityPoolSpend(r *rand.Rand, _ []simtypes.Account, _ coreaddress.Codec) (sdk.Msg, error) { +func SimulateMsgCommunityPoolSpend(r *rand.Rand, _ []simtypes.Account, cdc coreaddress.Codec) (sdk.Msg, error) { // use the default gov module account address as authority var authority sdk.AccAddress = address.Module("gov") @@ -37,12 +37,20 @@ func SimulateMsgCommunityPoolSpend(r *rand.Rand, _ []simtypes.Account, _ coreadd coins, err := sdk.ParseCoinsNormalized("100stake,2testtoken") if err != nil { - panic(err) + return nil, err } + authorityAddr, err := cdc.BytesToString(authority) + if err != nil { + return nil, err + } + recipentAddr, err := cdc.BytesToString(acc.Address) + if err != nil { + return nil, err + } return &pooltypes.MsgCommunityPoolSpend{ - Authority: authority.String(), - Recipient: acc.Address.String(), + Authority: authorityAddr, + Recipient: recipentAddr, Amount: coins, }, nil } diff --git a/x/protocolpool/simulation/proposals_test.go b/x/protocolpool/simulation/proposals_test.go index 6823a9957e60..96046c2589f9 100644 --- a/x/protocolpool/simulation/proposals_test.go +++ b/x/protocolpool/simulation/proposals_test.go @@ -19,7 +19,7 @@ func TestProposalMsgs(t *testing.T) { // initialize parameters s := rand.NewSource(1) r := rand.New(s) - + addressCodec := codectestutil.CodecOptions{}.GetAddressCodec() accounts := simtypes.RandomAccounts(r, 3) // execute ProposalMsgs function @@ -32,7 +32,7 @@ func TestProposalMsgs(t *testing.T) { assert.Equal(t, simulation.OpWeightMsgCommunityPoolSpend, w0.AppParamsKey()) assert.Equal(t, simulation.DefaultWeightMsgCommunityPoolSpend, w0.DefaultWeight()) - msg, err := w0.MsgSimulatorFn()(r, accounts, codectestutil.CodecOptions{}.GetAddressCodec()) + msg, err := w0.MsgSimulatorFn()(r, accounts, addressCodec) assert.NilError(t, err) msgCommunityPoolSpend, ok := msg.(*pooltypes.MsgCommunityPoolSpend) assert.Assert(t, ok) @@ -40,6 +40,8 @@ func TestProposalMsgs(t *testing.T) { coins, err := sdk.ParseCoinsNormalized("100stake,2testtoken") assert.NilError(t, err) - assert.Equal(t, sdk.AccAddress(address.Module("gov")).String(), msgCommunityPoolSpend.Authority) + authAddr, err := addressCodec.BytesToString(address.Module("gov")) + assert.NilError(t, err) + assert.Equal(t, authAddr, msgCommunityPoolSpend.Authority) assert.Assert(t, msgCommunityPoolSpend.Amount.Equal(coins)) } From 8b4081f8bb792a30ca0517ce14a5fe02e65a0df6 Mon Sep 17 00:00:00 2001 From: cool-developer <51834436+cool-develope@users.noreply.github.com> Date: Thu, 21 Mar 2024 08:12:56 -0400 Subject: [PATCH 06/20] fix(store/v2): clean up resources after the migration is completed (#19800) --- store/commitment/iavl/tree.go | 2 +- store/migration/manager.go | 11 +++++++++++ store/root/store.go | 37 +++++++++++++++++++++-------------- store/snapshots/manager.go | 9 ++++++++- 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/store/commitment/iavl/tree.go b/store/commitment/iavl/tree.go index f4dd62bfc07c..944b7408593e 100644 --- a/store/commitment/iavl/tree.go +++ b/store/commitment/iavl/tree.go @@ -131,5 +131,5 @@ func (t *IavlTree) Import(version uint64) (commitment.Importer, error) { // Close closes the iavl tree. func (t *IavlTree) Close() error { - return nil + return t.tree.Close() } diff --git a/store/migration/manager.go b/store/migration/manager.go index 285709351c59..43dc7dffc033 100644 --- a/store/migration/manager.go +++ b/store/migration/manager.go @@ -205,3 +205,14 @@ func (m *Manager) Sync() error { } } } + +// Close closes the manager. It should be called after the migration is done. +// It will close the db and notify the snapshotsManager that the migration is done. +func (m *Manager) Close() error { + if err := m.db.Close(); err != nil { + return fmt.Errorf("failed to close db: %w", err) + } + m.snapshotsManager.EndMigration(m.stateCommitment) + + return nil +} diff --git a/store/root/store.go b/store/root/store.go index 68944c209d24..91d007bd7dbb 100644 --- a/store/root/store.go +++ b/store/root/store.go @@ -256,21 +256,6 @@ func (s *Store) WorkingHash(cs *corestore.Changeset) ([]byte, error) { } if s.workingHash == nil { - // if migration is in progress, send the changeset to the migration manager - if s.isMigrating { - // if the migration manager has already migrated to the version, close the - // channels and replace the state commitment - if s.migrationManager.GetMigratedVersion() == s.lastCommitInfo.Version { - close(s.chDone) - close(s.chChangeset) - s.isMigrating = false - s.stateCommitment = s.migrationManager.GetStateCommitment() - s.logger.Info("migration completed", "version", s.lastCommitInfo.Version) - } else { - s.chChangeset <- &migration.VersionedChangeset{Version: s.lastCommitInfo.Version + 1, Changeset: cs} - } - } - if err := s.writeSC(cs); err != nil { return nil, err } @@ -397,7 +382,29 @@ func (s *Store) StartMigration() error { // tree, which allows us to retrieve the working hash of the SC tree. Finally, // we construct a *CommitInfo and set that as lastCommitInfo. Note, this should // only be called once per block! +// If migration is in progress, the changeset is sent to the migration manager. func (s *Store) writeSC(cs *corestore.Changeset) error { + if s.isMigrating { + // if the migration manager has already migrated to the version, close the + // channels and replace the state commitment + if s.migrationManager.GetMigratedVersion() == s.lastCommitInfo.Version { + close(s.chDone) + close(s.chChangeset) + s.isMigrating = false + // close the old state commitment and replace it with the new one + if err := s.stateCommitment.Close(); err != nil { + return fmt.Errorf("failed to close the old SC store: %w", err) + } + s.stateCommitment = s.migrationManager.GetStateCommitment() + if err := s.migrationManager.Close(); err != nil { + return fmt.Errorf("failed to close migration manager: %w", err) + } + s.logger.Info("migration completed", "version", s.lastCommitInfo.Version) + } else { + s.chChangeset <- &migration.VersionedChangeset{Version: s.lastCommitInfo.Version + 1, Changeset: cs} + } + } + if err := s.stateCommitment.WriteBatch(cs); err != nil { return fmt.Errorf("failed to write batch to SC store: %w", err) } diff --git a/store/snapshots/manager.go b/store/snapshots/manager.go index 4f2ad69d17e3..634f2d5b5b86 100644 --- a/store/snapshots/manager.go +++ b/store/snapshots/manager.go @@ -245,7 +245,7 @@ func (m *Manager) CreateMigration(height uint64, protoWriter WriteCloser) error if err != nil { return err } - defer m.end() + // m.end() will be called by the migration manager with EndMigration(). go func() { if err := m.commitSnapshotter.Snapshot(height, protoWriter); err != nil { @@ -258,6 +258,13 @@ func (m *Manager) CreateMigration(height uint64, protoWriter WriteCloser) error return nil } +// EndMigration ends the migration operation. +// It will replace the current commitSnapshotter with the new one. +func (m *Manager) EndMigration(commitSnapshotter CommitSnapshotter) { + defer m.end() + m.commitSnapshotter = commitSnapshotter +} + // List lists snapshots, mirroring ABCI ListSnapshots. It can be concurrent with other operations. func (m *Manager) List() ([]*types.Snapshot, error) { return m.store.List() From 632c3f19e5b4ccebae62d32507a677345d35705a Mon Sep 17 00:00:00 2001 From: Hwangjae Lee Date: Fri, 22 Mar 2024 00:19:06 +0900 Subject: [PATCH 07/20] docs(collections): fixed typo in `collections/collections.go` (#19814) Signed-off-by: Hwangjae Lee --- collections/collections.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/collections/collections.go b/collections/collections.go index 0f6b32253340..6a7b2a093423 100644 --- a/collections/collections.go +++ b/collections/collections.go @@ -29,7 +29,7 @@ var ( Uint64Key = codec.NewUint64Key[uint64]() // Int32Key can be used to encode int32 keys. Encoding retains ordering by toggling the MSB. Int32Key = codec.NewInt32Key[int32]() - // Int64Key can be used to encode int64. Encoding retains ordering by toggling the MSB. + // Int64Key can be used to encode int64 keys. Encoding retains ordering by toggling the MSB. Int64Key = codec.NewInt64Key[int64]() // StringKey can be used to encode string keys. The encoding just converts the string // to bytes. From 32d63e02c57008425edd90eade77eb47c68a6c95 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 12:27:09 +0000 Subject: [PATCH 08/20] build(deps): Bump github.com/cosmos/gogoproto from 1.4.11 to 1.4.12 (#19804) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- api/go.mod | 4 ++-- api/go.sum | 8 ++++---- client/v2/go.mod | 2 +- client/v2/go.sum | 4 ++-- core/go.mod | 4 ++-- core/go.sum | 8 ++++---- go.mod | 2 +- go.sum | 4 ++-- orm/go.mod | 2 +- orm/go.sum | 4 ++-- simapp/go.mod | 2 +- simapp/go.sum | 4 ++-- simapp/gomod2nix.toml | 4 ++-- store/go.mod | 2 +- store/go.sum | 4 ++-- tests/go.mod | 2 +- tests/go.sum | 4 ++-- tests/starship/tests/go.mod | 2 +- tests/starship/tests/go.sum | 4 ++-- tools/confix/go.mod | 2 +- tools/confix/go.sum | 4 ++-- tools/cosmovisor/go.mod | 2 +- tools/cosmovisor/go.sum | 4 ++-- tools/hubl/go.mod | 2 +- tools/hubl/go.sum | 4 ++-- x/accounts/defaults/lockup/go.mod | 2 +- x/accounts/defaults/lockup/go.sum | 4 ++-- x/accounts/go.mod | 2 +- x/accounts/go.sum | 4 ++-- x/auth/go.mod | 2 +- x/auth/go.sum | 4 ++-- x/authz/go.mod | 2 +- x/authz/go.sum | 4 ++-- x/bank/go.mod | 2 +- x/bank/go.sum | 4 ++-- x/circuit/go.mod | 2 +- x/circuit/go.sum | 4 ++-- x/distribution/go.mod | 2 +- x/distribution/go.sum | 4 ++-- x/evidence/go.mod | 2 +- x/evidence/go.sum | 4 ++-- x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 4 ++-- x/gov/go.mod | 2 +- x/gov/go.sum | 4 ++-- x/group/go.mod | 2 +- x/group/go.sum | 4 ++-- x/mint/go.mod | 2 +- x/mint/go.sum | 4 ++-- x/nft/go.mod | 2 +- x/nft/go.sum | 4 ++-- x/params/go.mod | 2 +- x/params/go.sum | 4 ++-- x/protocolpool/go.mod | 2 +- x/protocolpool/go.sum | 4 ++-- x/slashing/go.mod | 2 +- x/slashing/go.sum | 4 ++-- x/staking/go.mod | 2 +- x/staking/go.sum | 4 ++-- x/tx/go.mod | 2 +- x/tx/go.sum | 4 ++-- x/upgrade/go.mod | 2 +- x/upgrade/go.sum | 4 ++-- 63 files changed, 101 insertions(+), 101 deletions(-) diff --git a/api/go.mod b/api/go.mod index 1467e61a79d8..cf42015bb0f2 100644 --- a/api/go.mod +++ b/api/go.mod @@ -5,7 +5,7 @@ go 1.20 require ( buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1 github.com/cosmos/cosmos-proto v1.0.0-beta.4 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 google.golang.org/genproto/googleapis/api v0.0.0-20240205150955-31a09d347014 google.golang.org/grpc v1.62.1 google.golang.org/protobuf v1.33.0 @@ -15,7 +15,7 @@ require ( buf.build/gen/go/cosmos/gogo-proto/protocolbuffers/go v1.32.0-20230509103710-5e5b9fdd0180.1 // indirect github.com/golang/protobuf v1.5.4 // indirect github.com/google/go-cmp v0.6.0 // indirect - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/api/go.sum b/api/go.sum index d211b34578bf..49df358704bb 100644 --- a/api/go.sum +++ b/api/go.sum @@ -4,16 +4,16 @@ buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010 buf.build/gen/go/tendermint/tendermint/protocolbuffers/go v1.32.0-20231117195010-33ed361a9051.1/go.mod h1:9KmeMJUsSG3IiIwK63Lh1ipZJrwd7KHrWZseJeHukcs= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.4 h1:i7eJL8qZTpSEXOPTxNKhASYpMn+8e5Q6AdndVa1dWek= github.com/golang/protobuf v1.5.4/go.mod h1:lnTiLA8Wa4RWRcIUkrtSVa5nRhsEGBg48fD6rSs7xps= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sys v0.17.0 h1:25cE3gD+tdBA7lp7QfhuV+rJiE9YXTcS3VG1SqssI/Y= diff --git a/client/v2/go.mod b/client/v2/go.mod index 821bbce49f63..fa54e0dfcbb6 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -53,7 +53,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/iavl v1.0.0 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect diff --git a/client/v2/go.sum b/client/v2/go.sum index 9f04d1e09392..e4bf772ab60d 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -147,8 +147,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/core/go.mod b/core/go.mod index 3dd081281858..d5c1b11b06a1 100644 --- a/core/go.mod +++ b/core/go.mod @@ -4,7 +4,7 @@ go 1.20 require ( cosmossdk.io/log v1.3.1 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/stretchr/testify v1.9.0 google.golang.org/grpc v1.62.1 google.golang.org/protobuf v1.33.0 @@ -21,7 +21,7 @@ require ( github.com/pmezard/go-difflib v1.0.0 // indirect github.com/rogpeppe/go-internal v1.11.0 // indirect github.com/rs/zerolog v1.32.0 // indirect - golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb // indirect + golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect golang.org/x/net v0.21.0 // indirect golang.org/x/sys v0.17.0 // indirect golang.org/x/text v0.14.0 // indirect diff --git a/core/go.sum b/core/go.sum index d0992068e935..ea7c3ea2b235 100644 --- a/core/go.sum +++ b/core/go.sum @@ -1,8 +1,8 @@ cosmossdk.io/log v1.3.1 h1:UZx8nWIkfbbNEWusZqzAx3ZGvu54TZacWib3EzUYmGI= cosmossdk.io/log v1.3.1/go.mod h1:2/dIomt8mKdk6vl3OWJcPk2be3pGOS8OQaLUM/3/tCM= github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= @@ -37,8 +37,8 @@ github.com/rs/zerolog v1.32.0 h1:keLypqrlIjaFsbmJOBdB/qvyF8KEtCWHwobLp5l/mQ0= github.com/rs/zerolog v1.32.0/go.mod h1:/7mN4D5sKwJLZQ2b/znpjC3/GQWY/xaDXUM0kKWRHss= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb h1:mIKbk8weKhSeLH2GmUTrvx8CjkyJmnU1wFmg59CUjFA= -golang.org/x/exp v0.0.0-20230811145659-89c5cff77bcb/go.mod h1:FXUEEKJgO7OQYeo8N01OfiKP8RXMtf6e8aTskBGqWdc= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI= +golang.org/x/exp v0.0.0-20231006140011-7918f672742d/go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo= golang.org/x/net v0.21.0 h1:AQyQV4dYCvJ7vGmJyKki9+PBdyvhkSd8EIx/qb0AYv4= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= diff --git a/go.mod b/go.mod index 47067100387d..25c87f107be9 100644 --- a/go.mod +++ b/go.mod @@ -24,7 +24,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/gogogateway v1.2.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/ledger-cosmos-go v0.13.3 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/golang/mock v1.6.0 diff --git a/go.sum b/go.sum index 2605bbecb2ea..8936c3417425 100644 --- a/go.sum +++ b/go.sum @@ -144,8 +144,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/orm/go.mod b/orm/go.mod index 69c05a4f41b8..a0bd53635166 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -32,7 +32,7 @@ require ( github.com/cockroachdb/pebble v1.1.0 // indirect github.com/cockroachdb/redact v1.1.5 // indirect github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cucumber/common/messages/go/v19 v19.1.2 // indirect github.com/cucumber/gherkin/go/v26 v26.2.0 // indirect github.com/cucumber/messages/go/v21 v21.0.1 // indirect diff --git a/orm/go.sum b/orm/go.sum index de6d487869be..af5a9ed56c81 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -33,8 +33,8 @@ github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAK github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cucumber/common/messages/go/v19 v19.1.2 h1:8/ZkW9rj3KQo/regmI8kcy48tk57m427Olb7Y0lXcN4= github.com/cucumber/common/messages/go/v19 v19.1.2/go.mod h1:0KLDvMVmmkEZcWUSKxFHSUSLS1gjujBbPN0p41IwwJ4= diff --git a/simapp/go.mod b/simapp/go.mod index 45af063cb38c..5a248dac9590 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -34,7 +34,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 // this version is not used as it is always replaced by the latest Cosmos SDK version github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/spf13/cast v1.6.0 github.com/spf13/cobra v1.8.0 diff --git a/simapp/go.sum b/simapp/go.sum index 40599c836e1a..c4e92b3cf6f7 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -348,8 +348,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.1.1 h1:64nTi8s3gEoGqhA8TyAWFWfz7/pg0anKzHNSc1ETc7Q= github.com/cosmos/iavl v1.1.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index 8dfb96a08a78..af190129c406 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -129,8 +129,8 @@ schema = 3 version = "v1.2.0" hash = "sha256-Hd19V0RCiMoCL67NsqvWIsvWF8KM3LnuJTbYjWtQkEo=" [mod."github.com/cosmos/gogoproto"] - version = "v1.4.11" - hash = "sha256-hXJIGN8Arg09ldCgrSyYZK+xMelYavEj2I3ltxJfAqE=" + version = "v1.4.12" + hash = "sha256-e2tbfaZtzLijq+EMnNG9GWKDCG4sBj8wIVnn6/R26iM=" [mod."github.com/cosmos/iavl"] version = "v1.1.1" hash = "sha256-jeL74lBAld+9etm3mvcGNG8eHrjrMGdUsm69nb+yDcE=" diff --git a/store/go.mod b/store/go.mod index a083351ec925..cfe077fe16fd 100644 --- a/store/go.mod +++ b/store/go.mod @@ -9,7 +9,7 @@ require ( github.com/cockroachdb/errors v1.11.1 github.com/cockroachdb/pebble v1.1.0 github.com/cometbft/cometbft v0.38.6 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/cosmos/iavl v1.1.1 github.com/cosmos/ics23/go v0.10.0 github.com/google/btree v1.1.2 diff --git a/store/go.sum b/store/go.sum index af8097bce07c..d55c02f8d8a0 100644 --- a/store/go.sum +++ b/store/go.sum @@ -44,8 +44,8 @@ github.com/cometbft/cometbft v0.38.6/go.mod h1:8rSPxzUJYquCN8uuBgbUHOMg2KAwvr7Cy github.com/coreos/go-systemd/v22 v22.5.0/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/cosmos/cosmos-db v1.0.2 h1:hwMjozuY1OlJs/uh6vddqnk9j7VamLv+0DBlbEXbAKs= github.com/cosmos/cosmos-db v1.0.2/go.mod h1:Z8IXcFJ9PqKK6BIsVOB3QXtkKoqUOp1vRvPT39kOXEA= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.1.1 h1:64nTi8s3gEoGqhA8TyAWFWfz7/pg0anKzHNSc1ETc7Q= github.com/cosmos/iavl v1.1.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/tests/go.mod b/tests/go.mod index 2c3b075f3957..82d500c96873 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -25,7 +25,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 // this version is not used as it is always replaced by the latest Cosmos SDK version github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 diff --git a/tests/go.sum b/tests/go.sum index eb3683b46def..c2d676e38ff6 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -344,8 +344,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.1.1 h1:64nTi8s3gEoGqhA8TyAWFWfz7/pg0anKzHNSc1ETc7Q= github.com/cosmos/iavl v1.1.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/tests/starship/tests/go.mod b/tests/starship/tests/go.mod index abe71f582536..260b03c1befe 100644 --- a/tests/starship/tests/go.mod +++ b/tests/starship/tests/go.mod @@ -110,7 +110,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cosmos/iavl v1.1.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect diff --git a/tests/starship/tests/go.sum b/tests/starship/tests/go.sum index 8ed047a58f53..8cc9f6f0f60d 100644 --- a/tests/starship/tests/go.sum +++ b/tests/starship/tests/go.sum @@ -344,8 +344,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.1.1 h1:64nTi8s3gEoGqhA8TyAWFWfz7/pg0anKzHNSc1ETc7Q= github.com/cosmos/iavl v1.1.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/tools/confix/go.mod b/tools/confix/go.mod index 917ecb3440b9..971ac734bcd7 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -46,7 +46,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect diff --git a/tools/confix/go.sum b/tools/confix/go.sum index 2de6fe6180f1..bf845878a437 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -150,8 +150,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index 14868b9e9c9c..8c389277540a 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -50,7 +50,7 @@ require ( github.com/cosmos/cosmos-sdk v0.50.5 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index 1065559c29e2..c71f7f42f531 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -333,8 +333,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/tools/hubl/go.mod b/tools/hubl/go.mod index 67e9829ee8fe..665d60789516 100644 --- a/tools/hubl/go.mod +++ b/tools/hubl/go.mod @@ -46,7 +46,7 @@ require ( github.com/cosmos/cosmos-proto v1.0.0-beta.4 // indirect github.com/cosmos/go-bip39 v1.0.0 // indirect github.com/cosmos/gogogateway v1.2.0 // indirect - github.com/cosmos/gogoproto v1.4.11 // indirect + github.com/cosmos/gogoproto v1.4.12 // indirect github.com/cosmos/iavl v1.0.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect diff --git a/tools/hubl/go.sum b/tools/hubl/go.sum index b43e01d0ae34..15b54993cc12 100644 --- a/tools/hubl/go.sum +++ b/tools/hubl/go.sum @@ -156,8 +156,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index 4bcb06047d73..421a53a9fe39 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/x/accounts v0.0.0-20240226161501-23359a0b6d91 cosmossdk.io/x/bank v0.0.0-20240226161501-23359a0b6d91 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 ) require ( diff --git a/x/accounts/defaults/lockup/go.sum b/x/accounts/defaults/lockup/go.sum index a9d9a2495952..5ca7bde6169c 100644 --- a/x/accounts/defaults/lockup/go.sum +++ b/x/accounts/defaults/lockup/go.sum @@ -137,8 +137,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.1 h1:D+mYbcRO2wptYzOM1Hxl9cpmmHU1ZEt9T2Wv5nZTeUw= github.com/cosmos/iavl v1.0.1/go.mod h1:8xIUkgVvwvVrBu81scdPty+/Dx9GqwHnAvXz4cwF7RY= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/accounts/go.mod b/x/accounts/go.mod index b455a0fad116..1521ed0a9ca3 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -10,7 +10,7 @@ require ( cosmossdk.io/log v1.3.1 cosmossdk.io/x/tx v0.13.1 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/spf13/cobra v1.8.0 github.com/stretchr/testify v1.9.0 diff --git a/x/accounts/go.sum b/x/accounts/go.sum index 7f434ef0d373..beafcb637d57 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/auth/go.mod b/x/auth/go.mod index 31ac6444143f..803b1b830135 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -18,7 +18,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/decred/dcrd/dcrec/secp256k1/v4 v4.2.0 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 diff --git a/x/auth/go.sum b/x/auth/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/auth/go.sum +++ b/x/auth/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/authz/go.mod b/x/authz/go.mod index d67729761d15..0105ba16abf7 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -20,7 +20,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/authz/go.sum b/x/authz/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/bank/go.mod b/x/bank/go.mod index b400b3d00783..2adc87743263 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -16,7 +16,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/bank/go.sum b/x/bank/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 9bab85d2f69d..8e55406ddbb4 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -13,7 +13,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 github.com/cockroachdb/errors v1.11.1 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/stretchr/testify v1.9.0 diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 6c80a28c0e48..3cc85bc565c5 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -17,7 +17,7 @@ require ( github.com/cockroachdb/errors v1.11.1 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/distribution/go.sum b/x/distribution/go.sum index 079a1243d684..d9d1e719ea4f 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -143,8 +143,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 718f6b6d47d8..7273af6a4b39 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -14,7 +14,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/evidence/go.sum b/x/evidence/go.sum index 21b29d66575d..ddbfe9a33867 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.1.1 h1:64nTi8s3gEoGqhA8TyAWFWfz7/pg0anKzHNSc1ETc7Q= github.com/cosmos/iavl v1.1.1/go.mod h1:jLeUvm6bGT1YutCaL2fIar/8vGUE8cPZvh/gXEWDaDM= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 0ff48ecf3c34..774487ac69c3 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -18,7 +18,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index 7891e8dc7399..0462fb07cd68 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -149,8 +149,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/gov/go.mod b/x/gov/go.mod index 44b3c88cdc5f..aff5282f13c7 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -22,7 +22,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/gov/go.sum b/x/gov/go.sum index 7891e8dc7399..0462fb07cd68 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -149,8 +149,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/group/go.mod b/x/group/go.mod index bd05585efc09..5e9d83f24560 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -21,7 +21,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/group/go.sum b/x/group/go.sum index 040f3920ae6d..181bfe1c0339 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -149,8 +149,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/mint/go.mod b/x/mint/go.mod index 0bfc6df7602a..20f948aee12e 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -15,7 +15,7 @@ require ( github.com/cockroachdb/tokenbucket v0.0.0-20230807174530-cc333fc44b06 // indirect github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/mint/go.sum b/x/mint/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/nft/go.mod b/x/nft/go.mod index 4c1d939573e7..1acfe5a21435 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -12,7 +12,7 @@ require ( cosmossdk.io/store v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/nft/go.sum b/x/nft/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/params/go.mod b/x/params/go.mod index 3b1b2e783f16..cfb42543bed5 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -15,7 +15,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/params/go.sum b/x/params/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index dd94596edb45..727f3f73f5ce 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -14,7 +14,7 @@ require ( cosmossdk.io/x/auth v0.0.0-00010101000000-000000000000 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index b965c8dde259..f21111c9766e 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -18,7 +18,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/slashing/go.sum b/x/slashing/go.sum index 04d17199a06c..4e367ceb24fc 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -143,8 +143,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/staking/go.mod b/x/staking/go.mod index 6d554a890e61..38e2f0e8d4da 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -15,7 +15,7 @@ require ( github.com/cometbft/cometbft v0.38.6 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/mock v1.6.0 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 diff --git a/x/staking/go.sum b/x/staking/go.sum index 7fe9f10d9703..2611bc6405cb 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -141,8 +141,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= diff --git a/x/tx/go.mod b/x/tx/go.mod index 4f89786f559d..3eb540d92124 100644 --- a/x/tx/go.mod +++ b/x/tx/go.mod @@ -8,7 +8,7 @@ require ( cosmossdk.io/errors v1.0.1 cosmossdk.io/math v1.3.0 github.com/cosmos/cosmos-proto v1.0.0-beta.4 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/google/go-cmp v0.6.0 github.com/google/gofuzz v1.2.0 github.com/iancoleman/strcase v0.3.0 diff --git a/x/tx/go.sum b/x/tx/go.sum index ace680bf4848..d142bf65559a 100644 --- a/x/tx/go.sum +++ b/x/tx/go.sum @@ -8,8 +8,8 @@ cosmossdk.io/math v1.3.0 h1:RC+jryuKeytIiictDslBP9i1fhkVm6ZDmZEoNP316zE= cosmossdk.io/math v1.3.0/go.mod h1:vnRTxewy+M7BtXBNFybkuhSH4WfedVAAnERHgVFhp3k= github.com/cosmos/cosmos-proto v1.0.0-beta.4 h1:aEL7tU/rLOmxZQ9z4i7mzxcLbSCY48OdY7lIWTLG7oU= github.com/cosmos/cosmos-proto v1.0.0-beta.4/go.mod h1:oeB+FyVzG3XrQJbJng0EnV8Vljfk9XvTIpGILNU/9Co= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 22cb2f093aa1..6cfb46c3cbb1 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -15,7 +15,7 @@ require ( github.com/cosmos/cosmos-db v1.0.2 github.com/cosmos/cosmos-proto v1.0.0-beta.4 github.com/cosmos/cosmos-sdk v0.51.0 - github.com/cosmos/gogoproto v1.4.11 + github.com/cosmos/gogoproto v1.4.12 github.com/golang/protobuf v1.5.4 github.com/grpc-ecosystem/grpc-gateway v1.16.0 github.com/hashicorp/go-cleanhttp v0.5.2 diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index 0cec244fb455..b2bfd565a997 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -343,8 +343,8 @@ github.com/cosmos/go-bip39 v1.0.0/go.mod h1:RNJv0H/pOIVgxw6KS7QeX2a0Uo0aKUlfhZ4x github.com/cosmos/gogogateway v1.2.0 h1:Ae/OivNhp8DqBi/sh2A8a1D0y638GpL3tkmLQAiKxTE= github.com/cosmos/gogogateway v1.2.0/go.mod h1:iQpLkGWxYcnCdz5iAdLcRBSw3h7NXeOkZ4GUkT+tbFI= github.com/cosmos/gogoproto v1.4.2/go.mod h1:cLxOsn1ljAHSV527CHOtaIP91kK6cCrZETRBrkzItWU= -github.com/cosmos/gogoproto v1.4.11 h1:LZcMHrx4FjUgrqQSWeaGC1v/TeuVFqSLa43CC6aWR2g= -github.com/cosmos/gogoproto v1.4.11/go.mod h1:/g39Mh8m17X8Q/GDEs5zYTSNaNnInBSohtaxzQnYq1Y= +github.com/cosmos/gogoproto v1.4.12 h1:vB6Lbe/rtnYGjQuFxkPiPYiCybqFT8QvLipDZP8JpFE= +github.com/cosmos/gogoproto v1.4.12/go.mod h1:LnZob1bXRdUoqMMtwYlcR3wjiElmlC+FkjaZRv1/eLY= github.com/cosmos/iavl v1.0.0 h1:bw6t0Mv/mVCJvlMTOPHWLs5uUE3BRBfVWCRelOzl+so= github.com/cosmos/iavl v1.0.0/go.mod h1:CmTGqMnRnucjxbjduneZXT+0vPgNElYvdefjX2q9tYc= github.com/cosmos/ics23/go v0.10.0 h1:iXqLLgp2Lp+EdpIuwXTYIQU+AiHj9mOC2X9ab++bZDM= From ac61b69ae16931c29a5eb867cf5120cb5970099b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 22 Mar 2024 16:26:21 +0100 Subject: [PATCH 09/20] build(deps): Bump github.com/linxGnu/grocksdb from 1.8.12 to 1.8.14 in /store (#19829) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: yihuang Co-authored-by: yihuang --- client/v2/go.mod | 2 +- client/v2/go.sum | 4 ++-- collections/go.mod | 2 +- collections/go.sum | 4 ++-- flake.lock | 20 ++++++++++---------- flake.nix | 21 +++++++++++---------- go.mod | 2 +- go.sum | 4 ++-- orm/go.mod | 2 +- orm/go.sum | 4 ++-- scripts/go-mod-tidy-all.sh | 17 ++++++++++++----- simapp/go.mod | 2 +- simapp/go.sum | 4 ++-- simapp/gomod2nix.toml | 4 ++-- store/go.mod | 2 +- store/go.sum | 4 ++-- tests/go.mod | 2 +- tests/go.sum | 4 ++-- tests/starship/tests/go.mod | 2 +- tests/starship/tests/go.sum | 4 ++-- tools/confix/go.mod | 2 +- tools/confix/go.sum | 4 ++-- tools/cosmovisor/go.mod | 2 +- tools/cosmovisor/go.sum | 4 ++-- tools/hubl/go.mod | 2 +- tools/hubl/go.sum | 4 ++-- x/accounts/defaults/lockup/go.mod | 2 +- x/accounts/defaults/lockup/go.sum | 4 ++-- x/accounts/go.mod | 2 +- x/accounts/go.sum | 4 ++-- x/auth/go.mod | 2 +- x/auth/go.sum | 4 ++-- x/authz/go.mod | 2 +- x/authz/go.sum | 4 ++-- x/bank/go.mod | 2 +- x/bank/go.sum | 4 ++-- x/circuit/go.mod | 2 +- x/circuit/go.sum | 4 ++-- x/distribution/go.mod | 2 +- x/distribution/go.sum | 4 ++-- x/evidence/go.mod | 2 +- x/evidence/go.sum | 4 ++-- x/feegrant/go.mod | 2 +- x/feegrant/go.sum | 4 ++-- x/gov/go.mod | 2 +- x/gov/go.sum | 4 ++-- x/group/go.mod | 2 +- x/group/go.sum | 4 ++-- x/mint/go.mod | 2 +- x/mint/go.sum | 4 ++-- x/nft/go.mod | 2 +- x/nft/go.sum | 4 ++-- x/params/go.mod | 2 +- x/params/go.sum | 4 ++-- x/protocolpool/go.mod | 2 +- x/protocolpool/go.sum | 4 ++-- x/slashing/go.mod | 2 +- x/slashing/go.sum | 4 ++-- x/staking/go.mod | 2 +- x/staking/go.sum | 4 ++-- x/upgrade/go.mod | 2 +- x/upgrade/go.sum | 4 ++-- 62 files changed, 122 insertions(+), 114 deletions(-) diff --git a/client/v2/go.mod b/client/v2/go.mod index fa54e0dfcbb6..2a4e28ca5e10 100644 --- a/client/v2/go.mod +++ b/client/v2/go.mod @@ -108,7 +108,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/client/v2/go.sum b/client/v2/go.sum index e4bf772ab60d..74aa3cb88b3e 100644 --- a/client/v2/go.sum +++ b/client/v2/go.sum @@ -455,8 +455,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/collections/go.mod b/collections/go.mod index bc89bc4cecc5..30f839c99a33 100644 --- a/collections/go.mod +++ b/collections/go.mod @@ -31,7 +31,7 @@ require ( github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/onsi/gomega v1.20.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/collections/go.sum b/collections/go.sum index cbf31d88daf8..dd48c5824d77 100644 --- a/collections/go.sum +++ b/collections/go.sum @@ -79,8 +79,8 @@ github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE= github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= diff --git a/flake.lock b/flake.lock index add9e6fa014f..d77907f2f43c 100644 --- a/flake.lock +++ b/flake.lock @@ -20,19 +20,19 @@ }, "gomod2nix": { "inputs": { + "flake-utils": [ + "flake-utils" + ], "nixpkgs": [ "nixpkgs" - ], - "utils": [ - "flake-utils" ] }, "locked": { - "lastModified": 1677459247, - "narHash": "sha256-JbakfAiPYmCCV224yAMq/XO0udN5coWv/oazblMKdoY=", + "lastModified": 1710154385, + "narHash": "sha256-4c3zQ2YY4BZOufaBJB4v9VBBeN2dH7iVdoJw8SDNCfI=", "owner": "nix-community", "repo": "gomod2nix", - "rev": "3cbf3a51fe32e2f57af4c52744e7228bab22983d", + "rev": "872b63ddd28f318489c929d25f1f0a3c6039c971", "type": "github" }, "original": { @@ -43,16 +43,16 @@ }, "nixpkgs": { "locked": { - "lastModified": 1708682383, - "narHash": "sha256-w8zFWDDRKbf/9PDbkAXrEG+Ehb6K0f5utjfXfti/CHM=", + "lastModified": 1710889954, + "narHash": "sha256-Pr6F5Pmd7JnNEMHHmspZ0qVqIBVxyZ13ik1pJtm2QXk=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "f305ff3011bbbac55d894a865343a656fe77ee62", + "rev": "7872526e9c5332274ea5932a0c3270d6e4724f3b", "type": "github" }, "original": { "owner": "NixOS", - "ref": "master", + "ref": "nixpkgs-unstable", "repo": "nixpkgs", "type": "github" } diff --git a/flake.nix b/flake.nix index 6ce78209ce3d..bd895939147c 100644 --- a/flake.nix +++ b/flake.nix @@ -1,25 +1,26 @@ { inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/master"; + nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; flake-utils.url = "github:numtide/flake-utils"; gomod2nix = { url = "github:nix-community/gomod2nix"; inputs.nixpkgs.follows = "nixpkgs"; - inputs.utils.follows = "flake-utils"; + inputs.flake-utils.follows = "flake-utils"; }; }; - outputs = { self, nixpkgs, gomod2nix, flake-utils }: + outputs = { self, nixpkgs, flake-utils, ... }@inputs: { - overlays.default = self: super: { + overlays.default = self: super: rec { simd = self.callPackage ./simapp { rev = self.shortRev or "dev"; }; + go = simd.go; # to build the tools (e.g. gomod2nix) using the same go version rocksdb = super.rocksdb.overrideAttrs (_: rec { - version = "8.9.1"; + version = "8.11.3"; src = self.fetchFromGitHub { owner = "facebook"; repo = "rocksdb"; rev = "v${version}"; - sha256 = "sha256-Pl7t4FVOvnORWFS+gjy2EEUQlPxjLukWW5I5gzCQwkI="; + sha256 = "sha256-OpEiMwGxZuxb9o3RQuSrwZMQGLhe9xLT1aa3HpI4KPs="; }; }); }; @@ -35,7 +36,7 @@ inherit system; config = { }; overlays = [ - gomod2nix.overlays.default + inputs.gomod2nix.overlays.default self.overlays.default ]; }; @@ -50,11 +51,11 @@ simd = mkApp pkgs.simd; }; devShells = rec { - default = simd; - simd = with pkgs; mkShell { + default = with pkgs; mkShell { buildInputs = [ - go_1_22 # Use Go 1.22 version + simd.go rocksdb + gomod2nix ]; }; }; diff --git a/go.mod b/go.mod index 25c87f107be9..fad9404bf198 100644 --- a/go.mod +++ b/go.mod @@ -125,7 +125,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-runewidth v0.0.14 // indirect diff --git a/go.sum b/go.sum index 8936c3417425..9c621743a578 100644 --- a/go.sum +++ b/go.sum @@ -450,8 +450,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= diff --git a/orm/go.mod b/orm/go.mod index a0bd53635166..a1be164d57fc 100644 --- a/orm/go.mod +++ b/orm/go.mod @@ -48,7 +48,7 @@ require ( github.com/klauspost/compress v1.17.7 // indirect github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/onsi/gomega v1.20.0 // indirect github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect diff --git a/orm/go.sum b/orm/go.sum index af5a9ed56c81..49c061b548e1 100644 --- a/orm/go.sum +++ b/orm/go.sum @@ -103,8 +103,8 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= github.com/lib/pq v1.10.7 h1:p7ZhMD+KsSRozJr34udlUrhboJwWAgCg34+/ZZNvZZw= github.com/lib/pq v1.10.7/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE= github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU= diff --git a/scripts/go-mod-tidy-all.sh b/scripts/go-mod-tidy-all.sh index 0f4e655bcddf..adbac085dded 100755 --- a/scripts/go-mod-tidy-all.sh +++ b/scripts/go-mod-tidy-all.sh @@ -8,10 +8,17 @@ for modfile in $(find . -name go.mod); do (cd $DIR; go mod tidy) done -if ! command -v gomod2nix &> /dev/null +# update gomod2nix.toml for simapp +# NOTE: gomod2nix should be built using the same go version as the project, the nix flake will make sure of that +# automatically. +cd simapp +if command -v nix &> /dev/null + nix develop .. -c gomod2nix then - echo "gomod2nix could not be found in PATH, installing..." - go install github.com/nix-community/gomod2nix@latest + if ! command -v gomod2nix &> /dev/null + then + echo "gomod2nix could not be found in PATH, installing..." + go install github.com/nix-community/gomod2nix@latest + fi + gomod2nix fi -# update gomod2nix.toml for simapp -cd simapp; gomod2nix diff --git a/simapp/go.mod b/simapp/go.mod index 5a248dac9590..7af6d8757346 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -148,7 +148,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/lucasb-eyer/go-colorful v1.2.0 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect diff --git a/simapp/go.sum b/simapp/go.sum index c4e92b3cf6f7..672f05f1fcd2 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -739,8 +739,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lucasb-eyer/go-colorful v1.2.0 h1:1nnpGOrhyZZuNyfu1QjKiUICQ74+3FNCN69Aj6K7nkY= github.com/lucasb-eyer/go-colorful v1.2.0/go.mod h1:R4dSotOR9KMtayYi1e77YzuveK+i7ruzyGqttikkLy0= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= diff --git a/simapp/gomod2nix.toml b/simapp/gomod2nix.toml index af190129c406..d3e09afb3891 100644 --- a/simapp/gomod2nix.toml +++ b/simapp/gomod2nix.toml @@ -336,8 +336,8 @@ schema = 3 version = "v0.1.0" hash = "sha256-wQqGTtRWsfR9n0O/SXHVgECebbnNmHddxJIbG63OJBQ=" [mod."github.com/linxGnu/grocksdb"] - version = "v1.8.12" - hash = "sha256-1tlgs/JnopLI8eoWJlv9hP4jf0OTm1qMZTSg0jAkG7A=" + version = "v1.8.14" + hash = "sha256-dT647UzB25Ye1Gv6b9JEtJZjuWKdJo4D8kw9cB0W8gA=" [mod."github.com/lucasb-eyer/go-colorful"] version = "v1.2.0" hash = "sha256-Gg9dDJFCTaHrKHRR1SrJgZ8fWieJkybljybkI9x0gyE=" diff --git a/store/go.mod b/store/go.mod index cfe077fe16fd..44189fbf21a2 100644 --- a/store/go.mod +++ b/store/go.mod @@ -14,7 +14,7 @@ require ( github.com/cosmos/ics23/go v0.10.0 github.com/google/btree v1.1.2 github.com/hashicorp/go-metrics v0.5.3 - github.com/linxGnu/grocksdb v1.8.12 + github.com/linxGnu/grocksdb v1.8.14 github.com/mattn/go-sqlite3 v1.14.22 github.com/spf13/cast v1.6.0 github.com/stretchr/testify v1.9.0 diff --git a/store/go.sum b/store/go.sum index d55c02f8d8a0..983a6a0188e6 100644 --- a/store/go.sum +++ b/store/go.sum @@ -139,8 +139,8 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= diff --git a/tests/go.mod b/tests/go.mod index 82d500c96873..876ac4e8b9b5 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -152,7 +152,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect diff --git a/tests/go.sum b/tests/go.sum index c2d676e38ff6..9bc70ddaed1a 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -727,8 +727,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/tests/starship/tests/go.mod b/tests/starship/tests/go.mod index 260b03c1befe..c0b12057e242 100644 --- a/tests/starship/tests/go.mod +++ b/tests/starship/tests/go.mod @@ -177,7 +177,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect diff --git a/tests/starship/tests/go.sum b/tests/starship/tests/go.sum index 8cc9f6f0f60d..6fefe3503ead 100644 --- a/tests/starship/tests/go.sum +++ b/tests/starship/tests/go.sum @@ -727,8 +727,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/tools/confix/go.mod b/tools/confix/go.mod index 971ac734bcd7..926c76737734 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -101,7 +101,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/tools/confix/go.sum b/tools/confix/go.sum index bf845878a437..2507afc04db3 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -464,8 +464,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/tools/cosmovisor/go.mod b/tools/cosmovisor/go.mod index 8c389277540a..7d1defd0e6e5 100644 --- a/tools/cosmovisor/go.mod +++ b/tools/cosmovisor/go.mod @@ -114,7 +114,7 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/tools/cosmovisor/go.sum b/tools/cosmovisor/go.sum index c71f7f42f531..7fccf60109c2 100644 --- a/tools/cosmovisor/go.sum +++ b/tools/cosmovisor/go.sum @@ -728,8 +728,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/tools/hubl/go.mod b/tools/hubl/go.mod index 665d60789516..4acaa6bac947 100644 --- a/tools/hubl/go.mod +++ b/tools/hubl/go.mod @@ -100,7 +100,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/tools/hubl/go.sum b/tools/hubl/go.sum index 15b54993cc12..3b5e01265a27 100644 --- a/tools/hubl/go.sum +++ b/tools/hubl/go.sum @@ -464,8 +464,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/accounts/defaults/lockup/go.mod b/x/accounts/defaults/lockup/go.mod index 421a53a9fe39..e168bf917013 100644 --- a/x/accounts/defaults/lockup/go.mod +++ b/x/accounts/defaults/lockup/go.mod @@ -100,7 +100,7 @@ require ( github.com/kr/pretty v0.3.1 // indirect github.com/kr/text v0.2.0 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/accounts/defaults/lockup/go.sum b/x/accounts/defaults/lockup/go.sum index 5ca7bde6169c..14b5f539850f 100644 --- a/x/accounts/defaults/lockup/go.sum +++ b/x/accounts/defaults/lockup/go.sum @@ -428,8 +428,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/accounts/go.mod b/x/accounts/go.mod index 1521ed0a9ca3..c96d9eaaf20d 100644 --- a/x/accounts/go.mod +++ b/x/accounts/go.mod @@ -103,7 +103,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/accounts/go.sum b/x/accounts/go.sum index beafcb637d57..04b38dac86d5 100644 --- a/x/accounts/go.sum +++ b/x/accounts/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/auth/go.mod b/x/auth/go.mod index 803b1b830135..8e124359e6a4 100644 --- a/x/auth/go.mod +++ b/x/auth/go.mod @@ -110,7 +110,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/auth/go.sum b/x/auth/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/auth/go.sum +++ b/x/auth/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/authz/go.mod b/x/authz/go.mod index 0105ba16abf7..51d740983f6b 100644 --- a/x/authz/go.mod +++ b/x/authz/go.mod @@ -106,7 +106,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/authz/go.sum b/x/authz/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/authz/go.sum +++ b/x/authz/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/bank/go.mod b/x/bank/go.mod index 2adc87743263..904284a0c06a 100644 --- a/x/bank/go.mod +++ b/x/bank/go.mod @@ -105,7 +105,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/bank/go.sum b/x/bank/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/bank/go.sum +++ b/x/bank/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/circuit/go.mod b/x/circuit/go.mod index 8e55406ddbb4..f2ebde3942e5 100644 --- a/x/circuit/go.mod +++ b/x/circuit/go.mod @@ -104,7 +104,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/circuit/go.sum b/x/circuit/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/circuit/go.sum +++ b/x/circuit/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/distribution/go.mod b/x/distribution/go.mod index 3cc85bc565c5..2b0c79c8c096 100644 --- a/x/distribution/go.mod +++ b/x/distribution/go.mod @@ -108,7 +108,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/distribution/go.sum b/x/distribution/go.sum index d9d1e719ea4f..cd056a48ec2b 100644 --- a/x/distribution/go.sum +++ b/x/distribution/go.sum @@ -451,8 +451,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/evidence/go.mod b/x/evidence/go.mod index 7273af6a4b39..dc61b4ef5d66 100644 --- a/x/evidence/go.mod +++ b/x/evidence/go.mod @@ -106,7 +106,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/evidence/go.sum b/x/evidence/go.sum index ddbfe9a33867..d97cc4468573 100644 --- a/x/evidence/go.sum +++ b/x/evidence/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/feegrant/go.mod b/x/feegrant/go.mod index 774487ac69c3..c8c148f3c038 100644 --- a/x/feegrant/go.mod +++ b/x/feegrant/go.mod @@ -110,7 +110,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect diff --git a/x/feegrant/go.sum b/x/feegrant/go.sum index 0462fb07cd68..e81c974d6173 100644 --- a/x/feegrant/go.sum +++ b/x/feegrant/go.sum @@ -457,8 +457,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/gov/go.mod b/x/gov/go.mod index aff5282f13c7..179808b67a1a 100644 --- a/x/gov/go.mod +++ b/x/gov/go.mod @@ -112,7 +112,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/gov/go.sum b/x/gov/go.sum index 0462fb07cd68..e81c974d6173 100644 --- a/x/gov/go.sum +++ b/x/gov/go.sum @@ -457,8 +457,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/group/go.mod b/x/group/go.mod index 5e9d83f24560..39aff94759e9 100644 --- a/x/group/go.mod +++ b/x/group/go.mod @@ -114,7 +114,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/group/go.sum b/x/group/go.sum index 181bfe1c0339..92629d7c9917 100644 --- a/x/group/go.sum +++ b/x/group/go.sum @@ -457,8 +457,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/mint/go.mod b/x/mint/go.mod index 20f948aee12e..fa59618ec406 100644 --- a/x/mint/go.mod +++ b/x/mint/go.mod @@ -105,7 +105,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/mint/go.sum b/x/mint/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/mint/go.sum +++ b/x/mint/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/nft/go.mod b/x/nft/go.mod index 1acfe5a21435..4c3360193044 100644 --- a/x/nft/go.mod +++ b/x/nft/go.mod @@ -104,7 +104,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/nft/go.sum b/x/nft/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/nft/go.sum +++ b/x/nft/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/params/go.mod b/x/params/go.mod index cfb42543bed5..b8f85551e7a7 100644 --- a/x/params/go.mod +++ b/x/params/go.mod @@ -106,7 +106,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/params/go.sum b/x/params/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/params/go.sum +++ b/x/params/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/protocolpool/go.mod b/x/protocolpool/go.mod index 727f3f73f5ce..00f296504e76 100644 --- a/x/protocolpool/go.mod +++ b/x/protocolpool/go.mod @@ -106,7 +106,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/protocolpool/go.sum b/x/protocolpool/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/protocolpool/go.sum +++ b/x/protocolpool/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/slashing/go.mod b/x/slashing/go.mod index f21111c9766e..27a82aabe223 100644 --- a/x/slashing/go.mod +++ b/x/slashing/go.mod @@ -107,7 +107,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/slashing/go.sum b/x/slashing/go.sum index 4e367ceb24fc..5d2b991063a5 100644 --- a/x/slashing/go.sum +++ b/x/slashing/go.sum @@ -451,8 +451,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/staking/go.mod b/x/staking/go.mod index 38e2f0e8d4da..dc6bb81cf120 100644 --- a/x/staking/go.mod +++ b/x/staking/go.mod @@ -108,7 +108,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect diff --git a/x/staking/go.sum b/x/staking/go.sum index 2611bc6405cb..c26e801a1250 100644 --- a/x/staking/go.sum +++ b/x/staking/go.sum @@ -449,8 +449,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= diff --git a/x/upgrade/go.mod b/x/upgrade/go.mod index 6cfb46c3cbb1..f847f36b0ade 100644 --- a/x/upgrade/go.mod +++ b/x/upgrade/go.mod @@ -129,7 +129,7 @@ require ( github.com/kr/text v0.2.0 // indirect github.com/lib/pq v1.10.7 // indirect github.com/libp2p/go-buffer-pool v0.1.0 // indirect - github.com/linxGnu/grocksdb v1.8.12 // indirect + github.com/linxGnu/grocksdb v1.8.14 // indirect github.com/magiconair/properties v1.8.7 // indirect github.com/manifoldco/promptui v0.9.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect diff --git a/x/upgrade/go.sum b/x/upgrade/go.sum index b2bfd565a997..2d823fe88a20 100644 --- a/x/upgrade/go.sum +++ b/x/upgrade/go.sum @@ -742,8 +742,8 @@ github.com/libp2p/go-buffer-pool v0.1.0 h1:oK4mSFcQz7cTQIfqbe4MIj9gLW+mnanjyFtc6 github.com/libp2p/go-buffer-pool v0.1.0/go.mod h1:N+vh8gMqimBzdKkSMVuydVDq+UV5QTWy5HSiZacSbPg= github.com/lightstep/lightstep-tracer-common/golang/gogo v0.0.0-20190605223551-bc2310a04743/go.mod h1:qklhhLq1aX+mtWk9cPHPzaBjWImj5ULL6C7HFJtXQMM= github.com/lightstep/lightstep-tracer-go v0.18.1/go.mod h1:jlF1pusYV4pidLvZ+XD0UBX0ZE6WURAspgAczcDHrL4= -github.com/linxGnu/grocksdb v1.8.12 h1:1/pCztQUOa3BX/1gR3jSZDoaKFpeHFvQ1XrqZpSvZVo= -github.com/linxGnu/grocksdb v1.8.12/go.mod h1:xZCIb5Muw+nhbDK4Y5UJuOrin5MceOuiXkVUR7vp4WY= +github.com/linxGnu/grocksdb v1.8.14 h1:HTgyYalNwBSG/1qCQUIott44wU5b2Y9Kr3z7SK5OfGQ= +github.com/linxGnu/grocksdb v1.8.14/go.mod h1:QYiYypR2d4v63Wj1adOOfzglnoII0gLj3PNh4fZkcFA= github.com/lyft/protoc-gen-validate v0.0.13/go.mod h1:XbGvPuh87YZc5TdIa2/I4pLk0QoUACkjt2znoq26NVQ= github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ= github.com/magiconair/properties v1.8.7 h1:IeQXZAiQcpL9mgcAe1Nu6cX9LLw6ExEHKjN0VQdvPDY= From 45994391aeb640f6ba69278e0c4e55aa1502925f Mon Sep 17 00:00:00 2001 From: Aryan Tikarya Date: Sun, 24 Mar 2024 15:23:51 +0530 Subject: [PATCH 10/20] feat(x/gov): emit proposer address in submit proposal event (#19842) --- x/gov/keeper/proposal.go | 1 + x/gov/types/events.go | 1 + 2 files changed, 2 insertions(+) diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index de732b8760f3..1e1b38e92bbd 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -147,6 +147,7 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata if err := k.environment.EventService.EventManager(ctx).EmitKV( types.EventTypeSubmitProposal, event.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), + event.NewAttribute(types.AttributeKeyProposalProposer, proposer.String()), event.NewAttribute(types.AttributeKeyProposalMessages, strings.Join(msgs, ",")), ); err != nil { return v1.Proposal{}, fmt.Errorf("failed to emit event: %w", err) diff --git a/x/gov/types/events.go b/x/gov/types/events.go index 2ca0fa8dbf9d..f9b107ac355c 100644 --- a/x/gov/types/events.go +++ b/x/gov/types/events.go @@ -17,6 +17,7 @@ const ( AttributeKeyVotingPeriodStart = "voting_period_start" AttributeKeyProposalLog = "proposal_log" // log of proposal execution AttributeKeyProposalDepositError = "proposal_deposit_error" // error on proposal deposit refund/burn + AttributeKeyProposalProposer = "proposal_proposer" // account address of the proposer AttributeValueProposalDropped = "proposal_dropped" // didn't meet min deposit AttributeValueProposalPassed = "proposal_passed" // met vote quorum From ea7bdd1724001be0063a2423543358bc2bffe91e Mon Sep 17 00:00:00 2001 From: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Date: Sun, 24 Mar 2024 19:56:24 +0100 Subject: [PATCH 11/20] fix: Do not call Remove during Walk (#19833) Co-authored-by: Aleksandr Bezobchuk --- CHANGELOG.md | 1 + x/feegrant/keeper/keeper.go | 11 ++++++++--- x/gov/keeper/tally.go | 11 ++++++++++- x/slashing/keeper/signing_info.go | 8 +------- x/staking/keeper/cons_pubkey.go | 15 +++++++++++---- 5 files changed, 31 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2333287f5cd5..1c960cfc29f8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -98,6 +98,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (baseapp) [#18551](https://github.com/cosmos/cosmos-sdk/pull/18551) Fix SelectTxForProposal the calculation method of tx bytes size is inconsistent with CometBFT * (server) [#18994](https://github.com/cosmos/cosmos-sdk/pull/18994) Update server context directly rather than a reference to a sub-object * (crypto) [#19691](https://github.com/cosmos/cosmos-sdk/pull/19691) Fix tx sign doesn't throw an error when incorrect Ledger is used. +* [#19833](https://github.com/cosmos/cosmos-sdk/pull/19833) Fix some places in which we call Remove inside a Walk. ### API Breaking Changes diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 02492e9d3d4c..d3a6e8a57e70 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -302,6 +302,7 @@ func (k Keeper) RemoveExpiredAllowances(ctx context.Context, limit int) error { rng := collections.NewPrefixUntilTripleRange[time.Time, sdk.AccAddress, sdk.AccAddress](exp) count := 0 + keysToRemove := []collections.Triple[time.Time, sdk.AccAddress, sdk.AccAddress]{} err := k.FeeAllowanceQueue.Walk(ctx, rng, func(key collections.Triple[time.Time, sdk.AccAddress, sdk.AccAddress], value bool) (stop bool, err error) { grantee, granter := key.K2(), key.K3() @@ -309,9 +310,7 @@ func (k Keeper) RemoveExpiredAllowances(ctx context.Context, limit int) error { return true, err } - if err := k.FeeAllowanceQueue.Remove(ctx, key); err != nil { - return true, err - } + keysToRemove = append(keysToRemove, key) // limit the amount of iterations to avoid taking too much time count++ @@ -325,5 +324,11 @@ func (k Keeper) RemoveExpiredAllowances(ctx context.Context, limit int) error { return err } + for _, key := range keysToRemove { + if err := k.FeeAllowanceQueue.Remove(ctx, key); err != nil { + return err + } + } + return nil } diff --git a/x/gov/keeper/tally.go b/x/gov/keeper/tally.go index dc1b1c57285c..cc0790c27031 100644 --- a/x/gov/keeper/tally.go +++ b/x/gov/keeper/tally.go @@ -247,6 +247,7 @@ func defaultCalculateVoteResultsAndVotingPower( // iterate over all votes, tally up the voting power of each validator rng := collections.NewPrefixedPairRange[uint64, sdk.AccAddress](proposalID) + votesToRemove := []collections.Pair[uint64, sdk.AccAddress]{} if err := k.Votes.Walk(ctx, rng, func(key collections.Pair[uint64, sdk.AccAddress], vote v1.Vote) (bool, error) { // if validator, just record it in the map voter, err := k.authKeeper.AddressCodec().StringToBytes(vote.Voter) @@ -292,11 +293,19 @@ func defaultCalculateVoteResultsAndVotingPower( return false, err } - return false, k.Votes.Remove(ctx, collections.Join(vote.ProposalId, sdk.AccAddress(voter))) + votesToRemove = append(votesToRemove, key) + return false, nil }); err != nil { return math.LegacyDec{}, nil, err } + // remove all votes from store + for _, key := range votesToRemove { + if err := k.Votes.Remove(ctx, key); err != nil { + return math.LegacyDec{}, nil, err + } + } + // iterate over the validators again to tally their voting power for _, val := range validators { if len(val.Vote) == 0 { diff --git a/x/slashing/keeper/signing_info.go b/x/slashing/keeper/signing_info.go index 5eac3651a367..35fca38e2661 100644 --- a/x/slashing/keeper/signing_info.go +++ b/x/slashing/keeper/signing_info.go @@ -182,13 +182,7 @@ func (k Keeper) DeleteMissedBlockBitmap(ctx context.Context, addr sdk.ConsAddres } rng := collections.NewPrefixedPairRange[[]byte, uint64](addr.Bytes()) - return k.ValidatorMissedBlockBitmap.Walk(ctx, rng, func(key collections.Pair[[]byte, uint64], value []byte) (bool, error) { - err := k.ValidatorMissedBlockBitmap.Remove(ctx, key) - if err != nil { - return true, err - } - return false, nil - }) + return k.ValidatorMissedBlockBitmap.Clear(ctx, rng) } // IterateMissedBlockBitmap iterates over a validator's signed blocks window diff --git a/x/staking/keeper/cons_pubkey.go b/x/staking/keeper/cons_pubkey.go index f666ae21e542..7c327b5b61e6 100644 --- a/x/staking/keeper/cons_pubkey.go +++ b/x/staking/keeper/cons_pubkey.go @@ -202,9 +202,7 @@ func (k Keeper) deleteConsKeyIndexKey(ctx context.Context, valAddr sdk.ValAddres StartInclusive(collections.Join(valAddr.Bytes(), time.Time{})). EndInclusive(collections.Join(valAddr.Bytes(), ts)) - return k.ValidatorConsensusKeyRotationRecordIndexKey.Walk(ctx, rng, func(key collections.Pair[[]byte, time.Time]) (stop bool, err error) { - return false, k.ValidatorConsensusKeyRotationRecordIndexKey.Remove(ctx, key) - }) + return k.ValidatorConsensusKeyRotationRecordIndexKey.Clear(ctx, rng) } // getAndRemoveAllMaturedRotatedKeys returns all matured valaddresses. @@ -213,14 +211,23 @@ func (k Keeper) getAndRemoveAllMaturedRotatedKeys(ctx context.Context, matureTim // get an iterator for all timeslices from time 0 until the current HeaderInfo time rng := new(collections.Range[time.Time]).EndInclusive(matureTime) + keysToRemove := []time.Time{} err := k.ValidatorConsensusKeyRotationRecordQueue.Walk(ctx, rng, func(key time.Time, value types.ValAddrsOfRotatedConsKeys) (stop bool, err error) { valAddrs = append(valAddrs, value.Addresses...) - return false, k.ValidatorConsensusKeyRotationRecordQueue.Remove(ctx, key) + keysToRemove = append(keysToRemove, key) + return false, nil }) if err != nil { return nil, err } + // remove all the keys from the list + for _, key := range keysToRemove { + if err := k.ValidatorConsensusKeyRotationRecordQueue.Remove(ctx, key); err != nil { + return nil, err + } + } + return valAddrs, nil } From adc3432ba24f9f2ea5382f62d356ec921c7096ea Mon Sep 17 00:00:00 2001 From: Aaron Craelius Date: Mon, 25 Mar 2024 05:45:15 -0400 Subject: [PATCH 12/20] fix(x/tx): default to using gogoproto.HybridResolver wherever possible (#19845) Co-authored-by: marbar3778 --- store/database.go | 6 +++--- store/internal/encoding/changeset_test.go | 3 ++- store/storage/pebbledb/batch.go | 4 ++-- store/storage/pebbledb/db.go | 4 ++-- store/storage/sqlite/batch.go | 4 ++-- store/storage/sqlite/db_test.go | 4 +--- x/tx/CHANGELOG.md | 16 ++++++++++------ x/tx/signing/aminojson/aminojson.go | 3 ++- x/tx/signing/aminojson/json_marshal.go | 3 ++- x/tx/signing/context.go | 3 ++- x/tx/signing/textual/handler.go | 3 ++- 11 files changed, 30 insertions(+), 23 deletions(-) diff --git a/store/database.go b/store/database.go index 9dc48d8db49b..0ff83ef3401f 100644 --- a/store/database.go +++ b/store/database.go @@ -18,7 +18,7 @@ type Reader interface { // // Note: is safe to modify and read after calling Get. // The returned byte slice is safe to read, but cannot be modified. - Get(storeKey []byte, key []byte) ([]byte, error) + Get(storeKey, key []byte) ([]byte, error) } // Writer wraps the Set method of a backing data store. @@ -26,12 +26,12 @@ type Writer interface { // Set inserts the given value into the key-value data store. // // Note: are safe to modify and read after calling Set. - Set(storeKey []byte, key, value []byte) error + Set(storeKey, key, value []byte) error // Delete removes the key from the backing key-value data store. // // Note: is safe to modify and read after calling Delete. - Delete(storeKey []byte, key []byte) error + Delete(storeKey, key []byte) error } // Database contains all the methods required to allow handling different diff --git a/store/internal/encoding/changeset_test.go b/store/internal/encoding/changeset_test.go index ae6cb4e2d4a4..03313936b9ea 100644 --- a/store/internal/encoding/changeset_test.go +++ b/store/internal/encoding/changeset_test.go @@ -3,8 +3,9 @@ package encoding import ( "testing" - corestore "cosmossdk.io/core/store" "github.com/stretchr/testify/require" + + corestore "cosmossdk.io/core/store" ) func TestChangesetMarshal(t *testing.T) { diff --git a/store/storage/pebbledb/batch.go b/store/storage/pebbledb/batch.go index fed8c8a1b34c..101986878c81 100644 --- a/store/storage/pebbledb/batch.go +++ b/store/storage/pebbledb/batch.go @@ -57,11 +57,11 @@ func (b *Batch) set(storeKey []byte, tombstone uint64, key, value []byte) error return nil } -func (b *Batch) Set(storeKey []byte, key, value []byte) error { +func (b *Batch) Set(storeKey, key, value []byte) error { return b.set(storeKey, 0, key, value) } -func (b *Batch) Delete(storeKey []byte, key []byte) error { +func (b *Batch) Delete(storeKey, key []byte) error { return b.set(storeKey, b.version, key, []byte(tombstoneVal)) } diff --git a/store/storage/pebbledb/db.go b/store/storage/pebbledb/db.go index 054237bbb487..bc6b4c988f0d 100644 --- a/store/storage/pebbledb/db.go +++ b/store/storage/pebbledb/db.go @@ -319,7 +319,7 @@ func storePrefix(storeKey []byte) []byte { return append([]byte(StorePrefixTpl), storeKey...) } -func prependStoreKey(storeKey []byte, key []byte) []byte { +func prependStoreKey(storeKey, key []byte) []byte { return append(storePrefix(storeKey), key...) } @@ -362,7 +362,7 @@ func valTombstoned(value []byte) bool { return true } -func getMVCCSlice(db *pebble.DB, storeKey []byte, key []byte, version uint64) ([]byte, error) { +func getMVCCSlice(db *pebble.DB, storeKey, key []byte, version uint64) ([]byte, error) { // end domain is exclusive, so we need to increment the version by 1 if version < math.MaxUint64 { version++ diff --git a/store/storage/sqlite/batch.go b/store/storage/sqlite/batch.go index ceb5e29ee625..783b597e04af 100644 --- a/store/storage/sqlite/batch.go +++ b/store/storage/sqlite/batch.go @@ -62,13 +62,13 @@ func (b *Batch) Reset() error { return nil } -func (b *Batch) Set(storeKey []byte, key, value []byte) error { +func (b *Batch) Set(storeKey, key, value []byte) error { b.size += len(key) + len(value) b.ops = append(b.ops, batchOp{action: batchActionSet, storeKey: storeKey, key: key, value: value}) return nil } -func (b *Batch) Delete(storeKey []byte, key []byte) error { +func (b *Batch) Delete(storeKey, key []byte) error { b.size += len(key) b.ops = append(b.ops, batchOp{action: batchActionDel, storeKey: storeKey, key: key}) return nil diff --git a/store/storage/sqlite/db_test.go b/store/storage/sqlite/db_test.go index cf11c3dec780..96c50e9b56fa 100644 --- a/store/storage/sqlite/db_test.go +++ b/store/storage/sqlite/db_test.go @@ -13,9 +13,7 @@ import ( "cosmossdk.io/store/v2/storage" ) -var ( - storeKey1 = []byte("store1") -) +var storeKey1 = []byte("store1") func TestStorageTestSuite(t *testing.T) { s := &storage.StorageTestSuite{ diff --git a/x/tx/CHANGELOG.md b/x/tx/CHANGELOG.md index 4d475d2c64d0..714127d73bb4 100644 --- a/x/tx/CHANGELOG.md +++ b/x/tx/CHANGELOG.md @@ -31,6 +31,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] +### Improvments + +* [#19845](https://github.com/cosmos/cosmos-sdk/pull/19845) Use hybrid resolver instead of only protov2 registry + ## v0.13.1 ### Features @@ -113,18 +117,18 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Improvements * [#15871](https://github.com/cosmos/cosmos-sdk/pull/15871) - * `HandlerMap` now has a `DefaultMode()` getter method - * Textual types use `signing.ProtoFileResolver` instead of `protoregistry.Files` + * `HandlerMap` now has a `DefaultMode()` getter method + * Textual types use `signing.ProtoFileResolver` instead of `protoregistry.Files` ## v0.6.0 ### API Breaking * [#15709](https://github.com/cosmos/cosmos-sdk/pull/15709): - * `GetSignersContext` has been renamed to `signing.Context` - * `GetSigners` now returns `[][]byte` instead of `[]string` - * `GetSignersOptions` has been renamed to `signing.Options` and requires `address.Codec`s for account and validator addresses - * `GetSignersOptions.ProtoFiles` has been renamed to `signing.Options.FileResolver` + * `GetSignersContext` has been renamed to `signing.Context` + * `GetSigners` now returns `[][]byte` instead of `[]string` + * `GetSignersOptions` has been renamed to `signing.Options` and requires `address.Codec`s for account and validator addresses + * `GetSignersOptions.ProtoFiles` has been renamed to `signing.Options.FileResolver` ### Bug Fixes diff --git a/x/tx/signing/aminojson/aminojson.go b/x/tx/signing/aminojson/aminojson.go index 5b0d9e4d0547..abcb25d5e818 100644 --- a/x/tx/signing/aminojson/aminojson.go +++ b/x/tx/signing/aminojson/aminojson.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" + gogoproto "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/reflect/protoregistry" signingv1beta1 "cosmossdk.io/api/cosmos/tx/signing/v1beta1" @@ -31,7 +32,7 @@ type SignModeHandlerOptions struct { func NewSignModeHandler(options SignModeHandlerOptions) *SignModeHandler { h := &SignModeHandler{} if options.FileResolver == nil { - h.fileResolver = protoregistry.GlobalFiles + h.fileResolver = gogoproto.HybridResolver } else { h.fileResolver = options.FileResolver } diff --git a/x/tx/signing/aminojson/json_marshal.go b/x/tx/signing/aminojson/json_marshal.go index 800dfc7fd320..e6c6cad6f250 100644 --- a/x/tx/signing/aminojson/json_marshal.go +++ b/x/tx/signing/aminojson/json_marshal.go @@ -7,6 +7,7 @@ import ( "io" "sort" + gogoproto "github.com/cosmos/gogoproto/proto" "github.com/pkg/errors" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" @@ -55,7 +56,7 @@ type Encoder struct { // rules. func NewEncoder(options EncoderOptions) Encoder { if options.FileResolver == nil { - options.FileResolver = protoregistry.GlobalFiles + options.FileResolver = gogoproto.HybridResolver } if options.TypeResolver == nil { options.TypeResolver = protoregistry.GlobalTypes diff --git a/x/tx/signing/context.go b/x/tx/signing/context.go index d90fb4a5cb30..7aca6fd2b1cd 100644 --- a/x/tx/signing/context.go +++ b/x/tx/signing/context.go @@ -5,6 +5,7 @@ import ( "fmt" cosmos_proto "github.com/cosmos/cosmos-proto" + gogoproto "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protodesc" "google.golang.org/protobuf/reflect/protoreflect" @@ -79,7 +80,7 @@ type ProtoFileResolver interface { func NewContext(options Options) (*Context, error) { protoFiles := options.FileResolver if protoFiles == nil { - protoFiles = protoregistry.GlobalFiles + protoFiles = gogoproto.HybridResolver } protoTypes := options.TypeResolver diff --git a/x/tx/signing/textual/handler.go b/x/tx/signing/textual/handler.go index 67ab53a5c095..e31981b9286e 100644 --- a/x/tx/signing/textual/handler.go +++ b/x/tx/signing/textual/handler.go @@ -8,6 +8,7 @@ import ( "reflect" cosmos_proto "github.com/cosmos/cosmos-proto" + gogoproto "github.com/cosmos/gogoproto/proto" "google.golang.org/protobuf/proto" "google.golang.org/protobuf/reflect/protoreflect" "google.golang.org/protobuf/reflect/protoregistry" @@ -71,7 +72,7 @@ func NewSignModeHandler(o SignModeOptions) (*SignModeHandler, error) { return nil, errors.New("coinMetadataQuerier must be non-empty") } if o.FileResolver == nil { - o.FileResolver = protoregistry.GlobalFiles + o.FileResolver = gogoproto.HybridResolver } if o.TypeResolver == nil { o.TypeResolver = protoregistry.GlobalTypes From 00b2b9d3b02a42cce799dd86fdb642e7a32ddc69 Mon Sep 17 00:00:00 2001 From: Cosmos SDK <113218068+github-prbot@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:52:50 +0100 Subject: [PATCH 13/20] chore: fix spelling errors (#19852) Co-authored-by: github-merge-queue <118344674+github-merge-queue@users.noreply.github.com> --- x/tx/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/tx/CHANGELOG.md b/x/tx/CHANGELOG.md index 714127d73bb4..6544fca8d686 100644 --- a/x/tx/CHANGELOG.md +++ b/x/tx/CHANGELOG.md @@ -31,7 +31,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased] -### Improvments +### Improvements * [#19845](https://github.com/cosmos/cosmos-sdk/pull/19845) Use hybrid resolver instead of only protov2 registry From d1c3547d8ee5a7ac506247e8b10c0a12fcbf741d Mon Sep 17 00:00:00 2001 From: Kien Date: Mon, 25 Mar 2024 22:55:39 +0700 Subject: [PATCH 14/20] feat(x/gov): emit depositor in `proposal_deposit` event (#19853) --- x/gov/CHANGELOG.md | 1 + x/gov/keeper/deposit.go | 1 + x/gov/keeper/proposal.go | 1 + x/gov/types/events.go | 1 + 4 files changed, 4 insertions(+) diff --git a/x/gov/CHANGELOG.md b/x/gov/CHANGELOG.md index 94bc8b201fa7..4859161e7758 100644 --- a/x/gov/CHANGELOG.md +++ b/x/gov/CHANGELOG.md @@ -34,6 +34,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#18532](https://github.com/cosmos/cosmos-sdk/pull/18532) Add proposal types to proposals. * [#18620](https://github.com/cosmos/cosmos-sdk/pull/18620) Add optimistic proposals. * [#18762](https://github.com/cosmos/cosmos-sdk/pull/18762) Add multiple choice proposals. +* [#19853](https://github.com/cosmos/cosmos-sdk/pull/19853) Emit `depositor` in `EventTypeProposalDeposit` and `proposal_type` in `EventTypeSubmitProposal` ### Improvements diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index fc05386ce8e2..18980698efe1 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -179,6 +179,7 @@ func (k Keeper) AddDeposit(ctx context.Context, proposalID uint64, depositorAddr if err := k.environment.EventService.EventManager(ctx).EmitKV( types.EventTypeProposalDeposit, + event.NewAttribute(types.AttributeKeyDepositor, depositorAddr.String()), event.NewAttribute(sdk.AttributeKeyAmount, depositAmount.String()), event.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), ); err != nil { diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 1e1b38e92bbd..3cf868689458 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -146,6 +146,7 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata if err := k.environment.EventService.EventManager(ctx).EmitKV( types.EventTypeSubmitProposal, + event.NewAttribute(types.AttributeKeyProposalType, proposalType.String()), event.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), event.NewAttribute(types.AttributeKeyProposalProposer, proposer.String()), event.NewAttribute(types.AttributeKeyProposalMessages, strings.Join(msgs, ",")), diff --git a/x/gov/types/events.go b/x/gov/types/events.go index f9b107ac355c..ca2a01d2cead 100644 --- a/x/gov/types/events.go +++ b/x/gov/types/events.go @@ -13,6 +13,7 @@ const ( AttributeKeyVoter = "voter" AttributeKeyOption = "option" AttributeKeyProposalID = "proposal_id" + AttributeKeyDepositor = "depositor" AttributeKeyProposalMessages = "proposal_messages" // Msg type_urls in the proposal AttributeKeyVotingPeriodStart = "voting_period_start" AttributeKeyProposalLog = "proposal_log" // log of proposal execution From 138db2bb2a8aad21d676b68d257ca2eff1f2b0bb Mon Sep 17 00:00:00 2001 From: Marko Date: Mon, 25 Mar 2024 17:57:34 +0100 Subject: [PATCH 15/20] chore: linting fixes (#19855) Co-authored-by: son trinh --- store/db/rocksdb_noflag.go | 17 +---------------- store/proof/commit_info.go | 8 ++++---- x/params/types/common_test.go | 14 +++++++------- 3 files changed, 12 insertions(+), 27 deletions(-) diff --git a/store/db/rocksdb_noflag.go b/store/db/rocksdb_noflag.go index f5b8f98df595..1d1fa4e21d80 100644 --- a/store/db/rocksdb_noflag.go +++ b/store/db/rocksdb_noflag.go @@ -6,7 +6,6 @@ package db import ( corestore "cosmossdk.io/core/store" "cosmossdk.io/store/v2" - "github.com/linxGnu/grocksdb" ) var ( @@ -19,7 +18,7 @@ var ( type RocksDB struct { } -func NewRocksDB(dataDir string) (*RocksDB, error) { +func NewRocksDB(name, dataDir string) (*RocksDB, error) { panic("rocksdb must be built with -tags rocksdb") } @@ -61,10 +60,6 @@ var _ corestore.Iterator = (*rocksDBIterator)(nil) type rocksDBIterator struct { } -func newRocksDBIterator(src *grocksdb.Iterator, start, end []byte, reverse bool) *rocksDBIterator { - panic("rocksdb must be built with -tags rocksdb") -} - func (itr *rocksDBIterator) Domain() (start, end []byte) { panic("rocksdb must be built with -tags rocksdb") } @@ -123,13 +118,3 @@ func (b *rocksDBBatch) Close() error { func (b *rocksDBBatch) GetByteSize() (int, error) { panic("rocksdb must be built with -tags rocksdb") } - -func readOnlySlice(s *grocksdb.Slice) []byte { - panic("rocksdb must be built with -tags rocksdb") -} - -// copyAndFreeSlice will copy a given RocksDB slice and free it. If the slice -// does not exist, will be returned. -func copyAndFreeSlice(s *grocksdb.Slice) []byte { - panic("rocksdb must be built with -tags rocksdb") -} diff --git a/store/proof/commit_info.go b/store/proof/commit_info.go index ad2f21708e03..91299ddca2c0 100644 --- a/store/proof/commit_info.go +++ b/store/proof/commit_info.go @@ -75,7 +75,7 @@ func (ci *CommitInfo) GetStoreProof(storeKey []byte) ([]byte, *CommitmentOp, err leaves := make([][]byte, len(ci.StoreInfos)) for i, si := range ci.StoreInfos { var err error - leaves[i], err = LeafHash([]byte(si.Name), si.GetHash()) + leaves[i], err = LeafHash(si.Name, si.GetHash()) if err != nil { return nil, nil, err } @@ -85,7 +85,7 @@ func (ci *CommitInfo) GetStoreProof(storeKey []byte) ([]byte, *CommitmentOp, err } rootHash, inners := ProofFromByteSlices(leaves, index) - commitmentOp := ConvertCommitmentOp(inners, []byte(storeKey), ci.StoreInfos[index].GetHash()) + commitmentOp := ConvertCommitmentOp(inners, storeKey, ci.StoreInfos[index].GetHash()) return rootHash, &commitmentOp, nil } @@ -96,7 +96,7 @@ func (ci *CommitInfo) encodedSize() int { size += encoding.EncodeVarintSize(ci.Timestamp.UnixNano()) size += encoding.EncodeUvarintSize(uint64(len(ci.StoreInfos))) for _, storeInfo := range ci.StoreInfos { - size += encoding.EncodeBytesSize([]byte(storeInfo.Name)) + size += encoding.EncodeBytesSize(storeInfo.Name) size += encoding.EncodeBytesSize(storeInfo.CommitID.Hash) } return size @@ -124,7 +124,7 @@ func (ci *CommitInfo) Marshal() ([]byte, error) { return nil, err } for _, si := range ci.StoreInfos { - if err := encoding.EncodeBytes(&buf, []byte(si.Name)); err != nil { + if err := encoding.EncodeBytes(&buf, si.Name); err != nil { return nil, err } if err := encoding.EncodeBytes(&buf, si.CommitID.Hash); err != nil { diff --git a/x/params/types/common_test.go b/x/params/types/common_test.go index 09cd49401fca..9fd9b1a535af 100644 --- a/x/params/types/common_test.go +++ b/x/params/types/common_test.go @@ -78,18 +78,18 @@ func validateMaxRedelegationEntries(i interface{}) error { func (p *params) ParamSetPairs() types.ParamSetPairs { return types.ParamSetPairs{ - {keyUnbondingTime, &p.UnbondingTime, validateUnbondingTime}, - {keyMaxValidators, &p.MaxValidators, validateMaxValidators}, - {keyBondDenom, &p.BondDenom, validateBondDenom}, + types.ParamSetPair{Key: keyUnbondingTime, Value: &p.UnbondingTime, ValidatorFn: validateUnbondingTime}, + types.ParamSetPair{Key: keyMaxValidators, Value: &p.MaxValidators, ValidatorFn: validateMaxValidators}, + types.ParamSetPair{Key: keyBondDenom, Value: &p.BondDenom, ValidatorFn: validateBondDenom}, } } func (p *paramsV2) ParamSetPairs() types.ParamSetPairs { return types.ParamSetPairs{ - {keyUnbondingTime, &p.UnbondingTime, validateUnbondingTime}, - {keyMaxValidators, &p.MaxValidators, validateMaxValidators}, - {keyBondDenom, &p.BondDenom, validateBondDenom}, - {keyMaxRedelegationEntries, &p.MaxRedelegationEntries, validateMaxRedelegationEntries}, + types.ParamSetPair{Key: keyUnbondingTime, Value: &p.UnbondingTime, ValidatorFn: validateUnbondingTime}, + types.ParamSetPair{Key: keyMaxValidators, Value: &p.MaxValidators, ValidatorFn: validateMaxValidators}, + types.ParamSetPair{Key: keyBondDenom, Value: &p.BondDenom, ValidatorFn: validateBondDenom}, + types.ParamSetPair{Key: keyMaxRedelegationEntries, Value: &p.MaxRedelegationEntries, ValidatorFn: validateMaxRedelegationEntries}, } } From c46688729fd9609fd60037a84f3b80365f03feb6 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Mon, 25 Mar 2024 18:07:08 +0100 Subject: [PATCH 16/20] chore(api): clean-up protos (#19858) --- api/cosmos/lockup/lockup.pulsar.go | 752 ---- api/cosmos/lockup/query.pulsar.go | 2891 ------------- api/cosmos/lockup/tx.pulsar.go | 6162 ---------------------------- 3 files changed, 9805 deletions(-) delete mode 100644 api/cosmos/lockup/lockup.pulsar.go delete mode 100644 api/cosmos/lockup/query.pulsar.go delete mode 100644 api/cosmos/lockup/tx.pulsar.go diff --git a/api/cosmos/lockup/lockup.pulsar.go b/api/cosmos/lockup/lockup.pulsar.go deleted file mode 100644 index d4caff540c05..000000000000 --- a/api/cosmos/lockup/lockup.pulsar.go +++ /dev/null @@ -1,752 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package lockup - -import ( - _ "cosmossdk.io/api/amino" - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - durationpb "google.golang.org/protobuf/types/known/durationpb" - io "io" - reflect "reflect" - sync "sync" -) - -var _ protoreflect.List = (*_Period_2_list)(nil) - -type _Period_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_Period_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_Period_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_Period_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_Period_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_Period_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Period_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_Period_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_Period_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_Period protoreflect.MessageDescriptor - fd_Period_length protoreflect.FieldDescriptor - fd_Period_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_lockup_proto_init() - md_Period = File_cosmos_lockup_lockup_proto.Messages().ByName("Period") - fd_Period_length = md_Period.Fields().ByName("length") - fd_Period_amount = md_Period.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_Period)(nil) - -type fastReflection_Period Period - -func (x *Period) ProtoReflect() protoreflect.Message { - return (*fastReflection_Period)(x) -} - -func (x *Period) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_lockup_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_Period_messageType fastReflection_Period_messageType -var _ protoreflect.MessageType = fastReflection_Period_messageType{} - -type fastReflection_Period_messageType struct{} - -func (x fastReflection_Period_messageType) Zero() protoreflect.Message { - return (*fastReflection_Period)(nil) -} -func (x fastReflection_Period_messageType) New() protoreflect.Message { - return new(fastReflection_Period) -} -func (x fastReflection_Period_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_Period -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_Period) Descriptor() protoreflect.MessageDescriptor { - return md_Period -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_Period) Type() protoreflect.MessageType { - return _fastReflection_Period_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_Period) New() protoreflect.Message { - return new(fastReflection_Period) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_Period) Interface() protoreflect.ProtoMessage { - return (*Period)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_Period) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Length != nil { - value := protoreflect.ValueOfMessage(x.Length.ProtoReflect()) - if !f(fd_Period_length, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_Period_2_list{list: &x.Amount}) - if !f(fd_Period_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_Period) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.Period.length": - return x.Length != nil - case "cosmos.lockup.Period.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) - } - panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Period) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.Period.length": - x.Length = nil - case "cosmos.lockup.Period.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) - } - panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_Period) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.Period.length": - value := x.Length - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.lockup.Period.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_Period_2_list{}) - } - listValue := &_Period_2_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) - } - panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Period) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.Period.length": - x.Length = value.Message().Interface().(*durationpb.Duration) - case "cosmos.lockup.Period.amount": - lv := value.List() - clv := lv.(*_Period_2_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) - } - panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Period) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.Period.length": - if x.Length == nil { - x.Length = new(durationpb.Duration) - } - return protoreflect.ValueOfMessage(x.Length.ProtoReflect()) - case "cosmos.lockup.Period.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_Period_2_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) - } - panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_Period) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.Period.length": - m := new(durationpb.Duration) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.lockup.Period.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_Period_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.Period")) - } - panic(fmt.Errorf("message cosmos.lockup.Period does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_Period) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.Period", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_Period) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_Period) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_Period) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_Period) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*Period) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.Length != nil { - l = options.Size(x.Length) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*Period) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if x.Length != nil { - encoded, err := options.Marshal(x.Length) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*Period) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: Period: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Length", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Length == nil { - x.Length = &durationpb.Duration{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Length); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/lockup/lockup.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// Period defines a length of time and amount of coins that will be lock. -type Period struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // Period duration - Length *durationpb.Duration `protobuf:"bytes,1,opt,name=length,proto3" json:"length,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *Period) Reset() { - *x = Period{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_lockup_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *Period) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*Period) ProtoMessage() {} - -// Deprecated: Use Period.ProtoReflect.Descriptor instead. -func (*Period) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_lockup_proto_rawDescGZIP(), []int{0} -} - -func (x *Period) GetLength() *durationpb.Duration { - if x != nil { - return x.Length - } - return nil -} - -func (x *Period) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -var File_cosmos_lockup_lockup_proto protoreflect.FileDescriptor - -var file_cosmos_lockup_lockup_proto_rawDesc = []byte{ - 0x0a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, - 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, - 0x6e, 0x6f, 0x2f, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, - 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x64, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5, 0x01, 0x0a, 0x06, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x12, - 0x40, 0x0a, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x19, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x44, 0x75, 0x72, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, - 0x98, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x6c, 0x65, 0x6e, 0x67, 0x74, - 0x68, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, - 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, - 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x42, 0x95, 0x01, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, - 0x75, 0x70, 0x42, 0x0b, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, - 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, - 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, - 0x70, 0xa2, 0x02, 0x03, 0x43, 0x4c, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, - 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, - 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_lockup_lockup_proto_rawDescOnce sync.Once - file_cosmos_lockup_lockup_proto_rawDescData = file_cosmos_lockup_lockup_proto_rawDesc -) - -func file_cosmos_lockup_lockup_proto_rawDescGZIP() []byte { - file_cosmos_lockup_lockup_proto_rawDescOnce.Do(func() { - file_cosmos_lockup_lockup_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_lockup_lockup_proto_rawDescData) - }) - return file_cosmos_lockup_lockup_proto_rawDescData -} - -var file_cosmos_lockup_lockup_proto_msgTypes = make([]protoimpl.MessageInfo, 1) -var file_cosmos_lockup_lockup_proto_goTypes = []interface{}{ - (*Period)(nil), // 0: cosmos.lockup.Period - (*durationpb.Duration)(nil), // 1: google.protobuf.Duration - (*v1beta1.Coin)(nil), // 2: cosmos.base.v1beta1.Coin -} -var file_cosmos_lockup_lockup_proto_depIdxs = []int32{ - 1, // 0: cosmos.lockup.Period.length:type_name -> google.protobuf.Duration - 2, // 1: cosmos.lockup.Period.amount:type_name -> cosmos.base.v1beta1.Coin - 2, // [2:2] is the sub-list for method output_type - 2, // [2:2] is the sub-list for method input_type - 2, // [2:2] is the sub-list for extension type_name - 2, // [2:2] is the sub-list for extension extendee - 0, // [0:2] is the sub-list for field type_name -} - -func init() { file_cosmos_lockup_lockup_proto_init() } -func file_cosmos_lockup_lockup_proto_init() { - if File_cosmos_lockup_lockup_proto != nil { - return - } - if !protoimpl.UnsafeEnabled { - file_cosmos_lockup_lockup_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Period); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_lockup_lockup_proto_rawDesc, - NumEnums: 0, - NumMessages: 1, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_lockup_lockup_proto_goTypes, - DependencyIndexes: file_cosmos_lockup_lockup_proto_depIdxs, - MessageInfos: file_cosmos_lockup_lockup_proto_msgTypes, - }.Build() - File_cosmos_lockup_lockup_proto = out.File - file_cosmos_lockup_lockup_proto_rawDesc = nil - file_cosmos_lockup_lockup_proto_goTypes = nil - file_cosmos_lockup_lockup_proto_depIdxs = nil -} diff --git a/api/cosmos/lockup/query.pulsar.go b/api/cosmos/lockup/query.pulsar.go deleted file mode 100644 index 385d923ef222..000000000000 --- a/api/cosmos/lockup/query.pulsar.go +++ /dev/null @@ -1,2891 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package lockup - -import ( - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - fmt "fmt" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_QueryLockupAccountInfoRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_lockup_query_proto_init() - md_QueryLockupAccountInfoRequest = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockupAccountInfoRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryLockupAccountInfoRequest)(nil) - -type fastReflection_QueryLockupAccountInfoRequest QueryLockupAccountInfoRequest - -func (x *QueryLockupAccountInfoRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLockupAccountInfoRequest)(x) -} - -func (x *QueryLockupAccountInfoRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_query_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLockupAccountInfoRequest_messageType fastReflection_QueryLockupAccountInfoRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryLockupAccountInfoRequest_messageType{} - -type fastReflection_QueryLockupAccountInfoRequest_messageType struct{} - -func (x fastReflection_QueryLockupAccountInfoRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLockupAccountInfoRequest)(nil) -} -func (x fastReflection_QueryLockupAccountInfoRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLockupAccountInfoRequest) -} -func (x fastReflection_QueryLockupAccountInfoRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockupAccountInfoRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLockupAccountInfoRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockupAccountInfoRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLockupAccountInfoRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryLockupAccountInfoRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLockupAccountInfoRequest) New() protoreflect.Message { - return new(fastReflection_QueryLockupAccountInfoRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLockupAccountInfoRequest) Interface() protoreflect.ProtoMessage { - return (*QueryLockupAccountInfoRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLockupAccountInfoRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLockupAccountInfoRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLockupAccountInfoRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLockupAccountInfoRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLockupAccountInfoRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockupAccountInfoRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLockupAccountInfoRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLockupAccountInfoRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLockupAccountInfoRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLockupAccountInfoRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLockupAccountInfoRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLockupAccountInfoRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_1_list)(nil) - -type _QueryLockupAccountInfoResponse_1_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QueryLockupAccountInfoResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryLockupAccountInfoResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryLockupAccountInfoResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryLockupAccountInfoResponse_1_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryLockupAccountInfoResponse_1_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_1_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_2_list)(nil) - -type _QueryLockupAccountInfoResponse_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QueryLockupAccountInfoResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryLockupAccountInfoResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryLockupAccountInfoResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryLockupAccountInfoResponse_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryLockupAccountInfoResponse_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_2_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_3_list)(nil) - -type _QueryLockupAccountInfoResponse_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QueryLockupAccountInfoResponse_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryLockupAccountInfoResponse_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryLockupAccountInfoResponse_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryLockupAccountInfoResponse_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryLockupAccountInfoResponse_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_3_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_6_list)(nil) - -type _QueryLockupAccountInfoResponse_6_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QueryLockupAccountInfoResponse_6_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryLockupAccountInfoResponse_6_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_6_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryLockupAccountInfoResponse_6_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryLockupAccountInfoResponse_6_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_6_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryLockupAccountInfoResponse_6_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_6_list) IsValid() bool { - return x.list != nil -} - -var _ protoreflect.List = (*_QueryLockupAccountInfoResponse_7_list)(nil) - -type _QueryLockupAccountInfoResponse_7_list struct { - list *[]*v1beta1.Coin -} - -func (x *_QueryLockupAccountInfoResponse_7_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryLockupAccountInfoResponse_7_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_7_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_QueryLockupAccountInfoResponse_7_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryLockupAccountInfoResponse_7_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_7_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryLockupAccountInfoResponse_7_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockupAccountInfoResponse_7_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryLockupAccountInfoResponse protoreflect.MessageDescriptor - fd_QueryLockupAccountInfoResponse_original_locking protoreflect.FieldDescriptor - fd_QueryLockupAccountInfoResponse_delegated_free protoreflect.FieldDescriptor - fd_QueryLockupAccountInfoResponse_delegated_locking protoreflect.FieldDescriptor - fd_QueryLockupAccountInfoResponse_start_time protoreflect.FieldDescriptor - fd_QueryLockupAccountInfoResponse_end_time protoreflect.FieldDescriptor - fd_QueryLockupAccountInfoResponse_locked_coins protoreflect.FieldDescriptor - fd_QueryLockupAccountInfoResponse_unlocked_coins protoreflect.FieldDescriptor - fd_QueryLockupAccountInfoResponse_owner protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_query_proto_init() - md_QueryLockupAccountInfoResponse = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockupAccountInfoResponse") - fd_QueryLockupAccountInfoResponse_original_locking = md_QueryLockupAccountInfoResponse.Fields().ByName("original_locking") - fd_QueryLockupAccountInfoResponse_delegated_free = md_QueryLockupAccountInfoResponse.Fields().ByName("delegated_free") - fd_QueryLockupAccountInfoResponse_delegated_locking = md_QueryLockupAccountInfoResponse.Fields().ByName("delegated_locking") - fd_QueryLockupAccountInfoResponse_start_time = md_QueryLockupAccountInfoResponse.Fields().ByName("start_time") - fd_QueryLockupAccountInfoResponse_end_time = md_QueryLockupAccountInfoResponse.Fields().ByName("end_time") - fd_QueryLockupAccountInfoResponse_locked_coins = md_QueryLockupAccountInfoResponse.Fields().ByName("locked_coins") - fd_QueryLockupAccountInfoResponse_unlocked_coins = md_QueryLockupAccountInfoResponse.Fields().ByName("unlocked_coins") - fd_QueryLockupAccountInfoResponse_owner = md_QueryLockupAccountInfoResponse.Fields().ByName("owner") -} - -var _ protoreflect.Message = (*fastReflection_QueryLockupAccountInfoResponse)(nil) - -type fastReflection_QueryLockupAccountInfoResponse QueryLockupAccountInfoResponse - -func (x *QueryLockupAccountInfoResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLockupAccountInfoResponse)(x) -} - -func (x *QueryLockupAccountInfoResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_query_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLockupAccountInfoResponse_messageType fastReflection_QueryLockupAccountInfoResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryLockupAccountInfoResponse_messageType{} - -type fastReflection_QueryLockupAccountInfoResponse_messageType struct{} - -func (x fastReflection_QueryLockupAccountInfoResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLockupAccountInfoResponse)(nil) -} -func (x fastReflection_QueryLockupAccountInfoResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLockupAccountInfoResponse) -} -func (x fastReflection_QueryLockupAccountInfoResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockupAccountInfoResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLockupAccountInfoResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockupAccountInfoResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLockupAccountInfoResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryLockupAccountInfoResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLockupAccountInfoResponse) New() protoreflect.Message { - return new(fastReflection_QueryLockupAccountInfoResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLockupAccountInfoResponse) Interface() protoreflect.ProtoMessage { - return (*QueryLockupAccountInfoResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLockupAccountInfoResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.OriginalLocking) != 0 { - value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking}) - if !f(fd_QueryLockupAccountInfoResponse_original_locking, value) { - return - } - } - if len(x.DelegatedFree) != 0 { - value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree}) - if !f(fd_QueryLockupAccountInfoResponse_delegated_free, value) { - return - } - } - if len(x.DelegatedLocking) != 0 { - value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking}) - if !f(fd_QueryLockupAccountInfoResponse_delegated_locking, value) { - return - } - } - if x.StartTime != nil { - value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - if !f(fd_QueryLockupAccountInfoResponse_start_time, value) { - return - } - } - if x.EndTime != nil { - value := protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) - if !f(fd_QueryLockupAccountInfoResponse_end_time, value) { - return - } - } - if len(x.LockedCoins) != 0 { - value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins}) - if !f(fd_QueryLockupAccountInfoResponse_locked_coins, value) { - return - } - } - if len(x.UnlockedCoins) != 0 { - value := protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins}) - if !f(fd_QueryLockupAccountInfoResponse_unlocked_coins, value) { - return - } - } - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_QueryLockupAccountInfoResponse_owner, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLockupAccountInfoResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": - return len(x.OriginalLocking) != 0 - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": - return len(x.DelegatedFree) != 0 - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": - return len(x.DelegatedLocking) != 0 - case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": - return x.StartTime != nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": - return x.EndTime != nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": - return len(x.LockedCoins) != 0 - case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": - return len(x.UnlockedCoins) != 0 - case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": - return x.Owner != "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": - x.OriginalLocking = nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": - x.DelegatedFree = nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": - x.DelegatedLocking = nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": - x.StartTime = nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": - x.EndTime = nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": - x.LockedCoins = nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": - x.UnlockedCoins = nil - case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": - x.Owner = "" - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLockupAccountInfoResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": - if len(x.OriginalLocking) == 0 { - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{}) - } - listValue := &_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking} - return protoreflect.ValueOfList(listValue) - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": - if len(x.DelegatedFree) == 0 { - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{}) - } - listValue := &_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree} - return protoreflect.ValueOfList(listValue) - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": - if len(x.DelegatedLocking) == 0 { - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{}) - } - listValue := &_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking} - return protoreflect.ValueOfList(listValue) - case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": - value := x.StartTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": - value := x.EndTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": - if len(x.LockedCoins) == 0 { - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{}) - } - listValue := &_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins} - return protoreflect.ValueOfList(listValue) - case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": - if len(x.UnlockedCoins) == 0 { - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{}) - } - listValue := &_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins} - return protoreflect.ValueOfList(listValue) - case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": - lv := value.List() - clv := lv.(*_QueryLockupAccountInfoResponse_1_list) - x.OriginalLocking = *clv.list - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": - lv := value.List() - clv := lv.(*_QueryLockupAccountInfoResponse_2_list) - x.DelegatedFree = *clv.list - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": - lv := value.List() - clv := lv.(*_QueryLockupAccountInfoResponse_3_list) - x.DelegatedLocking = *clv.list - case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": - x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": - x.EndTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": - lv := value.List() - clv := lv.(*_QueryLockupAccountInfoResponse_6_list) - x.LockedCoins = *clv.list - case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": - lv := value.List() - clv := lv.(*_QueryLockupAccountInfoResponse_7_list) - x.UnlockedCoins = *clv.list - case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": - x.Owner = value.Interface().(string) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": - if x.OriginalLocking == nil { - x.OriginalLocking = []*v1beta1.Coin{} - } - value := &_QueryLockupAccountInfoResponse_1_list{list: &x.OriginalLocking} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": - if x.DelegatedFree == nil { - x.DelegatedFree = []*v1beta1.Coin{} - } - value := &_QueryLockupAccountInfoResponse_2_list{list: &x.DelegatedFree} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": - if x.DelegatedLocking == nil { - x.DelegatedLocking = []*v1beta1.Coin{} - } - value := &_QueryLockupAccountInfoResponse_3_list{list: &x.DelegatedLocking} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": - if x.StartTime == nil { - x.StartTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": - if x.EndTime == nil { - x.EndTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) - case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": - if x.LockedCoins == nil { - x.LockedCoins = []*v1beta1.Coin{} - } - value := &_QueryLockupAccountInfoResponse_6_list{list: &x.LockedCoins} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": - if x.UnlockedCoins == nil { - x.UnlockedCoins = []*v1beta1.Coin{} - } - value := &_QueryLockupAccountInfoResponse_7_list{list: &x.UnlockedCoins} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": - panic(fmt.Errorf("field owner of message cosmos.lockup.QueryLockupAccountInfoResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLockupAccountInfoResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.QueryLockupAccountInfoResponse.original_locking": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_1_list{list: &list}) - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_2_list{list: &list}) - case "cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_3_list{list: &list}) - case "cosmos.lockup.QueryLockupAccountInfoResponse.start_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.lockup.QueryLockupAccountInfoResponse.end_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_6_list{list: &list}) - case "cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_QueryLockupAccountInfoResponse_7_list{list: &list}) - case "cosmos.lockup.QueryLockupAccountInfoResponse.owner": - return protoreflect.ValueOfString("") - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockupAccountInfoResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockupAccountInfoResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLockupAccountInfoResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockupAccountInfoResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLockupAccountInfoResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockupAccountInfoResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLockupAccountInfoResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLockupAccountInfoResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLockupAccountInfoResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.OriginalLocking) > 0 { - for _, e := range x.OriginalLocking { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.DelegatedFree) > 0 { - for _, e := range x.DelegatedFree { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.DelegatedLocking) > 0 { - for _, e := range x.DelegatedLocking { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.StartTime != nil { - l = options.Size(x.StartTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.EndTime != nil { - l = options.Size(x.EndTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.LockedCoins) > 0 { - for _, e := range x.LockedCoins { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if len(x.UnlockedCoins) > 0 { - for _, e := range x.UnlockedCoins { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLockupAccountInfoResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0x42 - } - if len(x.UnlockedCoins) > 0 { - for iNdEx := len(x.UnlockedCoins) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.UnlockedCoins[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x3a - } - } - if len(x.LockedCoins) > 0 { - for iNdEx := len(x.LockedCoins) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LockedCoins[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x32 - } - } - if x.EndTime != nil { - encoded, err := options.Marshal(x.EndTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x2a - } - if x.StartTime != nil { - encoded, err := options.Marshal(x.StartTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x22 - } - if len(x.DelegatedLocking) > 0 { - for iNdEx := len(x.DelegatedLocking) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegatedLocking[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.DelegatedFree) > 0 { - for iNdEx := len(x.DelegatedFree) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.DelegatedFree[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.OriginalLocking) > 0 { - for iNdEx := len(x.OriginalLocking) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.OriginalLocking[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLockupAccountInfoResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockupAccountInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field OriginalLocking", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.OriginalLocking = append(x.OriginalLocking, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.OriginalLocking[len(x.OriginalLocking)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedFree", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegatedFree = append(x.DelegatedFree, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedFree[len(x.DelegatedFree)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field DelegatedLocking", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.DelegatedLocking = append(x.DelegatedLocking, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.DelegatedLocking[len(x.DelegatedLocking)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.StartTime == nil { - x.StartTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 5: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.EndTime == nil { - x.EndTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EndTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 6: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockedCoins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LockedCoins = append(x.LockedCoins, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockedCoins[len(x.LockedCoins)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 7: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field UnlockedCoins", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.UnlockedCoins = append(x.UnlockedCoins, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.UnlockedCoins[len(x.UnlockedCoins)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_QueryLockingPeriodsRequest protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_lockup_query_proto_init() - md_QueryLockingPeriodsRequest = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockingPeriodsRequest") -} - -var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsRequest)(nil) - -type fastReflection_QueryLockingPeriodsRequest QueryLockingPeriodsRequest - -func (x *QueryLockingPeriodsRequest) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsRequest)(x) -} - -func (x *QueryLockingPeriodsRequest) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_query_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLockingPeriodsRequest_messageType fastReflection_QueryLockingPeriodsRequest_messageType -var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsRequest_messageType{} - -type fastReflection_QueryLockingPeriodsRequest_messageType struct{} - -func (x fastReflection_QueryLockingPeriodsRequest_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsRequest)(nil) -} -func (x fastReflection_QueryLockingPeriodsRequest_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsRequest) -} -func (x fastReflection_QueryLockingPeriodsRequest_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsRequest -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLockingPeriodsRequest) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsRequest -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLockingPeriodsRequest) Type() protoreflect.MessageType { - return _fastReflection_QueryLockingPeriodsRequest_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLockingPeriodsRequest) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsRequest) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLockingPeriodsRequest) Interface() protoreflect.ProtoMessage { - return (*QueryLockingPeriodsRequest)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLockingPeriodsRequest) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLockingPeriodsRequest) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLockingPeriodsRequest) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLockingPeriodsRequest) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsRequest")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsRequest does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLockingPeriodsRequest) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockingPeriodsRequest", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLockingPeriodsRequest) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsRequest) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLockingPeriodsRequest) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLockingPeriodsRequest) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLockingPeriodsRequest) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsRequest) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsRequest) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_QueryLockingPeriodsResponse_1_list)(nil) - -type _QueryLockingPeriodsResponse_1_list struct { - list *[]*Period -} - -func (x *_QueryLockingPeriodsResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_QueryLockingPeriodsResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_QueryLockingPeriodsResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - (*x.list)[i] = concreteValue -} - -func (x *_QueryLockingPeriodsResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - *x.list = append(*x.list, concreteValue) -} - -func (x *_QueryLockingPeriodsResponse_1_list) AppendMutable() protoreflect.Value { - v := new(Period) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockingPeriodsResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_QueryLockingPeriodsResponse_1_list) NewElement() protoreflect.Value { - v := new(Period) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_QueryLockingPeriodsResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_QueryLockingPeriodsResponse protoreflect.MessageDescriptor - fd_QueryLockingPeriodsResponse_locking_periods protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_query_proto_init() - md_QueryLockingPeriodsResponse = File_cosmos_lockup_query_proto.Messages().ByName("QueryLockingPeriodsResponse") - fd_QueryLockingPeriodsResponse_locking_periods = md_QueryLockingPeriodsResponse.Fields().ByName("locking_periods") -} - -var _ protoreflect.Message = (*fastReflection_QueryLockingPeriodsResponse)(nil) - -type fastReflection_QueryLockingPeriodsResponse QueryLockingPeriodsResponse - -func (x *QueryLockingPeriodsResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsResponse)(x) -} - -func (x *QueryLockingPeriodsResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_query_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_QueryLockingPeriodsResponse_messageType fastReflection_QueryLockingPeriodsResponse_messageType -var _ protoreflect.MessageType = fastReflection_QueryLockingPeriodsResponse_messageType{} - -type fastReflection_QueryLockingPeriodsResponse_messageType struct{} - -func (x fastReflection_QueryLockingPeriodsResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_QueryLockingPeriodsResponse)(nil) -} -func (x fastReflection_QueryLockingPeriodsResponse_messageType) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsResponse) -} -func (x fastReflection_QueryLockingPeriodsResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_QueryLockingPeriodsResponse) Descriptor() protoreflect.MessageDescriptor { - return md_QueryLockingPeriodsResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_QueryLockingPeriodsResponse) Type() protoreflect.MessageType { - return _fastReflection_QueryLockingPeriodsResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_QueryLockingPeriodsResponse) New() protoreflect.Message { - return new(fastReflection_QueryLockingPeriodsResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_QueryLockingPeriodsResponse) Interface() protoreflect.ProtoMessage { - return (*QueryLockingPeriodsResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_QueryLockingPeriodsResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.LockingPeriods) != 0 { - value := protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods}) - if !f(fd_QueryLockingPeriodsResponse_locking_periods, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_QueryLockingPeriodsResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": - return len(x.LockingPeriods) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": - x.LockingPeriods = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_QueryLockingPeriodsResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": - if len(x.LockingPeriods) == 0 { - return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{}) - } - listValue := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": - lv := value.List() - clv := lv.(*_QueryLockingPeriodsResponse_1_list) - x.LockingPeriods = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": - if x.LockingPeriods == nil { - x.LockingPeriods = []*Period{} - } - value := &_QueryLockingPeriodsResponse_1_list{list: &x.LockingPeriods} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_QueryLockingPeriodsResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.QueryLockingPeriodsResponse.locking_periods": - list := []*Period{} - return protoreflect.ValueOfList(&_QueryLockingPeriodsResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.QueryLockingPeriodsResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.QueryLockingPeriodsResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_QueryLockingPeriodsResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.QueryLockingPeriodsResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_QueryLockingPeriodsResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_QueryLockingPeriodsResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_QueryLockingPeriodsResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_QueryLockingPeriodsResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*QueryLockingPeriodsResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.LockingPeriods) > 0 { - for _, e := range x.LockingPeriods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.LockingPeriods) > 0 { - for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*QueryLockingPeriodsResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: QueryLockingPeriodsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LockingPeriods = append(x.LockingPeriods, &Period{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/lockup/query.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// QueryLockupAccountInfoRequest get lockup account info -type QueryLockupAccountInfoRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryLockupAccountInfoRequest) Reset() { - *x = QueryLockupAccountInfoRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_query_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLockupAccountInfoRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLockupAccountInfoRequest) ProtoMessage() {} - -// Deprecated: Use QueryLockupAccountInfoRequest.ProtoReflect.Descriptor instead. -func (*QueryLockupAccountInfoRequest) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{0} -} - -// QueryLockupAccountInfoResponse return lockup account info -type QueryLockupAccountInfoResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // original_locking defines the value of the account original locking coins. - OriginalLocking []*v1beta1.Coin `protobuf:"bytes,1,rep,name=original_locking,json=originalLocking,proto3" json:"original_locking,omitempty"` - // delegated_free defines the value of the account free delegated amount. - DelegatedFree []*v1beta1.Coin `protobuf:"bytes,2,rep,name=delegated_free,json=delegatedFree,proto3" json:"delegated_free,omitempty"` - // delegated_locking defines the value of the account locking delegated amount. - DelegatedLocking []*v1beta1.Coin `protobuf:"bytes,3,rep,name=delegated_locking,json=delegatedLocking,proto3" json:"delegated_locking,omitempty"` - // end_time defines the value of the account lockup start time. - StartTime *timestamppb.Timestamp `protobuf:"bytes,4,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - // end_time defines the value of the account lockup end time. - EndTime *timestamppb.Timestamp `protobuf:"bytes,5,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` - // locked_coins defines the value of the account locking coins. - LockedCoins []*v1beta1.Coin `protobuf:"bytes,6,rep,name=locked_coins,json=lockedCoins,proto3" json:"locked_coins,omitempty"` - // unlocked_coins defines the value of the account released coins from lockup. - UnlockedCoins []*v1beta1.Coin `protobuf:"bytes,7,rep,name=unlocked_coins,json=unlockedCoins,proto3" json:"unlocked_coins,omitempty"` - // owner defines the value of the owner of the lockup account. - Owner string `protobuf:"bytes,8,opt,name=owner,proto3" json:"owner,omitempty"` -} - -func (x *QueryLockupAccountInfoResponse) Reset() { - *x = QueryLockupAccountInfoResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_query_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLockupAccountInfoResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLockupAccountInfoResponse) ProtoMessage() {} - -// Deprecated: Use QueryLockupAccountInfoResponse.ProtoReflect.Descriptor instead. -func (*QueryLockupAccountInfoResponse) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{1} -} - -func (x *QueryLockupAccountInfoResponse) GetOriginalLocking() []*v1beta1.Coin { - if x != nil { - return x.OriginalLocking - } - return nil -} - -func (x *QueryLockupAccountInfoResponse) GetDelegatedFree() []*v1beta1.Coin { - if x != nil { - return x.DelegatedFree - } - return nil -} - -func (x *QueryLockupAccountInfoResponse) GetDelegatedLocking() []*v1beta1.Coin { - if x != nil { - return x.DelegatedLocking - } - return nil -} - -func (x *QueryLockupAccountInfoResponse) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *QueryLockupAccountInfoResponse) GetEndTime() *timestamppb.Timestamp { - if x != nil { - return x.EndTime - } - return nil -} - -func (x *QueryLockupAccountInfoResponse) GetLockedCoins() []*v1beta1.Coin { - if x != nil { - return x.LockedCoins - } - return nil -} - -func (x *QueryLockupAccountInfoResponse) GetUnlockedCoins() []*v1beta1.Coin { - if x != nil { - return x.UnlockedCoins - } - return nil -} - -func (x *QueryLockupAccountInfoResponse) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -// QueryLockingPeriodsRequest is used to query the periodic lockup account locking periods. -type QueryLockingPeriodsRequest struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *QueryLockingPeriodsRequest) Reset() { - *x = QueryLockingPeriodsRequest{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_query_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLockingPeriodsRequest) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLockingPeriodsRequest) ProtoMessage() {} - -// Deprecated: Use QueryLockingPeriodsRequest.ProtoReflect.Descriptor instead. -func (*QueryLockingPeriodsRequest) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{2} -} - -// QueryLockingPeriodsResponse returns the periodic lockup account locking periods. -type QueryLockingPeriodsResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // lockup_periods defines the value of the periodic lockup account locking periods. - LockingPeriods []*Period `protobuf:"bytes,1,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods,omitempty"` -} - -func (x *QueryLockingPeriodsResponse) Reset() { - *x = QueryLockingPeriodsResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_query_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *QueryLockingPeriodsResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*QueryLockingPeriodsResponse) ProtoMessage() {} - -// Deprecated: Use QueryLockingPeriodsResponse.ProtoReflect.Descriptor instead. -func (*QueryLockingPeriodsResponse) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_query_proto_rawDescGZIP(), []int{3} -} - -func (x *QueryLockingPeriodsResponse) GetLockingPeriods() []*Period { - if x != nil { - return x.LockingPeriods - } - return nil -} - -var File_cosmos_lockup_query_proto protoreflect.FileDescriptor - -var file_cosmos_lockup_query_proto_rawDesc = []byte{ - 0x0a, 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x62, - 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, 0x63, 0x6f, 0x69, 0x6e, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x1f, 0x0a, - 0x1d, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, - 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0xfe, - 0x05, 0x0a, 0x1e, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x12, 0x76, 0x0a, 0x10, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, 0x61, 0x6c, 0x5f, 0x6c, 0x6f, - 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0f, 0x6f, 0x72, 0x69, 0x67, 0x69, 0x6e, - 0x61, 0x6c, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x72, 0x0a, 0x0e, 0x64, 0x65, 0x6c, - 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x66, 0x72, 0x65, 0x65, 0x18, 0x02, 0x20, 0x03, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, - 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, - 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, - 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x46, 0x72, 0x65, 0x65, 0x12, 0x78, 0x0a, - 0x11, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x6c, 0x6f, 0x63, 0x6b, 0x69, - 0x6e, 0x67, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, - 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, - 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x10, 0x64, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x64, - 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x12, 0x3f, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, - 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, - 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x09, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x3b, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x04, 0x90, 0xdf, 0x1f, 0x01, 0x52, 0x07, 0x65, 0x6e, - 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x6e, 0x0a, 0x0c, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, 0x5f, - 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, - 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, - 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, - 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0b, 0x6c, 0x6f, 0x63, 0x6b, 0x65, 0x64, - 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x72, 0x0a, 0x0e, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x65, - 0x64, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, - 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x30, 0xc8, 0xde, 0x1f, 0x00, 0xaa, 0xdf, - 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x74, - 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x52, 0x0d, 0x75, 0x6e, 0x6c, 0x6f, - 0x63, 0x6b, 0x65, 0x64, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, - 0x65, 0x72, 0x18, 0x08, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x22, - 0x1c, 0x0a, 0x1a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x22, 0x5d, 0x0a, - 0x1b, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, - 0x69, 0x6f, 0x64, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3e, 0x0a, 0x0f, - 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, - 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x52, 0x0e, 0x6c, 0x6f, - 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x42, 0x94, 0x01, 0x0a, - 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, - 0x75, 0x70, 0x42, 0x0a, 0x51, 0x75, 0x65, 0x72, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, - 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, 0x69, 0x6f, 0x2f, 0x61, - 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, - 0xa2, 0x02, 0x03, 0x43, 0x4c, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5c, - 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, - 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, 0x3a, 0x4c, 0x6f, 0x63, - 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_lockup_query_proto_rawDescOnce sync.Once - file_cosmos_lockup_query_proto_rawDescData = file_cosmos_lockup_query_proto_rawDesc -) - -func file_cosmos_lockup_query_proto_rawDescGZIP() []byte { - file_cosmos_lockup_query_proto_rawDescOnce.Do(func() { - file_cosmos_lockup_query_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_lockup_query_proto_rawDescData) - }) - return file_cosmos_lockup_query_proto_rawDescData -} - -var file_cosmos_lockup_query_proto_msgTypes = make([]protoimpl.MessageInfo, 4) -var file_cosmos_lockup_query_proto_goTypes = []interface{}{ - (*QueryLockupAccountInfoRequest)(nil), // 0: cosmos.lockup.QueryLockupAccountInfoRequest - (*QueryLockupAccountInfoResponse)(nil), // 1: cosmos.lockup.QueryLockupAccountInfoResponse - (*QueryLockingPeriodsRequest)(nil), // 2: cosmos.lockup.QueryLockingPeriodsRequest - (*QueryLockingPeriodsResponse)(nil), // 3: cosmos.lockup.QueryLockingPeriodsResponse - (*v1beta1.Coin)(nil), // 4: cosmos.base.v1beta1.Coin - (*timestamppb.Timestamp)(nil), // 5: google.protobuf.Timestamp - (*Period)(nil), // 6: cosmos.lockup.Period -} -var file_cosmos_lockup_query_proto_depIdxs = []int32{ - 4, // 0: cosmos.lockup.QueryLockupAccountInfoResponse.original_locking:type_name -> cosmos.base.v1beta1.Coin - 4, // 1: cosmos.lockup.QueryLockupAccountInfoResponse.delegated_free:type_name -> cosmos.base.v1beta1.Coin - 4, // 2: cosmos.lockup.QueryLockupAccountInfoResponse.delegated_locking:type_name -> cosmos.base.v1beta1.Coin - 5, // 3: cosmos.lockup.QueryLockupAccountInfoResponse.start_time:type_name -> google.protobuf.Timestamp - 5, // 4: cosmos.lockup.QueryLockupAccountInfoResponse.end_time:type_name -> google.protobuf.Timestamp - 4, // 5: cosmos.lockup.QueryLockupAccountInfoResponse.locked_coins:type_name -> cosmos.base.v1beta1.Coin - 4, // 6: cosmos.lockup.QueryLockupAccountInfoResponse.unlocked_coins:type_name -> cosmos.base.v1beta1.Coin - 6, // 7: cosmos.lockup.QueryLockingPeriodsResponse.locking_periods:type_name -> cosmos.lockup.Period - 8, // [8:8] is the sub-list for method output_type - 8, // [8:8] is the sub-list for method input_type - 8, // [8:8] is the sub-list for extension type_name - 8, // [8:8] is the sub-list for extension extendee - 0, // [0:8] is the sub-list for field type_name -} - -func init() { file_cosmos_lockup_query_proto_init() } -func file_cosmos_lockup_query_proto_init() { - if File_cosmos_lockup_query_proto != nil { - return - } - file_cosmos_lockup_lockup_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_lockup_query_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLockupAccountInfoRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_query_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLockupAccountInfoResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_query_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLockingPeriodsRequest); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_query_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*QueryLockingPeriodsResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_lockup_query_proto_rawDesc, - NumEnums: 0, - NumMessages: 4, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_lockup_query_proto_goTypes, - DependencyIndexes: file_cosmos_lockup_query_proto_depIdxs, - MessageInfos: file_cosmos_lockup_query_proto_msgTypes, - }.Build() - File_cosmos_lockup_query_proto = out.File - file_cosmos_lockup_query_proto_rawDesc = nil - file_cosmos_lockup_query_proto_goTypes = nil - file_cosmos_lockup_query_proto_depIdxs = nil -} diff --git a/api/cosmos/lockup/tx.pulsar.go b/api/cosmos/lockup/tx.pulsar.go deleted file mode 100644 index 9633724feefd..000000000000 --- a/api/cosmos/lockup/tx.pulsar.go +++ /dev/null @@ -1,6162 +0,0 @@ -// Code generated by protoc-gen-go-pulsar. DO NOT EDIT. -package lockup - -import ( - _ "cosmossdk.io/api/amino" - v1beta1 "cosmossdk.io/api/cosmos/base/v1beta1" - _ "cosmossdk.io/api/cosmos/msg/v1" - fmt "fmt" - _ "github.com/cosmos/cosmos-proto" - runtime "github.com/cosmos/cosmos-proto/runtime" - _ "github.com/cosmos/gogoproto/gogoproto" - protoreflect "google.golang.org/protobuf/reflect/protoreflect" - protoiface "google.golang.org/protobuf/runtime/protoiface" - protoimpl "google.golang.org/protobuf/runtime/protoimpl" - anypb "google.golang.org/protobuf/types/known/anypb" - timestamppb "google.golang.org/protobuf/types/known/timestamppb" - io "io" - reflect "reflect" - sync "sync" -) - -var ( - md_MsgInitLockupAccount protoreflect.MessageDescriptor - fd_MsgInitLockupAccount_owner protoreflect.FieldDescriptor - fd_MsgInitLockupAccount_end_time protoreflect.FieldDescriptor - fd_MsgInitLockupAccount_start_time protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgInitLockupAccount = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitLockupAccount") - fd_MsgInitLockupAccount_owner = md_MsgInitLockupAccount.Fields().ByName("owner") - fd_MsgInitLockupAccount_end_time = md_MsgInitLockupAccount.Fields().ByName("end_time") - fd_MsgInitLockupAccount_start_time = md_MsgInitLockupAccount.Fields().ByName("start_time") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitLockupAccount)(nil) - -type fastReflection_MsgInitLockupAccount MsgInitLockupAccount - -func (x *MsgInitLockupAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitLockupAccount)(x) -} - -func (x *MsgInitLockupAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[0] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgInitLockupAccount_messageType fastReflection_MsgInitLockupAccount_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitLockupAccount_messageType{} - -type fastReflection_MsgInitLockupAccount_messageType struct{} - -func (x fastReflection_MsgInitLockupAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitLockupAccount)(nil) -} -func (x fastReflection_MsgInitLockupAccount_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitLockupAccount) -} -func (x fastReflection_MsgInitLockupAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitLockupAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitLockupAccount) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitLockupAccount -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitLockupAccount) Type() protoreflect.MessageType { - return _fastReflection_MsgInitLockupAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitLockupAccount) New() protoreflect.Message { - return new(fastReflection_MsgInitLockupAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitLockupAccount) Interface() protoreflect.ProtoMessage { - return (*MsgInitLockupAccount)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgInitLockupAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_MsgInitLockupAccount_owner, value) { - return - } - } - if x.EndTime != nil { - value := protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) - if !f(fd_MsgInitLockupAccount_end_time, value) { - return - } - } - if x.StartTime != nil { - value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - if !f(fd_MsgInitLockupAccount_start_time, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitLockupAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgInitLockupAccount.owner": - return x.Owner != "" - case "cosmos.lockup.MsgInitLockupAccount.end_time": - return x.EndTime != nil - case "cosmos.lockup.MsgInitLockupAccount.start_time": - return x.StartTime != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgInitLockupAccount.owner": - x.Owner = "" - case "cosmos.lockup.MsgInitLockupAccount.end_time": - x.EndTime = nil - case "cosmos.lockup.MsgInitLockupAccount.start_time": - x.StartTime = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitLockupAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgInitLockupAccount.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgInitLockupAccount.end_time": - value := x.EndTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.lockup.MsgInitLockupAccount.start_time": - value := x.StartTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgInitLockupAccount.owner": - x.Owner = value.Interface().(string) - case "cosmos.lockup.MsgInitLockupAccount.end_time": - x.EndTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.lockup.MsgInitLockupAccount.start_time": - x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgInitLockupAccount.end_time": - if x.EndTime == nil { - x.EndTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.EndTime.ProtoReflect()) - case "cosmos.lockup.MsgInitLockupAccount.start_time": - if x.StartTime == nil { - x.StartTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - case "cosmos.lockup.MsgInitLockupAccount.owner": - panic(fmt.Errorf("field owner of message cosmos.lockup.MsgInitLockupAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitLockupAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgInitLockupAccount.owner": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgInitLockupAccount.end_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.lockup.MsgInitLockupAccount.start_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccount does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitLockupAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitLockupAccount", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitLockupAccount) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccount) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitLockupAccount) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitLockupAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitLockupAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.EndTime != nil { - l = options.Size(x.EndTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartTime != nil { - l = options.Size(x.StartTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitLockupAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.StartTime != nil { - encoded, err := options.Marshal(x.StartTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if x.EndTime != nil { - encoded, err := options.Marshal(x.EndTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitLockupAccount) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field EndTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.EndTime == nil { - x.EndTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.EndTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.StartTime == nil { - x.StartTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgInitLockupAccountResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgInitLockupAccountResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitLockupAccountResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitLockupAccountResponse)(nil) - -type fastReflection_MsgInitLockupAccountResponse MsgInitLockupAccountResponse - -func (x *MsgInitLockupAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitLockupAccountResponse)(x) -} - -func (x *MsgInitLockupAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[1] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgInitLockupAccountResponse_messageType fastReflection_MsgInitLockupAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitLockupAccountResponse_messageType{} - -type fastReflection_MsgInitLockupAccountResponse_messageType struct{} - -func (x fastReflection_MsgInitLockupAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitLockupAccountResponse)(nil) -} -func (x fastReflection_MsgInitLockupAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitLockupAccountResponse) -} -func (x fastReflection_MsgInitLockupAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitLockupAccountResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitLockupAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitLockupAccountResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitLockupAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgInitLockupAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitLockupAccountResponse) New() protoreflect.Message { - return new(fastReflection_MsgInitLockupAccountResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitLockupAccountResponse) Interface() protoreflect.ProtoMessage { - return (*MsgInitLockupAccountResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgInitLockupAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitLockupAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccountResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitLockupAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitLockupAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitLockupAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitLockupAccountResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitLockupAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitLockupAccountResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitLockupAccountResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitLockupAccountResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitLockupAccountResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitLockupAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitLockupAccountResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitLockupAccountResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitLockupAccountResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitLockupAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgInitPeriodicLockingAccount_3_list)(nil) - -type _MsgInitPeriodicLockingAccount_3_list struct { - list *[]*Period -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - (*x.list)[i] = concreteValue -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*Period) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) AppendMutable() protoreflect.Value { - v := new(Period) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) NewElement() protoreflect.Value { - v := new(Period) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgInitPeriodicLockingAccount_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgInitPeriodicLockingAccount protoreflect.MessageDescriptor - fd_MsgInitPeriodicLockingAccount_owner protoreflect.FieldDescriptor - fd_MsgInitPeriodicLockingAccount_start_time protoreflect.FieldDescriptor - fd_MsgInitPeriodicLockingAccount_locking_periods protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgInitPeriodicLockingAccount = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitPeriodicLockingAccount") - fd_MsgInitPeriodicLockingAccount_owner = md_MsgInitPeriodicLockingAccount.Fields().ByName("owner") - fd_MsgInitPeriodicLockingAccount_start_time = md_MsgInitPeriodicLockingAccount.Fields().ByName("start_time") - fd_MsgInitPeriodicLockingAccount_locking_periods = md_MsgInitPeriodicLockingAccount.Fields().ByName("locking_periods") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitPeriodicLockingAccount)(nil) - -type fastReflection_MsgInitPeriodicLockingAccount MsgInitPeriodicLockingAccount - -func (x *MsgInitPeriodicLockingAccount) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitPeriodicLockingAccount)(x) -} - -func (x *MsgInitPeriodicLockingAccount) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[2] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgInitPeriodicLockingAccount_messageType fastReflection_MsgInitPeriodicLockingAccount_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitPeriodicLockingAccount_messageType{} - -type fastReflection_MsgInitPeriodicLockingAccount_messageType struct{} - -func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitPeriodicLockingAccount)(nil) -} -func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitPeriodicLockingAccount) -} -func (x fastReflection_MsgInitPeriodicLockingAccount_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitPeriodicLockingAccount -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitPeriodicLockingAccount -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Type() protoreflect.MessageType { - return _fastReflection_MsgInitPeriodicLockingAccount_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitPeriodicLockingAccount) New() protoreflect.Message { - return new(fastReflection_MsgInitPeriodicLockingAccount) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Interface() protoreflect.ProtoMessage { - return (*MsgInitPeriodicLockingAccount)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Owner != "" { - value := protoreflect.ValueOfString(x.Owner) - if !f(fd_MsgInitPeriodicLockingAccount_owner, value) { - return - } - } - if x.StartTime != nil { - value := protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - if !f(fd_MsgInitPeriodicLockingAccount_start_time, value) { - return - } - } - if len(x.LockingPeriods) != 0 { - value := protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods}) - if !f(fd_MsgInitPeriodicLockingAccount_locking_periods, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": - return x.Owner != "" - case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": - return x.StartTime != nil - case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": - return len(x.LockingPeriods) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": - x.Owner = "" - case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": - x.StartTime = nil - case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": - x.LockingPeriods = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": - value := x.Owner - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": - value := x.StartTime - return protoreflect.ValueOfMessage(value.ProtoReflect()) - case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": - if len(x.LockingPeriods) == 0 { - return protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{}) - } - listValue := &_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": - x.Owner = value.Interface().(string) - case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": - x.StartTime = value.Message().Interface().(*timestamppb.Timestamp) - case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": - lv := value.List() - clv := lv.(*_MsgInitPeriodicLockingAccount_3_list) - x.LockingPeriods = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccount) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": - if x.StartTime == nil { - x.StartTime = new(timestamppb.Timestamp) - } - return protoreflect.ValueOfMessage(x.StartTime.ProtoReflect()) - case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": - if x.LockingPeriods == nil { - x.LockingPeriods = []*Period{} - } - value := &_MsgInitPeriodicLockingAccount_3_list{list: &x.LockingPeriods} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": - panic(fmt.Errorf("field owner of message cosmos.lockup.MsgInitPeriodicLockingAccount is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitPeriodicLockingAccount) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgInitPeriodicLockingAccount.owner": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgInitPeriodicLockingAccount.start_time": - m := new(timestamppb.Timestamp) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - case "cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods": - list := []*Period{} - return protoreflect.ValueOfList(&_MsgInitPeriodicLockingAccount_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccount")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccount does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitPeriodicLockingAccount) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitPeriodicLockingAccount", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitPeriodicLockingAccount) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccount) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitPeriodicLockingAccount) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitPeriodicLockingAccount) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Owner) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.StartTime != nil { - l = options.Size(x.StartTime) - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.LockingPeriods) > 0 { - for _, e := range x.LockingPeriods { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.LockingPeriods) > 0 { - for iNdEx := len(x.LockingPeriods) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.LockingPeriods[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if x.StartTime != nil { - encoded, err := options.Marshal(x.StartTime) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - if len(x.Owner) > 0 { - i -= len(x.Owner) - copy(dAtA[i:], x.Owner) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Owner))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitPeriodicLockingAccount) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccount: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccount: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Owner", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Owner = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field StartTime", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.StartTime == nil { - x.StartTime = ×tamppb.Timestamp{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.StartTime); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field LockingPeriods", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.LockingPeriods = append(x.LockingPeriods, &Period{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.LockingPeriods[len(x.LockingPeriods)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgInitPeriodicLockingAccountResponse protoreflect.MessageDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgInitPeriodicLockingAccountResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgInitPeriodicLockingAccountResponse") -} - -var _ protoreflect.Message = (*fastReflection_MsgInitPeriodicLockingAccountResponse)(nil) - -type fastReflection_MsgInitPeriodicLockingAccountResponse MsgInitPeriodicLockingAccountResponse - -func (x *MsgInitPeriodicLockingAccountResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgInitPeriodicLockingAccountResponse)(x) -} - -func (x *MsgInitPeriodicLockingAccountResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[3] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgInitPeriodicLockingAccountResponse_messageType fastReflection_MsgInitPeriodicLockingAccountResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgInitPeriodicLockingAccountResponse_messageType{} - -type fastReflection_MsgInitPeriodicLockingAccountResponse_messageType struct{} - -func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgInitPeriodicLockingAccountResponse)(nil) -} -func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgInitPeriodicLockingAccountResponse) -} -func (x fastReflection_MsgInitPeriodicLockingAccountResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitPeriodicLockingAccountResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgInitPeriodicLockingAccountResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgInitPeriodicLockingAccountResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) New() protoreflect.Message { - return new(fastReflection_MsgInitPeriodicLockingAccountResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Interface() protoreflect.ProtoMessage { - return (*MsgInitPeriodicLockingAccountResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgInitPeriodicLockingAccountResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgInitPeriodicLockingAccountResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgInitPeriodicLockingAccountResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgInitPeriodicLockingAccountResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgInitPeriodicLockingAccountResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgInitPeriodicLockingAccountResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgDelegate protoreflect.MessageDescriptor - fd_MsgDelegate_sender protoreflect.FieldDescriptor - fd_MsgDelegate_validator_address protoreflect.FieldDescriptor - fd_MsgDelegate_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgDelegate = File_cosmos_lockup_tx_proto.Messages().ByName("MsgDelegate") - fd_MsgDelegate_sender = md_MsgDelegate.Fields().ByName("sender") - fd_MsgDelegate_validator_address = md_MsgDelegate.Fields().ByName("validator_address") - fd_MsgDelegate_amount = md_MsgDelegate.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgDelegate)(nil) - -type fastReflection_MsgDelegate MsgDelegate - -func (x *MsgDelegate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgDelegate)(x) -} - -func (x *MsgDelegate) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[4] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgDelegate_messageType fastReflection_MsgDelegate_messageType -var _ protoreflect.MessageType = fastReflection_MsgDelegate_messageType{} - -type fastReflection_MsgDelegate_messageType struct{} - -func (x fastReflection_MsgDelegate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgDelegate)(nil) -} -func (x fastReflection_MsgDelegate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgDelegate) -} -func (x fastReflection_MsgDelegate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDelegate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgDelegate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgDelegate -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgDelegate) Type() protoreflect.MessageType { - return _fastReflection_MsgDelegate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgDelegate) New() protoreflect.Message { - return new(fastReflection_MsgDelegate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgDelegate) Interface() protoreflect.ProtoMessage { - return (*MsgDelegate)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgDelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgDelegate_sender, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgDelegate_validator_address, value) { - return - } - } - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_MsgDelegate_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgDelegate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgDelegate.sender": - return x.Sender != "" - case "cosmos.lockup.MsgDelegate.validator_address": - return x.ValidatorAddress != "" - case "cosmos.lockup.MsgDelegate.amount": - return x.Amount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDelegate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgDelegate.sender": - x.Sender = "" - case "cosmos.lockup.MsgDelegate.validator_address": - x.ValidatorAddress = "" - case "cosmos.lockup.MsgDelegate.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgDelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgDelegate.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgDelegate.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgDelegate.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgDelegate.sender": - x.Sender = value.Interface().(string) - case "cosmos.lockup.MsgDelegate.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.lockup.MsgDelegate.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgDelegate.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - case "cosmos.lockup.MsgDelegate.sender": - panic(fmt.Errorf("field sender of message cosmos.lockup.MsgDelegate is not mutable")) - case "cosmos.lockup.MsgDelegate.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.lockup.MsgDelegate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgDelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgDelegate.sender": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgDelegate.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgDelegate.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgDelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgDelegate does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgDelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgDelegate", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgDelegate) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgDelegate) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgDelegate) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgDelegate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgDelegate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Amount != nil { - l = options.Size(x.Amount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgDelegate) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Amount != nil { - encoded, err := options.Marshal(x.Amount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgDelegate) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgDelegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Amount == nil { - x.Amount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var ( - md_MsgUndelegate protoreflect.MessageDescriptor - fd_MsgUndelegate_sender protoreflect.FieldDescriptor - fd_MsgUndelegate_validator_address protoreflect.FieldDescriptor - fd_MsgUndelegate_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgUndelegate = File_cosmos_lockup_tx_proto.Messages().ByName("MsgUndelegate") - fd_MsgUndelegate_sender = md_MsgUndelegate.Fields().ByName("sender") - fd_MsgUndelegate_validator_address = md_MsgUndelegate.Fields().ByName("validator_address") - fd_MsgUndelegate_amount = md_MsgUndelegate.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgUndelegate)(nil) - -type fastReflection_MsgUndelegate MsgUndelegate - -func (x *MsgUndelegate) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgUndelegate)(x) -} - -func (x *MsgUndelegate) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[5] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgUndelegate_messageType fastReflection_MsgUndelegate_messageType -var _ protoreflect.MessageType = fastReflection_MsgUndelegate_messageType{} - -type fastReflection_MsgUndelegate_messageType struct{} - -func (x fastReflection_MsgUndelegate_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgUndelegate)(nil) -} -func (x fastReflection_MsgUndelegate_messageType) New() protoreflect.Message { - return new(fastReflection_MsgUndelegate) -} -func (x fastReflection_MsgUndelegate_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUndelegate -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgUndelegate) Descriptor() protoreflect.MessageDescriptor { - return md_MsgUndelegate -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgUndelegate) Type() protoreflect.MessageType { - return _fastReflection_MsgUndelegate_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgUndelegate) New() protoreflect.Message { - return new(fastReflection_MsgUndelegate) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgUndelegate) Interface() protoreflect.ProtoMessage { - return (*MsgUndelegate)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgUndelegate) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgUndelegate_sender, value) { - return - } - } - if x.ValidatorAddress != "" { - value := protoreflect.ValueOfString(x.ValidatorAddress) - if !f(fd_MsgUndelegate_validator_address, value) { - return - } - } - if x.Amount != nil { - value := protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - if !f(fd_MsgUndelegate_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgUndelegate) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgUndelegate.sender": - return x.Sender != "" - case "cosmos.lockup.MsgUndelegate.validator_address": - return x.ValidatorAddress != "" - case "cosmos.lockup.MsgUndelegate.amount": - return x.Amount != nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUndelegate) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgUndelegate.sender": - x.Sender = "" - case "cosmos.lockup.MsgUndelegate.validator_address": - x.ValidatorAddress = "" - case "cosmos.lockup.MsgUndelegate.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgUndelegate) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgUndelegate.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgUndelegate.validator_address": - value := x.ValidatorAddress - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgUndelegate.amount": - value := x.Amount - return protoreflect.ValueOfMessage(value.ProtoReflect()) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUndelegate) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgUndelegate.sender": - x.Sender = value.Interface().(string) - case "cosmos.lockup.MsgUndelegate.validator_address": - x.ValidatorAddress = value.Interface().(string) - case "cosmos.lockup.MsgUndelegate.amount": - x.Amount = value.Message().Interface().(*v1beta1.Coin) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUndelegate) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgUndelegate.amount": - if x.Amount == nil { - x.Amount = new(v1beta1.Coin) - } - return protoreflect.ValueOfMessage(x.Amount.ProtoReflect()) - case "cosmos.lockup.MsgUndelegate.sender": - panic(fmt.Errorf("field sender of message cosmos.lockup.MsgUndelegate is not mutable")) - case "cosmos.lockup.MsgUndelegate.validator_address": - panic(fmt.Errorf("field validator_address of message cosmos.lockup.MsgUndelegate is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgUndelegate) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgUndelegate.sender": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgUndelegate.validator_address": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgUndelegate.amount": - m := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(m.ProtoReflect()) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgUndelegate")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgUndelegate does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgUndelegate) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgUndelegate", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgUndelegate) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgUndelegate) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgUndelegate) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgUndelegate) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgUndelegate) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ValidatorAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.Amount != nil { - l = options.Size(x.Amount) - n += 1 + l + runtime.Sov(uint64(l)) - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgUndelegate) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if x.Amount != nil { - encoded, err := options.Marshal(x.Amount) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - if len(x.ValidatorAddress) > 0 { - i -= len(x.ValidatorAddress) - copy(dAtA[i:], x.ValidatorAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ValidatorAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgUndelegate) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegate: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgUndelegate: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ValidatorAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ValidatorAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if x.Amount == nil { - x.Amount = &v1beta1.Coin{} - } - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgSend_3_list)(nil) - -type _MsgSend_3_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgSend_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgSend_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgSend_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgSend_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgSend_3_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSend_3_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgSend_3_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgSend_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgSend protoreflect.MessageDescriptor - fd_MsgSend_sender protoreflect.FieldDescriptor - fd_MsgSend_to_address protoreflect.FieldDescriptor - fd_MsgSend_amount protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgSend = File_cosmos_lockup_tx_proto.Messages().ByName("MsgSend") - fd_MsgSend_sender = md_MsgSend.Fields().ByName("sender") - fd_MsgSend_to_address = md_MsgSend.Fields().ByName("to_address") - fd_MsgSend_amount = md_MsgSend.Fields().ByName("amount") -} - -var _ protoreflect.Message = (*fastReflection_MsgSend)(nil) - -type fastReflection_MsgSend MsgSend - -func (x *MsgSend) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgSend)(x) -} - -func (x *MsgSend) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[6] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgSend_messageType fastReflection_MsgSend_messageType -var _ protoreflect.MessageType = fastReflection_MsgSend_messageType{} - -type fastReflection_MsgSend_messageType struct{} - -func (x fastReflection_MsgSend_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgSend)(nil) -} -func (x fastReflection_MsgSend_messageType) New() protoreflect.Message { - return new(fastReflection_MsgSend) -} -func (x fastReflection_MsgSend_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSend -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgSend) Descriptor() protoreflect.MessageDescriptor { - return md_MsgSend -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgSend) Type() protoreflect.MessageType { - return _fastReflection_MsgSend_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgSend) New() protoreflect.Message { - return new(fastReflection_MsgSend) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgSend) Interface() protoreflect.ProtoMessage { - return (*MsgSend)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgSend) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Sender != "" { - value := protoreflect.ValueOfString(x.Sender) - if !f(fd_MsgSend_sender, value) { - return - } - } - if x.ToAddress != "" { - value := protoreflect.ValueOfString(x.ToAddress) - if !f(fd_MsgSend_to_address, value) { - return - } - } - if len(x.Amount) != 0 { - value := protoreflect.ValueOfList(&_MsgSend_3_list{list: &x.Amount}) - if !f(fd_MsgSend_amount, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgSend) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgSend.sender": - return x.Sender != "" - case "cosmos.lockup.MsgSend.to_address": - return x.ToAddress != "" - case "cosmos.lockup.MsgSend.amount": - return len(x.Amount) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSend) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgSend.sender": - x.Sender = "" - case "cosmos.lockup.MsgSend.to_address": - x.ToAddress = "" - case "cosmos.lockup.MsgSend.amount": - x.Amount = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgSend) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgSend.sender": - value := x.Sender - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgSend.to_address": - value := x.ToAddress - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgSend.amount": - if len(x.Amount) == 0 { - return protoreflect.ValueOfList(&_MsgSend_3_list{}) - } - listValue := &_MsgSend_3_list{list: &x.Amount} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSend) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgSend.sender": - x.Sender = value.Interface().(string) - case "cosmos.lockup.MsgSend.to_address": - x.ToAddress = value.Interface().(string) - case "cosmos.lockup.MsgSend.amount": - lv := value.List() - clv := lv.(*_MsgSend_3_list) - x.Amount = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSend) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgSend.amount": - if x.Amount == nil { - x.Amount = []*v1beta1.Coin{} - } - value := &_MsgSend_3_list{list: &x.Amount} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.MsgSend.sender": - panic(fmt.Errorf("field sender of message cosmos.lockup.MsgSend is not mutable")) - case "cosmos.lockup.MsgSend.to_address": - panic(fmt.Errorf("field to_address of message cosmos.lockup.MsgSend is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgSend) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgSend.sender": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgSend.to_address": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgSend.amount": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgSend_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgSend")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgSend does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgSend) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgSend", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgSend) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgSend) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgSend) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgSend) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgSend) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Sender) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ToAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Amount) > 0 { - for _, e := range x.Amount { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgSend) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Amount) > 0 { - for iNdEx := len(x.Amount) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Amount[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ToAddress) > 0 { - i -= len(x.ToAddress) - copy(dAtA[i:], x.ToAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.Sender) > 0 { - i -= len(x.Sender) - copy(dAtA[i:], x.Sender) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Sender))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgSend) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgSend: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Sender", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Sender = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Amount", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Amount = append(x.Amount, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Amount[len(x.Amount)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgExecuteMessagesResponse_1_list)(nil) - -type _MsgExecuteMessagesResponse_1_list struct { - list *[]*anypb.Any -} - -func (x *_MsgExecuteMessagesResponse_1_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgExecuteMessagesResponse_1_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgExecuteMessagesResponse_1_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - (*x.list)[i] = concreteValue -} - -func (x *_MsgExecuteMessagesResponse_1_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*anypb.Any) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgExecuteMessagesResponse_1_list) AppendMutable() protoreflect.Value { - v := new(anypb.Any) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecuteMessagesResponse_1_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgExecuteMessagesResponse_1_list) NewElement() protoreflect.Value { - v := new(anypb.Any) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgExecuteMessagesResponse_1_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgExecuteMessagesResponse protoreflect.MessageDescriptor - fd_MsgExecuteMessagesResponse_responses protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgExecuteMessagesResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgExecuteMessagesResponse") - fd_MsgExecuteMessagesResponse_responses = md_MsgExecuteMessagesResponse.Fields().ByName("responses") -} - -var _ protoreflect.Message = (*fastReflection_MsgExecuteMessagesResponse)(nil) - -type fastReflection_MsgExecuteMessagesResponse MsgExecuteMessagesResponse - -func (x *MsgExecuteMessagesResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgExecuteMessagesResponse)(x) -} - -func (x *MsgExecuteMessagesResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[7] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgExecuteMessagesResponse_messageType fastReflection_MsgExecuteMessagesResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgExecuteMessagesResponse_messageType{} - -type fastReflection_MsgExecuteMessagesResponse_messageType struct{} - -func (x fastReflection_MsgExecuteMessagesResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgExecuteMessagesResponse)(nil) -} -func (x fastReflection_MsgExecuteMessagesResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgExecuteMessagesResponse) -} -func (x fastReflection_MsgExecuteMessagesResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteMessagesResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgExecuteMessagesResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgExecuteMessagesResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgExecuteMessagesResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgExecuteMessagesResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgExecuteMessagesResponse) New() protoreflect.Message { - return new(fastReflection_MsgExecuteMessagesResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgExecuteMessagesResponse) Interface() protoreflect.ProtoMessage { - return (*MsgExecuteMessagesResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgExecuteMessagesResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if len(x.Responses) != 0 { - value := protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{list: &x.Responses}) - if !f(fd_MsgExecuteMessagesResponse_responses, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgExecuteMessagesResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgExecuteMessagesResponse.responses": - return len(x.Responses) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgExecuteMessagesResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgExecuteMessagesResponse.responses": - x.Responses = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgExecuteMessagesResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgExecuteMessagesResponse.responses": - if len(x.Responses) == 0 { - return protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{}) - } - listValue := &_MsgExecuteMessagesResponse_1_list{list: &x.Responses} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgExecuteMessagesResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgExecuteMessagesResponse.responses": - lv := value.List() - clv := lv.(*_MsgExecuteMessagesResponse_1_list) - x.Responses = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgExecuteMessagesResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgExecuteMessagesResponse.responses": - if x.Responses == nil { - x.Responses = []*anypb.Any{} - } - value := &_MsgExecuteMessagesResponse_1_list{list: &x.Responses} - return protoreflect.ValueOfList(value) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgExecuteMessagesResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgExecuteMessagesResponse.responses": - list := []*anypb.Any{} - return protoreflect.ValueOfList(&_MsgExecuteMessagesResponse_1_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgExecuteMessagesResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgExecuteMessagesResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgExecuteMessagesResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgExecuteMessagesResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgExecuteMessagesResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgExecuteMessagesResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgExecuteMessagesResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgExecuteMessagesResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgExecuteMessagesResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - if len(x.Responses) > 0 { - for _, e := range x.Responses { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgExecuteMessagesResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Responses) > 0 { - for iNdEx := len(x.Responses) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.Responses[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0xa - } - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgExecuteMessagesResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteMessagesResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgExecuteMessagesResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Responses", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Responses = append(x.Responses, &anypb.Any{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.Responses[len(x.Responses)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgWithdraw_3_list)(nil) - -type _MsgWithdraw_3_list struct { - list *[]string -} - -func (x *_MsgWithdraw_3_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgWithdraw_3_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfString((*x.list)[i]) -} - -func (x *_MsgWithdraw_3_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - (*x.list)[i] = concreteValue -} - -func (x *_MsgWithdraw_3_list) Append(value protoreflect.Value) { - valueUnwrapped := value.String() - concreteValue := valueUnwrapped - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgWithdraw_3_list) AppendMutable() protoreflect.Value { - panic(fmt.Errorf("AppendMutable can not be called on message MsgWithdraw at list field Denoms as it is not of Message kind")) -} - -func (x *_MsgWithdraw_3_list) Truncate(n int) { - *x.list = (*x.list)[:n] -} - -func (x *_MsgWithdraw_3_list) NewElement() protoreflect.Value { - v := "" - return protoreflect.ValueOfString(v) -} - -func (x *_MsgWithdraw_3_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgWithdraw protoreflect.MessageDescriptor - fd_MsgWithdraw_withdrawer protoreflect.FieldDescriptor - fd_MsgWithdraw_to_address protoreflect.FieldDescriptor - fd_MsgWithdraw_denoms protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgWithdraw = File_cosmos_lockup_tx_proto.Messages().ByName("MsgWithdraw") - fd_MsgWithdraw_withdrawer = md_MsgWithdraw.Fields().ByName("withdrawer") - fd_MsgWithdraw_to_address = md_MsgWithdraw.Fields().ByName("to_address") - fd_MsgWithdraw_denoms = md_MsgWithdraw.Fields().ByName("denoms") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdraw)(nil) - -type fastReflection_MsgWithdraw MsgWithdraw - -func (x *MsgWithdraw) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdraw)(x) -} - -func (x *MsgWithdraw) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[8] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdraw_messageType fastReflection_MsgWithdraw_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdraw_messageType{} - -type fastReflection_MsgWithdraw_messageType struct{} - -func (x fastReflection_MsgWithdraw_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdraw)(nil) -} -func (x fastReflection_MsgWithdraw_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdraw) -} -func (x fastReflection_MsgWithdraw_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdraw -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdraw) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdraw -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgWithdraw) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdraw_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdraw) New() protoreflect.Message { - return new(fastReflection_MsgWithdraw) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdraw) Interface() protoreflect.ProtoMessage { - return (*MsgWithdraw)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgWithdraw) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Withdrawer != "" { - value := protoreflect.ValueOfString(x.Withdrawer) - if !f(fd_MsgWithdraw_withdrawer, value) { - return - } - } - if x.ToAddress != "" { - value := protoreflect.ValueOfString(x.ToAddress) - if !f(fd_MsgWithdraw_to_address, value) { - return - } - } - if len(x.Denoms) != 0 { - value := protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &x.Denoms}) - if !f(fd_MsgWithdraw_denoms, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgWithdraw) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdraw.withdrawer": - return x.Withdrawer != "" - case "cosmos.lockup.MsgWithdraw.to_address": - return x.ToAddress != "" - case "cosmos.lockup.MsgWithdraw.denoms": - return len(x.Denoms) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdraw) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdraw.withdrawer": - x.Withdrawer = "" - case "cosmos.lockup.MsgWithdraw.to_address": - x.ToAddress = "" - case "cosmos.lockup.MsgWithdraw.denoms": - x.Denoms = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgWithdraw) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgWithdraw.withdrawer": - value := x.Withdrawer - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgWithdraw.to_address": - value := x.ToAddress - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgWithdraw.denoms": - if len(x.Denoms) == 0 { - return protoreflect.ValueOfList(&_MsgWithdraw_3_list{}) - } - listValue := &_MsgWithdraw_3_list{list: &x.Denoms} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdraw) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdraw.withdrawer": - x.Withdrawer = value.Interface().(string) - case "cosmos.lockup.MsgWithdraw.to_address": - x.ToAddress = value.Interface().(string) - case "cosmos.lockup.MsgWithdraw.denoms": - lv := value.List() - clv := lv.(*_MsgWithdraw_3_list) - x.Denoms = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdraw) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdraw.denoms": - if x.Denoms == nil { - x.Denoms = []string{} - } - value := &_MsgWithdraw_3_list{list: &x.Denoms} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.MsgWithdraw.withdrawer": - panic(fmt.Errorf("field withdrawer of message cosmos.lockup.MsgWithdraw is not mutable")) - case "cosmos.lockup.MsgWithdraw.to_address": - panic(fmt.Errorf("field to_address of message cosmos.lockup.MsgWithdraw is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgWithdraw) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdraw.withdrawer": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgWithdraw.to_address": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgWithdraw.denoms": - list := []string{} - return protoreflect.ValueOfList(&_MsgWithdraw_3_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdraw")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdraw does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgWithdraw) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgWithdraw", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgWithdraw) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdraw) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgWithdraw) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgWithdraw) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdraw) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Withdrawer) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - l = len(x.ToAddress) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.Denoms) > 0 { - for _, s := range x.Denoms { - l = len(s) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdraw) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.Denoms) > 0 { - for iNdEx := len(x.Denoms) - 1; iNdEx >= 0; iNdEx-- { - i -= len(x.Denoms[iNdEx]) - copy(dAtA[i:], x.Denoms[iNdEx]) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Denoms[iNdEx]))) - i-- - dAtA[i] = 0x1a - } - } - if len(x.ToAddress) > 0 { - i -= len(x.ToAddress) - copy(dAtA[i:], x.ToAddress) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ToAddress))) - i-- - dAtA[i] = 0x12 - } - if len(x.Withdrawer) > 0 { - i -= len(x.Withdrawer) - copy(dAtA[i:], x.Withdrawer) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Withdrawer))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdraw) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdraw: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdraw: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Withdrawer", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Withdrawer = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ToAddress", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.ToAddress = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Denoms", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Denoms = append(x.Denoms, string(dAtA[iNdEx:postIndex])) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -var _ protoreflect.List = (*_MsgWithdrawResponse_2_list)(nil) - -type _MsgWithdrawResponse_2_list struct { - list *[]*v1beta1.Coin -} - -func (x *_MsgWithdrawResponse_2_list) Len() int { - if x.list == nil { - return 0 - } - return len(*x.list) -} - -func (x *_MsgWithdrawResponse_2_list) Get(i int) protoreflect.Value { - return protoreflect.ValueOfMessage((*x.list)[i].ProtoReflect()) -} - -func (x *_MsgWithdrawResponse_2_list) Set(i int, value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - (*x.list)[i] = concreteValue -} - -func (x *_MsgWithdrawResponse_2_list) Append(value protoreflect.Value) { - valueUnwrapped := value.Message() - concreteValue := valueUnwrapped.Interface().(*v1beta1.Coin) - *x.list = append(*x.list, concreteValue) -} - -func (x *_MsgWithdrawResponse_2_list) AppendMutable() protoreflect.Value { - v := new(v1beta1.Coin) - *x.list = append(*x.list, v) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawResponse_2_list) Truncate(n int) { - for i := n; i < len(*x.list); i++ { - (*x.list)[i] = nil - } - *x.list = (*x.list)[:n] -} - -func (x *_MsgWithdrawResponse_2_list) NewElement() protoreflect.Value { - v := new(v1beta1.Coin) - return protoreflect.ValueOfMessage(v.ProtoReflect()) -} - -func (x *_MsgWithdrawResponse_2_list) IsValid() bool { - return x.list != nil -} - -var ( - md_MsgWithdrawResponse protoreflect.MessageDescriptor - fd_MsgWithdrawResponse_reciever protoreflect.FieldDescriptor - fd_MsgWithdrawResponse_amount_received protoreflect.FieldDescriptor -) - -func init() { - file_cosmos_lockup_tx_proto_init() - md_MsgWithdrawResponse = File_cosmos_lockup_tx_proto.Messages().ByName("MsgWithdrawResponse") - fd_MsgWithdrawResponse_reciever = md_MsgWithdrawResponse.Fields().ByName("reciever") - fd_MsgWithdrawResponse_amount_received = md_MsgWithdrawResponse.Fields().ByName("amount_received") -} - -var _ protoreflect.Message = (*fastReflection_MsgWithdrawResponse)(nil) - -type fastReflection_MsgWithdrawResponse MsgWithdrawResponse - -func (x *MsgWithdrawResponse) ProtoReflect() protoreflect.Message { - return (*fastReflection_MsgWithdrawResponse)(x) -} - -func (x *MsgWithdrawResponse) slowProtoReflect() protoreflect.Message { - mi := &file_cosmos_lockup_tx_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -var _fastReflection_MsgWithdrawResponse_messageType fastReflection_MsgWithdrawResponse_messageType -var _ protoreflect.MessageType = fastReflection_MsgWithdrawResponse_messageType{} - -type fastReflection_MsgWithdrawResponse_messageType struct{} - -func (x fastReflection_MsgWithdrawResponse_messageType) Zero() protoreflect.Message { - return (*fastReflection_MsgWithdrawResponse)(nil) -} -func (x fastReflection_MsgWithdrawResponse_messageType) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawResponse) -} -func (x fastReflection_MsgWithdrawResponse_messageType) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawResponse -} - -// Descriptor returns message descriptor, which contains only the protobuf -// type information for the message. -func (x *fastReflection_MsgWithdrawResponse) Descriptor() protoreflect.MessageDescriptor { - return md_MsgWithdrawResponse -} - -// Type returns the message type, which encapsulates both Go and protobuf -// type information. If the Go type information is not needed, -// it is recommended that the message descriptor be used instead. -func (x *fastReflection_MsgWithdrawResponse) Type() protoreflect.MessageType { - return _fastReflection_MsgWithdrawResponse_messageType -} - -// New returns a newly allocated and mutable empty message. -func (x *fastReflection_MsgWithdrawResponse) New() protoreflect.Message { - return new(fastReflection_MsgWithdrawResponse) -} - -// Interface unwraps the message reflection interface and -// returns the underlying ProtoMessage interface. -func (x *fastReflection_MsgWithdrawResponse) Interface() protoreflect.ProtoMessage { - return (*MsgWithdrawResponse)(x) -} - -// Range iterates over every populated field in an undefined order, -// calling f for each field descriptor and value encountered. -// Range returns immediately if f returns false. -// While iterating, mutating operations may only be performed -// on the current field descriptor. -func (x *fastReflection_MsgWithdrawResponse) Range(f func(protoreflect.FieldDescriptor, protoreflect.Value) bool) { - if x.Reciever != "" { - value := protoreflect.ValueOfString(x.Reciever) - if !f(fd_MsgWithdrawResponse_reciever, value) { - return - } - } - if len(x.AmountReceived) != 0 { - value := protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &x.AmountReceived}) - if !f(fd_MsgWithdrawResponse_amount_received, value) { - return - } - } -} - -// Has reports whether a field is populated. -// -// Some fields have the property of nullability where it is possible to -// distinguish between the default value of a field and whether the field -// was explicitly populated with the default value. Singular message fields, -// member fields of a oneof, and proto2 scalar fields are nullable. Such -// fields are populated only if explicitly set. -// -// In other cases (aside from the nullable cases above), -// a proto3 scalar field is populated if it contains a non-zero value, and -// a repeated field is populated if it is non-empty. -func (x *fastReflection_MsgWithdrawResponse) Has(fd protoreflect.FieldDescriptor) bool { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdrawResponse.reciever": - return x.Reciever != "" - case "cosmos.lockup.MsgWithdrawResponse.amount_received": - return len(x.AmountReceived) != 0 - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) - } -} - -// Clear clears the field such that a subsequent Has call reports false. -// -// Clearing an extension field clears both the extension type and value -// associated with the given field number. -// -// Clear is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawResponse) Clear(fd protoreflect.FieldDescriptor) { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdrawResponse.reciever": - x.Reciever = "" - case "cosmos.lockup.MsgWithdrawResponse.amount_received": - x.AmountReceived = nil - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) - } -} - -// Get retrieves the value for a field. -// -// For unpopulated scalars, it returns the default value, where -// the default value of a bytes scalar is guaranteed to be a copy. -// For unpopulated composite types, it returns an empty, read-only view -// of the value; to obtain a mutable reference, use Mutable. -func (x *fastReflection_MsgWithdrawResponse) Get(descriptor protoreflect.FieldDescriptor) protoreflect.Value { - switch descriptor.FullName() { - case "cosmos.lockup.MsgWithdrawResponse.reciever": - value := x.Reciever - return protoreflect.ValueOfString(value) - case "cosmos.lockup.MsgWithdrawResponse.amount_received": - if len(x.AmountReceived) == 0 { - return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{}) - } - listValue := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} - return protoreflect.ValueOfList(listValue) - default: - if descriptor.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", descriptor.FullName())) - } -} - -// Set stores the value for a field. -// -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType. -// When setting a composite type, it is unspecified whether the stored value -// aliases the source's memory in any way. If the composite value is an -// empty, read-only value, then it panics. -// -// Set is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawResponse) Set(fd protoreflect.FieldDescriptor, value protoreflect.Value) { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdrawResponse.reciever": - x.Reciever = value.Interface().(string) - case "cosmos.lockup.MsgWithdrawResponse.amount_received": - lv := value.List() - clv := lv.(*_MsgWithdrawResponse_2_list) - x.AmountReceived = *clv.list - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) - } -} - -// Mutable returns a mutable reference to a composite type. -// -// If the field is unpopulated, it may allocate a composite value. -// For a field belonging to a oneof, it implicitly clears any other field -// that may be currently set within the same oneof. -// For extension fields, it implicitly stores the provided ExtensionType -// if not already stored. -// It panics if the field does not contain a composite type. -// -// Mutable is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawResponse) Mutable(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdrawResponse.amount_received": - if x.AmountReceived == nil { - x.AmountReceived = []*v1beta1.Coin{} - } - value := &_MsgWithdrawResponse_2_list{list: &x.AmountReceived} - return protoreflect.ValueOfList(value) - case "cosmos.lockup.MsgWithdrawResponse.reciever": - panic(fmt.Errorf("field reciever of message cosmos.lockup.MsgWithdrawResponse is not mutable")) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) - } -} - -// NewField returns a new value that is assignable to the field -// for the given descriptor. For scalars, this returns the default value. -// For lists, maps, and messages, this returns a new, empty, mutable value. -func (x *fastReflection_MsgWithdrawResponse) NewField(fd protoreflect.FieldDescriptor) protoreflect.Value { - switch fd.FullName() { - case "cosmos.lockup.MsgWithdrawResponse.reciever": - return protoreflect.ValueOfString("") - case "cosmos.lockup.MsgWithdrawResponse.amount_received": - list := []*v1beta1.Coin{} - return protoreflect.ValueOfList(&_MsgWithdrawResponse_2_list{list: &list}) - default: - if fd.IsExtension() { - panic(fmt.Errorf("proto3 declared messages do not support extensions: cosmos.lockup.MsgWithdrawResponse")) - } - panic(fmt.Errorf("message cosmos.lockup.MsgWithdrawResponse does not contain field %s", fd.FullName())) - } -} - -// WhichOneof reports which field within the oneof is populated, -// returning nil if none are populated. -// It panics if the oneof descriptor does not belong to this message. -func (x *fastReflection_MsgWithdrawResponse) WhichOneof(d protoreflect.OneofDescriptor) protoreflect.FieldDescriptor { - switch d.FullName() { - default: - panic(fmt.Errorf("%s is not a oneof field in cosmos.lockup.MsgWithdrawResponse", d.FullName())) - } - panic("unreachable") -} - -// GetUnknown retrieves the entire list of unknown fields. -// The caller may only mutate the contents of the RawFields -// if the mutated bytes are stored back into the message with SetUnknown. -func (x *fastReflection_MsgWithdrawResponse) GetUnknown() protoreflect.RawFields { - return x.unknownFields -} - -// SetUnknown stores an entire list of unknown fields. -// The raw fields must be syntactically valid according to the wire format. -// An implementation may panic if this is not the case. -// Once stored, the caller must not mutate the content of the RawFields. -// An empty RawFields may be passed to clear the fields. -// -// SetUnknown is a mutating operation and unsafe for concurrent use. -func (x *fastReflection_MsgWithdrawResponse) SetUnknown(fields protoreflect.RawFields) { - x.unknownFields = fields -} - -// IsValid reports whether the message is valid. -// -// An invalid message is an empty, read-only value. -// -// An invalid message often corresponds to a nil pointer of the concrete -// message type, but the details are implementation dependent. -// Validity is not part of the protobuf data model, and may not -// be preserved in marshaling or other operations. -func (x *fastReflection_MsgWithdrawResponse) IsValid() bool { - return x != nil -} - -// ProtoMethods returns optional fastReflectionFeature-path implementations of various operations. -// This method may return nil. -// -// The returned methods type is identical to -// "google.golang.org/protobuf/runtime/protoiface".Methods. -// Consult the protoiface package documentation for details. -func (x *fastReflection_MsgWithdrawResponse) ProtoMethods() *protoiface.Methods { - size := func(input protoiface.SizeInput) protoiface.SizeOutput { - x := input.Message.Interface().(*MsgWithdrawResponse) - if x == nil { - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: 0, - } - } - options := runtime.SizeInputToOptions(input) - _ = options - var n int - var l int - _ = l - l = len(x.Reciever) - if l > 0 { - n += 1 + l + runtime.Sov(uint64(l)) - } - if len(x.AmountReceived) > 0 { - for _, e := range x.AmountReceived { - l = options.Size(e) - n += 1 + l + runtime.Sov(uint64(l)) - } - } - if x.unknownFields != nil { - n += len(x.unknownFields) - } - return protoiface.SizeOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Size: n, - } - } - - marshal := func(input protoiface.MarshalInput) (protoiface.MarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawResponse) - if x == nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - options := runtime.MarshalInputToOptions(input) - _ = options - size := options.Size(x) - dAtA := make([]byte, size) - i := len(dAtA) - _ = i - var l int - _ = l - if x.unknownFields != nil { - i -= len(x.unknownFields) - copy(dAtA[i:], x.unknownFields) - } - if len(x.AmountReceived) > 0 { - for iNdEx := len(x.AmountReceived) - 1; iNdEx >= 0; iNdEx-- { - encoded, err := options.Marshal(x.AmountReceived[iNdEx]) - if err != nil { - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, err - } - i -= len(encoded) - copy(dAtA[i:], encoded) - i = runtime.EncodeVarint(dAtA, i, uint64(len(encoded))) - i-- - dAtA[i] = 0x12 - } - } - if len(x.Reciever) > 0 { - i -= len(x.Reciever) - copy(dAtA[i:], x.Reciever) - i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Reciever))) - i-- - dAtA[i] = 0xa - } - if input.Buf != nil { - input.Buf = append(input.Buf, dAtA...) - } else { - input.Buf = dAtA - } - return protoiface.MarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Buf: input.Buf, - }, nil - } - unmarshal := func(input protoiface.UnmarshalInput) (protoiface.UnmarshalOutput, error) { - x := input.Message.Interface().(*MsgWithdrawResponse) - if x == nil { - return protoiface.UnmarshalOutput{ - NoUnkeyedLiterals: input.NoUnkeyedLiterals, - Flags: input.Flags, - }, nil - } - options := runtime.UnmarshalInputToOptions(input) - _ = options - dAtA := input.Buf - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - fieldNum := int32(wire >> 3) - wireType := int(wire & 0x7) - if wireType == 4 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: MsgWithdrawResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Reciever", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.Reciever = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field AmountReceived", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrIntOverflow - } - if iNdEx >= l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if postIndex > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - x.AmountReceived = append(x.AmountReceived, &v1beta1.Coin{}) - if err := options.Unmarshal(dAtA[iNdEx:postIndex], x.AmountReceived[len(x.AmountReceived)-1]); err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := runtime.Skip(dAtA[iNdEx:]) - if err != nil { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, runtime.ErrInvalidLength - } - if (iNdEx + skippy) > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - if !options.DiscardUnknown { - x.unknownFields = append(x.unknownFields, dAtA[iNdEx:iNdEx+skippy]...) - } - iNdEx += skippy - } - } - - if iNdEx > l { - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, io.ErrUnexpectedEOF - } - return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, nil - } - return &protoiface.Methods{ - NoUnkeyedLiterals: struct{}{}, - Flags: protoiface.SupportMarshalDeterministic | protoiface.SupportUnmarshalDiscardUnknown, - Size: size, - Marshal: marshal, - Unmarshal: unmarshal, - Merge: nil, - CheckInitialized: nil, - } -} - -// Code generated by protoc-gen-go. DO NOT EDIT. -// versions: -// protoc-gen-go v1.27.0 -// protoc (unknown) -// source: cosmos/lockup/tx.proto - -const ( - // Verify that this generated code is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) - // Verify that runtime/protoimpl is sufficiently up-to-date. - _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) -) - -// MsgInitLockupAccount defines a message that enables creating a lockup -// account. -type MsgInitLockupAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // owner of the vesting account - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // end of lockup - EndTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=end_time,json=endTime,proto3" json:"end_time,omitempty"` - // start of lockup - StartTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` -} - -func (x *MsgInitLockupAccount) Reset() { - *x = MsgInitLockupAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[0] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitLockupAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitLockupAccount) ProtoMessage() {} - -// Deprecated: Use MsgInitLockupAccount.ProtoReflect.Descriptor instead. -func (*MsgInitLockupAccount) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{0} -} - -func (x *MsgInitLockupAccount) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *MsgInitLockupAccount) GetEndTime() *timestamppb.Timestamp { - if x != nil { - return x.EndTime - } - return nil -} - -func (x *MsgInitLockupAccount) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -// MsgInitLockupAccountResponse defines the Msg/InitLockupAccount response type. -type MsgInitLockupAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgInitLockupAccountResponse) Reset() { - *x = MsgInitLockupAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[1] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitLockupAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitLockupAccountResponse) ProtoMessage() {} - -// Deprecated: Use MsgInitLockupAccountResponse.ProtoReflect.Descriptor instead. -func (*MsgInitLockupAccountResponse) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{1} -} - -// MsgInitPeriodicLockingAccount defines a message that enables creating a periodic locking -// account. -type MsgInitPeriodicLockingAccount struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // owner of the lockup account - Owner string `protobuf:"bytes,1,opt,name=owner,proto3" json:"owner,omitempty"` - // start of lockup - StartTime *timestamppb.Timestamp `protobuf:"bytes,2,opt,name=start_time,json=startTime,proto3" json:"start_time,omitempty"` - LockingPeriods []*Period `protobuf:"bytes,3,rep,name=locking_periods,json=lockingPeriods,proto3" json:"locking_periods,omitempty"` -} - -func (x *MsgInitPeriodicLockingAccount) Reset() { - *x = MsgInitPeriodicLockingAccount{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[2] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitPeriodicLockingAccount) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitPeriodicLockingAccount) ProtoMessage() {} - -// Deprecated: Use MsgInitPeriodicLockingAccount.ProtoReflect.Descriptor instead. -func (*MsgInitPeriodicLockingAccount) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{2} -} - -func (x *MsgInitPeriodicLockingAccount) GetOwner() string { - if x != nil { - return x.Owner - } - return "" -} - -func (x *MsgInitPeriodicLockingAccount) GetStartTime() *timestamppb.Timestamp { - if x != nil { - return x.StartTime - } - return nil -} - -func (x *MsgInitPeriodicLockingAccount) GetLockingPeriods() []*Period { - if x != nil { - return x.LockingPeriods - } - return nil -} - -// MsgInitPeriodicLockingAccountResponse defines the Msg/InitPeriodicLockingAccount -// response type. -type MsgInitPeriodicLockingAccountResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields -} - -func (x *MsgInitPeriodicLockingAccountResponse) Reset() { - *x = MsgInitPeriodicLockingAccountResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[3] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgInitPeriodicLockingAccountResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgInitPeriodicLockingAccountResponse) ProtoMessage() {} - -// Deprecated: Use MsgInitPeriodicLockingAccountResponse.ProtoReflect.Descriptor instead. -func (*MsgInitPeriodicLockingAccountResponse) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{3} -} - -// MsgDelegate defines a message that enable lockup account to execute delegate message -type MsgDelegate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - // sender is the owner of the lockup account - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgDelegate) Reset() { - *x = MsgDelegate{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[4] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgDelegate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgDelegate) ProtoMessage() {} - -// Deprecated: Use MsgDelegate.ProtoReflect.Descriptor instead. -func (*MsgDelegate) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{4} -} - -func (x *MsgDelegate) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgDelegate) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *MsgDelegate) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgUndelegate defines a message that enable lockup account to execute undelegate message -type MsgUndelegate struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - ValidatorAddress string `protobuf:"bytes,2,opt,name=validator_address,json=validatorAddress,proto3" json:"validator_address,omitempty"` - Amount *v1beta1.Coin `protobuf:"bytes,3,opt,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgUndelegate) Reset() { - *x = MsgUndelegate{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[5] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgUndelegate) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgUndelegate) ProtoMessage() {} - -// Deprecated: Use MsgUndelegate.ProtoReflect.Descriptor instead. -func (*MsgUndelegate) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{5} -} - -func (x *MsgUndelegate) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgUndelegate) GetValidatorAddress() string { - if x != nil { - return x.ValidatorAddress - } - return "" -} - -func (x *MsgUndelegate) GetAmount() *v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgSend defines a message that enable lockup account to execute send message -type MsgSend struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Sender string `protobuf:"bytes,1,opt,name=sender,proto3" json:"sender,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Amount []*v1beta1.Coin `protobuf:"bytes,3,rep,name=amount,proto3" json:"amount,omitempty"` -} - -func (x *MsgSend) Reset() { - *x = MsgSend{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[6] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgSend) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgSend) ProtoMessage() {} - -// Deprecated: Use MsgSend.ProtoReflect.Descriptor instead. -func (*MsgSend) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{6} -} - -func (x *MsgSend) GetSender() string { - if x != nil { - return x.Sender - } - return "" -} - -func (x *MsgSend) GetToAddress() string { - if x != nil { - return x.ToAddress - } - return "" -} - -func (x *MsgSend) GetAmount() []*v1beta1.Coin { - if x != nil { - return x.Amount - } - return nil -} - -// MsgExecuteMessagesResponse defines the response for lockup execute operations -type MsgExecuteMessagesResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Responses []*anypb.Any `protobuf:"bytes,1,rep,name=responses,proto3" json:"responses,omitempty"` -} - -func (x *MsgExecuteMessagesResponse) Reset() { - *x = MsgExecuteMessagesResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[7] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgExecuteMessagesResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgExecuteMessagesResponse) ProtoMessage() {} - -// Deprecated: Use MsgExecuteMessagesResponse.ProtoReflect.Descriptor instead. -func (*MsgExecuteMessagesResponse) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{7} -} - -func (x *MsgExecuteMessagesResponse) GetResponses() []*anypb.Any { - if x != nil { - return x.Responses - } - return nil -} - -// MsgWithdraw defines a message that the owner of the lockup can perform to withdraw unlocked token to an account of -// choice -type MsgWithdraw struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Withdrawer string `protobuf:"bytes,1,opt,name=withdrawer,proto3" json:"withdrawer,omitempty"` - ToAddress string `protobuf:"bytes,2,opt,name=to_address,json=toAddress,proto3" json:"to_address,omitempty"` - Denoms []string `protobuf:"bytes,3,rep,name=denoms,proto3" json:"denoms,omitempty"` -} - -func (x *MsgWithdraw) Reset() { - *x = MsgWithdraw{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[8] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdraw) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdraw) ProtoMessage() {} - -// Deprecated: Use MsgWithdraw.ProtoReflect.Descriptor instead. -func (*MsgWithdraw) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{8} -} - -func (x *MsgWithdraw) GetWithdrawer() string { - if x != nil { - return x.Withdrawer - } - return "" -} - -func (x *MsgWithdraw) GetToAddress() string { - if x != nil { - return x.ToAddress - } - return "" -} - -func (x *MsgWithdraw) GetDenoms() []string { - if x != nil { - return x.Denoms - } - return nil -} - -// MsgWithdrawResponse defines the response for MsgWithdraw -type MsgWithdrawResponse struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Reciever string `protobuf:"bytes,1,opt,name=reciever,proto3" json:"reciever,omitempty"` - AmountReceived []*v1beta1.Coin `protobuf:"bytes,2,rep,name=amount_received,json=amountReceived,proto3" json:"amount_received,omitempty"` -} - -func (x *MsgWithdrawResponse) Reset() { - *x = MsgWithdrawResponse{} - if protoimpl.UnsafeEnabled { - mi := &file_cosmos_lockup_tx_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *MsgWithdrawResponse) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*MsgWithdrawResponse) ProtoMessage() {} - -// Deprecated: Use MsgWithdrawResponse.ProtoReflect.Descriptor instead. -func (*MsgWithdrawResponse) Descriptor() ([]byte, []int) { - return file_cosmos_lockup_tx_proto_rawDescGZIP(), []int{9} -} - -func (x *MsgWithdrawResponse) GetReciever() string { - if x != nil { - return x.Reciever - } - return "" -} - -func (x *MsgWithdrawResponse) GetAmountReceived() []*v1beta1.Coin { - if x != nil { - return x.AmountReceived - } - return nil -} - -var File_cosmos_lockup_tx_proto protoreflect.FileDescriptor - -var file_cosmos_lockup_tx_proto_rawDesc = []byte{ - 0x0a, 0x16, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, - 0x74, 0x78, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x1a, 0x11, 0x61, 0x6d, 0x69, 0x6e, 0x6f, 0x2f, 0x61, - 0x6d, 0x69, 0x6e, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x62, 0x61, 0x73, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2f, - 0x63, 0x6f, 0x69, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1a, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x2f, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x17, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6d, - 0x73, 0x67, 0x2f, 0x76, 0x31, 0x2f, 0x6d, 0x73, 0x67, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, - 0x19, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x14, 0x67, 0x6f, 0x67, 0x6f, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x67, 0x6f, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1f, 0x67, 0x6f, 0x6f, - 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, - 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x80, 0x02, 0x0a, - 0x14, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, - 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, - 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, - 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x44, 0x0a, 0x08, 0x65, 0x6e, 0x64, 0x5f, 0x74, 0x69, 0x6d, - 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, - 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, - 0x2a, 0x01, 0x52, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x48, 0x0a, 0x0a, 0x73, - 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, - 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x54, 0x69, 0x6d, 0x65, 0x3a, 0x28, 0xe8, 0xa0, 0x1f, 0x01, 0x8a, 0xe7, 0xb0, 0x2a, 0x1f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x49, 0x6e, - 0x69, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, - 0x1e, 0x0a, 0x1c, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x94, 0x02, 0x0a, 0x1d, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, - 0x64, 0x69, 0x63, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x12, 0x2e, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, - 0x72, 0x12, 0x48, 0x0a, 0x0a, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, - 0x70, 0x42, 0x0d, 0xc8, 0xde, 0x1f, 0x00, 0x90, 0xdf, 0x1f, 0x01, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, - 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x49, 0x0a, 0x0f, 0x6c, - 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x70, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x6c, 0x6f, - 0x63, 0x6b, 0x75, 0x70, 0x2e, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x42, 0x09, 0xc8, 0xde, 0x1f, - 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x6c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, 0x50, - 0x65, 0x72, 0x69, 0x6f, 0x64, 0x73, 0x3a, 0x2e, 0xe8, 0xa0, 0x1f, 0x00, 0x8a, 0xe7, 0xb0, 0x2a, - 0x25, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, 0x6b, 0x2f, 0x4d, 0x73, 0x67, 0x49, - 0x6e, 0x69, 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x41, - 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x27, 0x0a, 0x25, 0x4d, 0x73, 0x67, 0x49, 0x6e, 0x69, - 0x74, 0x50, 0x65, 0x72, 0x69, 0x6f, 0x64, 0x69, 0x63, 0x4c, 0x6f, 0x63, 0x6b, 0x69, 0x6e, 0x67, - 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0xe2, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x44, 0x65, 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, - 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, - 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, - 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, - 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, - 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, - 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, - 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, - 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, - 0x6e, 0x64, 0x65, 0x72, 0x22, 0xe4, 0x01, 0x0a, 0x0d, 0x4d, 0x73, 0x67, 0x55, 0x6e, 0x64, 0x65, - 0x6c, 0x65, 0x67, 0x61, 0x74, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, - 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x4e, 0x0a, 0x11, 0x76, 0x61, 0x6c, 0x69, - 0x64, 0x61, 0x74, 0x6f, 0x72, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x42, 0x21, 0xd2, 0xb4, 0x2d, 0x1d, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, - 0x56, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x10, 0x76, 0x61, 0x6c, 0x69, 0x64, 0x61, 0x74, 0x6f, - 0x72, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x3c, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, - 0x6e, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, - 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, - 0x6f, 0x69, 0x6e, 0x42, 0x09, 0xc8, 0xde, 0x1f, 0x00, 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, - 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, - 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x22, 0x84, 0x02, 0x0a, 0x07, - 0x4d, 0x73, 0x67, 0x53, 0x65, 0x6e, 0x64, 0x12, 0x30, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, - 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, - 0x67, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x0a, 0x74, 0x6f, 0x5f, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, - 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, - 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, 0x6f, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x79, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, - 0x2e, 0x76, 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, - 0xde, 0x1f, 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, - 0x73, 0x64, 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, - 0xe7, 0xb0, 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, - 0xa8, 0xe7, 0xb0, 0x2a, 0x01, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x3a, 0x13, 0x88, - 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x06, 0x73, 0x65, 0x6e, 0x64, - 0x65, 0x72, 0x22, 0x50, 0x0a, 0x1a, 0x4d, 0x73, 0x67, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x65, - 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x32, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x01, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, - 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, - 0x6e, 0x73, 0x65, 0x73, 0x22, 0xb1, 0x01, 0x0a, 0x0b, 0x4d, 0x73, 0x67, 0x57, 0x69, 0x74, 0x68, - 0x64, 0x72, 0x61, 0x77, 0x12, 0x38, 0x0a, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, - 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, - 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, - 0x6e, 0x67, 0x52, 0x0a, 0x77, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x12, 0x37, - 0x0a, 0x0a, 0x74, 0x6f, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x09, 0x74, 0x6f, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, - 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x06, 0x64, 0x65, 0x6e, 0x6f, 0x6d, 0x73, 0x3a, - 0x17, 0x88, 0xa0, 0x1f, 0x00, 0xe8, 0xa0, 0x1f, 0x00, 0x82, 0xe7, 0xb0, 0x2a, 0x0a, 0x77, 0x69, - 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x65, 0x72, 0x22, 0xd8, 0x01, 0x0a, 0x13, 0x4d, 0x73, 0x67, - 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, - 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x63, 0x69, 0x65, 0x76, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x42, 0x18, 0xd2, 0xb4, 0x2d, 0x14, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x53, 0x74, 0x72, 0x69, 0x6e, 0x67, 0x52, 0x08, 0x72, 0x65, - 0x63, 0x69, 0x65, 0x76, 0x65, 0x72, 0x12, 0x8a, 0x01, 0x0a, 0x0f, 0x61, 0x6d, 0x6f, 0x75, 0x6e, - 0x74, 0x5f, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x19, 0x2e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2e, 0x62, 0x61, 0x73, 0x65, 0x2e, 0x76, - 0x31, 0x62, 0x65, 0x74, 0x61, 0x31, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x42, 0x46, 0xc8, 0xde, 0x1f, - 0x00, 0xaa, 0xdf, 0x1f, 0x28, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2d, 0x73, 0x64, - 0x6b, 0x2f, 0x74, 0x79, 0x70, 0x65, 0x73, 0x2e, 0x43, 0x6f, 0x69, 0x6e, 0x73, 0x9a, 0xe7, 0xb0, - 0x2a, 0x0c, 0x6c, 0x65, 0x67, 0x61, 0x63, 0x79, 0x5f, 0x63, 0x6f, 0x69, 0x6e, 0x73, 0xa8, 0xe7, - 0xb0, 0x2a, 0x01, 0x52, 0x0e, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x63, 0x65, 0x69, - 0x76, 0x65, 0x64, 0x42, 0x91, 0x01, 0x0a, 0x11, 0x63, 0x6f, 0x6d, 0x2e, 0x63, 0x6f, 0x73, 0x6d, - 0x6f, 0x73, 0x2e, 0x6c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x42, 0x07, 0x54, 0x78, 0x50, 0x72, 0x6f, - 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1e, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x73, 0x64, 0x6b, 0x2e, - 0x69, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x2f, 0x6c, 0x6f, - 0x63, 0x6b, 0x75, 0x70, 0xa2, 0x02, 0x03, 0x43, 0x4c, 0x58, 0xaa, 0x02, 0x0d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x2e, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xca, 0x02, 0x0d, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0xe2, 0x02, 0x19, 0x43, 0x6f, 0x73, - 0x6d, 0x6f, 0x73, 0x5c, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x5c, 0x47, 0x50, 0x42, 0x4d, 0x65, - 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0xea, 0x02, 0x0e, 0x43, 0x6f, 0x73, 0x6d, 0x6f, 0x73, 0x3a, - 0x3a, 0x4c, 0x6f, 0x63, 0x6b, 0x75, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, -} - -var ( - file_cosmos_lockup_tx_proto_rawDescOnce sync.Once - file_cosmos_lockup_tx_proto_rawDescData = file_cosmos_lockup_tx_proto_rawDesc -) - -func file_cosmos_lockup_tx_proto_rawDescGZIP() []byte { - file_cosmos_lockup_tx_proto_rawDescOnce.Do(func() { - file_cosmos_lockup_tx_proto_rawDescData = protoimpl.X.CompressGZIP(file_cosmos_lockup_tx_proto_rawDescData) - }) - return file_cosmos_lockup_tx_proto_rawDescData -} - -var file_cosmos_lockup_tx_proto_msgTypes = make([]protoimpl.MessageInfo, 10) -var file_cosmos_lockup_tx_proto_goTypes = []interface{}{ - (*MsgInitLockupAccount)(nil), // 0: cosmos.lockup.MsgInitLockupAccount - (*MsgInitLockupAccountResponse)(nil), // 1: cosmos.lockup.MsgInitLockupAccountResponse - (*MsgInitPeriodicLockingAccount)(nil), // 2: cosmos.lockup.MsgInitPeriodicLockingAccount - (*MsgInitPeriodicLockingAccountResponse)(nil), // 3: cosmos.lockup.MsgInitPeriodicLockingAccountResponse - (*MsgDelegate)(nil), // 4: cosmos.lockup.MsgDelegate - (*MsgUndelegate)(nil), // 5: cosmos.lockup.MsgUndelegate - (*MsgSend)(nil), // 6: cosmos.lockup.MsgSend - (*MsgExecuteMessagesResponse)(nil), // 7: cosmos.lockup.MsgExecuteMessagesResponse - (*MsgWithdraw)(nil), // 8: cosmos.lockup.MsgWithdraw - (*MsgWithdrawResponse)(nil), // 9: cosmos.lockup.MsgWithdrawResponse - (*timestamppb.Timestamp)(nil), // 10: google.protobuf.Timestamp - (*Period)(nil), // 11: cosmos.lockup.Period - (*v1beta1.Coin)(nil), // 12: cosmos.base.v1beta1.Coin - (*anypb.Any)(nil), // 13: google.protobuf.Any -} -var file_cosmos_lockup_tx_proto_depIdxs = []int32{ - 10, // 0: cosmos.lockup.MsgInitLockupAccount.end_time:type_name -> google.protobuf.Timestamp - 10, // 1: cosmos.lockup.MsgInitLockupAccount.start_time:type_name -> google.protobuf.Timestamp - 10, // 2: cosmos.lockup.MsgInitPeriodicLockingAccount.start_time:type_name -> google.protobuf.Timestamp - 11, // 3: cosmos.lockup.MsgInitPeriodicLockingAccount.locking_periods:type_name -> cosmos.lockup.Period - 12, // 4: cosmos.lockup.MsgDelegate.amount:type_name -> cosmos.base.v1beta1.Coin - 12, // 5: cosmos.lockup.MsgUndelegate.amount:type_name -> cosmos.base.v1beta1.Coin - 12, // 6: cosmos.lockup.MsgSend.amount:type_name -> cosmos.base.v1beta1.Coin - 13, // 7: cosmos.lockup.MsgExecuteMessagesResponse.responses:type_name -> google.protobuf.Any - 12, // 8: cosmos.lockup.MsgWithdrawResponse.amount_received:type_name -> cosmos.base.v1beta1.Coin - 9, // [9:9] is the sub-list for method output_type - 9, // [9:9] is the sub-list for method input_type - 9, // [9:9] is the sub-list for extension type_name - 9, // [9:9] is the sub-list for extension extendee - 0, // [0:9] is the sub-list for field type_name -} - -func init() { file_cosmos_lockup_tx_proto_init() } -func file_cosmos_lockup_tx_proto_init() { - if File_cosmos_lockup_tx_proto != nil { - return - } - file_cosmos_lockup_lockup_proto_init() - if !protoimpl.UnsafeEnabled { - file_cosmos_lockup_tx_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitLockupAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitLockupAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitPeriodicLockingAccount); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgInitPeriodicLockingAccountResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgDelegate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgUndelegate); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgSend); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgExecuteMessagesResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdraw); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - file_cosmos_lockup_tx_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*MsgWithdrawResponse); i { - case 0: - return &v.state - case 1: - return &v.sizeCache - case 2: - return &v.unknownFields - default: - return nil - } - } - } - type x struct{} - out := protoimpl.TypeBuilder{ - File: protoimpl.DescBuilder{ - GoPackagePath: reflect.TypeOf(x{}).PkgPath(), - RawDescriptor: file_cosmos_lockup_tx_proto_rawDesc, - NumEnums: 0, - NumMessages: 10, - NumExtensions: 0, - NumServices: 0, - }, - GoTypes: file_cosmos_lockup_tx_proto_goTypes, - DependencyIndexes: file_cosmos_lockup_tx_proto_depIdxs, - MessageInfos: file_cosmos_lockup_tx_proto_msgTypes, - }.Build() - File_cosmos_lockup_tx_proto = out.File - file_cosmos_lockup_tx_proto_rawDesc = nil - file_cosmos_lockup_tx_proto_goTypes = nil - file_cosmos_lockup_tx_proto_depIdxs = nil -} From a82615bdf8057bb491539bc4fdd0143174842282 Mon Sep 17 00:00:00 2001 From: Facundo Medica <14063057+facundomedica@users.noreply.github.com> Date: Mon, 25 Mar 2024 21:42:50 +0100 Subject: [PATCH 17/20] fix: Do not call Remove during Walk - part 2 (#19851) --- CHANGELOG.md | 1 + x/gov/keeper/abci.go | 75 +++++++++++++++++++++-------------- x/staking/keeper/validator.go | 21 ++++++++-- 3 files changed, 64 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1c960cfc29f8..bd68c0a0b9fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -99,6 +99,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (server) [#18994](https://github.com/cosmos/cosmos-sdk/pull/18994) Update server context directly rather than a reference to a sub-object * (crypto) [#19691](https://github.com/cosmos/cosmos-sdk/pull/19691) Fix tx sign doesn't throw an error when incorrect Ledger is used. * [#19833](https://github.com/cosmos/cosmos-sdk/pull/19833) Fix some places in which we call Remove inside a Walk. +* [#19851](https://github.com/cosmos/cosmos-sdk/pull/19851) Fix some places in which we call Remove inside a Walk (x/staking and x/gov). ### API Breaking Changes diff --git a/x/gov/keeper/abci.go b/x/gov/keeper/abci.go index 9234377be88e..4e4052102b31 100644 --- a/x/gov/keeper/abci.go +++ b/x/gov/keeper/abci.go @@ -27,35 +27,45 @@ func (k Keeper) EndBlocker(ctx context.Context) error { // delete dead proposals from store and returns theirs deposits. // A proposal is dead when it's inactive and didn't get enough deposit on time to get into voting phase. rng := collections.NewPrefixUntilPairRange[time.Time, uint64](k.environment.HeaderService.GetHeaderInfo(ctx).Time) - err := k.InactiveProposalsQueue.Walk(ctx, rng, func(key collections.Pair[time.Time, uint64], _ uint64) (bool, error) { - proposal, err := k.Proposals.Get(ctx, key.K2()) + iter, err := k.InactiveProposalsQueue.Iterate(ctx, rng) + if err != nil { + return err + } + + inactiveProps, err := iter.KeyValues() + if err != nil { + return err + } + + for _, prop := range inactiveProps { + proposal, err := k.Proposals.Get(ctx, prop.Key.K2()) if err != nil { // if the proposal has an encoding error, this means it cannot be processed by x/gov // this could be due to some types missing their registration // instead of returning an error (i.e, halting the chain), we fail the proposal if errors.Is(err, collections.ErrEncoding) { - proposal.Id = key.K2() + proposal.Id = prop.Key.K2() if err := failUnsupportedProposal(logger, ctx, k, proposal, err.Error(), false); err != nil { - return false, err + return err } if err = k.DeleteProposal(ctx, proposal.Id); err != nil { - return false, err + return err } - return false, nil + continue } - return false, err + return err } if err = k.DeleteProposal(ctx, proposal.Id); err != nil { - return false, err + return err } params, err := k.Params.Get(ctx) if err != nil { - return false, err + return err } if !params.BurnProposalDepositPrevote { err = k.RefundAndDeleteDeposits(ctx, proposal.Id) // refund deposit if proposal got removed without getting 100% of the proposal @@ -64,7 +74,7 @@ func (k Keeper) EndBlocker(ctx context.Context) error { } if err != nil { - return false, err + return err } // called when proposal become inactive @@ -91,42 +101,49 @@ func (k Keeper) EndBlocker(ctx context.Context) error { "min_deposit", sdk.NewCoins(proposal.GetMinDepositFromParams(params)...).String(), "total_deposit", sdk.NewCoins(proposal.TotalDeposit...).String(), ) + } - return false, nil - }) + // fetch active proposals whose voting periods have ended (are passed the block time) + rng = collections.NewPrefixUntilPairRange[time.Time, uint64](k.environment.HeaderService.GetHeaderInfo(ctx).Time) + + iter, err = k.ActiveProposalsQueue.Iterate(ctx, rng) if err != nil { return err } - // fetch active proposals whose voting periods have ended (are passed the block time) - rng = collections.NewPrefixUntilPairRange[time.Time, uint64](k.environment.HeaderService.GetHeaderInfo(ctx).Time) - err = k.ActiveProposalsQueue.Walk(ctx, rng, func(key collections.Pair[time.Time, uint64], _ uint64) (bool, error) { - proposal, err := k.Proposals.Get(ctx, key.K2()) + activeProps, err := iter.KeyValues() + if err != nil { + return err + } + + // err = k.ActiveProposalsQueue.Walk(ctx, rng, func(key collections.Pair[time.Time, uint64], _ uint64) (bool, error) { + for _, prop := range activeProps { + proposal, err := k.Proposals.Get(ctx, prop.Key.K2()) if err != nil { // if the proposal has an encoding error, this means it cannot be processed by x/gov // this could be due to some types missing their registration // instead of returning an error (i.e, halting the chain), we fail the proposal if errors.Is(err, collections.ErrEncoding) { - proposal.Id = key.K2() + proposal.Id = prop.Key.K2() if err := failUnsupportedProposal(logger, ctx, k, proposal, err.Error(), true); err != nil { - return false, err + return err } if err = k.ActiveProposalsQueue.Remove(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id)); err != nil { - return false, err + return err } - return false, nil + continue } - return false, err + return err } var tagValue, logMsg string passes, burnDeposits, tallyResults, err := k.Tally(ctx, proposal) if err != nil { - return false, err + return err } // Deposits are always burned if tally said so, regardless of the proposal type. @@ -154,7 +171,7 @@ func (k Keeper) EndBlocker(ctx context.Context) error { } if err = k.ActiveProposalsQueue.Remove(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id)); err != nil { - return false, err + return err } switch { @@ -210,14 +227,14 @@ func (k Keeper) EndBlocker(ctx context.Context) error { proposal.Expedited = false // can be removed as never read but kept for state coherence params, err := k.Params.Get(ctx) if err != nil { - return false, err + return err } endTime := proposal.VotingStartTime.Add(*params.VotingPeriod) proposal.VotingEndTime = &endTime err = k.ActiveProposalsQueue.Set(ctx, collections.Join(*proposal.VotingEndTime, proposal.Id), proposal.Id) if err != nil { - return false, err + return err } if proposal.ProposalType == v1.ProposalType_PROPOSAL_TYPE_EXPEDITED { @@ -237,7 +254,7 @@ func (k Keeper) EndBlocker(ctx context.Context) error { proposal.FinalTallyResult = &tallyResults if err = k.Proposals.Set(ctx, proposal.Id, proposal); err != nil { - return false, err + return err } // call hook when proposal become active @@ -264,10 +281,8 @@ func (k Keeper) EndBlocker(ctx context.Context) error { ); err != nil { logger.Error("failed to emit event", "error", err) } - - return false, nil - }) - return err + } + return nil } // executes route(msg) and recovers from panic. diff --git a/x/staking/keeper/validator.go b/x/staking/keeper/validator.go index b8c4472cccb4..6e496f756762 100644 --- a/x/staking/keeper/validator.go +++ b/x/staking/keeper/validator.go @@ -494,9 +494,24 @@ func (k Keeper) UnbondAllMatureValidators(ctx context.Context) error { rng := new(collections.Range[collections.Triple[uint64, time.Time, uint64]]). EndInclusive(collections.Join3(uint64(29), blockTime, blockHeight)) - return k.ValidatorQueue.Walk(ctx, rng, func(key collections.Triple[uint64, time.Time, uint64], value types.ValAddresses) (stop bool, err error) { - return false, k.unbondMatureValidators(ctx, blockHeight, blockTime, key, value) - }) + // get all the values before performing any delete operations + iter, err := k.ValidatorQueue.Iterate(ctx, rng) + if err != nil { + return err + } + + kvs, err := iter.KeyValues() + if err != nil { + return err + } + + for _, kv := range kvs { + if err := k.unbondMatureValidators(ctx, blockHeight, blockTime, kv.Key, kv.Value); err != nil { + return err + } + } + + return nil } func (k Keeper) unbondMatureValidators( From 160c41842e36b313819d0f895b8f18ee9f9f4f2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Toledano?= Date: Tue, 26 Mar 2024 11:29:47 +0100 Subject: [PATCH 18/20] refactor(x/gov)!: remove Accounts.String() (#19850) Co-authored-by: son trinh Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- tests/integration/gov/abci_test.go | 29 ++- tests/sims/gov/operations_test.go | 11 +- x/gov/CHANGELOG.md | 4 + x/gov/client/cli/prompt.go | 21 +- x/gov/client/cli/prompt_test.go | 6 +- x/gov/client/cli/tx.go | 19 +- x/gov/client/cli/tx_test.go | 40 ++-- x/gov/client/cli/util.go | 7 +- x/gov/client/cli/util_test.go | 35 +-- x/gov/client/utils/query.go | 7 +- x/gov/client/utils/query_test.go | 31 +-- x/gov/depinject.go | 6 +- x/gov/keeper/common_test.go | 76 +++++-- x/gov/keeper/deposit.go | 13 +- x/gov/keeper/deposit_test.go | 37 +++- x/gov/keeper/grpc_query_test.go | 122 +++++++---- x/gov/keeper/keeper_test.go | 5 +- x/gov/keeper/msg_server_test.go | 340 ++++++++++++++++++----------- x/gov/keeper/proposal.go | 12 +- x/gov/keeper/proposal_test.go | 37 ++-- x/gov/keeper/tally_test.go | 138 +++++++++--- x/gov/keeper/vote.go | 8 +- x/gov/keeper/vote_test.go | 15 +- x/gov/module.go | 6 +- x/gov/simulation/operations.go | 43 +++- x/gov/types/v1/deposit.go | 4 +- x/gov/types/v1/msgs.go | 12 +- x/gov/types/v1/msgs_test.go | 9 +- x/gov/types/v1/params.go | 2 +- x/gov/types/v1/proposal.go | 4 +- x/gov/types/v1/proposals_test.go | 8 +- x/gov/types/v1/vote.go | 6 +- x/gov/types/v1beta1/deposit.go | 4 +- x/gov/types/v1beta1/msgs.go | 20 +- x/gov/types/v1beta1/msgs_test.go | 8 +- x/group/client/cli/prompt.go | 9 +- x/params/client/cli/tx.go | 6 +- 37 files changed, 774 insertions(+), 386 deletions(-) diff --git a/tests/integration/gov/abci_test.go b/tests/integration/gov/abci_test.go index dbe612a20496..733d7236f9b7 100644 --- a/tests/integration/gov/abci_test.go +++ b/tests/integration/gov/abci_test.go @@ -25,12 +25,14 @@ func TestUnregisteredProposal_InactiveProposalFails(t *testing.T) { suite := createTestSuite(t) ctx := suite.app.BaseApp.NewContext(false) addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens) + addr0Str, err := suite.AccountKeeper.AddressCodec().BytesToString(addrs[0]) + require.NoError(t, err) // manually set proposal in store startTime, endTime := time.Now().Add(-4*time.Hour), ctx.BlockHeader().Time proposal, err := v1.NewProposal([]sdk.Msg{ &v1.Proposal{}, // invalid proposal message - }, 1, startTime, startTime, "", "Unsupported proposal", "Unsupported proposal", addrs[0], v1.ProposalType_PROPOSAL_TYPE_STANDARD) + }, 1, startTime, startTime, "", "Unsupported proposal", "Unsupported proposal", addr0Str, v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) err = suite.GovKeeper.Proposals.Set(ctx, proposal.Id, proposal) @@ -51,12 +53,13 @@ func TestUnregisteredProposal_ActiveProposalFails(t *testing.T) { suite := createTestSuite(t) ctx := suite.app.BaseApp.NewContext(false) addrs := simtestutil.AddTestAddrs(suite.BankKeeper, suite.StakingKeeper, ctx, 10, valTokens) - + addr0Str, err := suite.AccountKeeper.AddressCodec().BytesToString(addrs[0]) + require.NoError(t, err) // manually set proposal in store startTime, endTime := time.Now().Add(-4*time.Hour), ctx.BlockHeader().Time proposal, err := v1.NewProposal([]sdk.Msg{ &v1.Proposal{}, // invalid proposal message - }, 1, startTime, startTime, "", "Unsupported proposal", "Unsupported proposal", addrs[0], v1.ProposalType_PROPOSAL_TYPE_STANDARD) + }, 1, startTime, startTime, "", "Unsupported proposal", "Unsupported proposal", addr0Str, v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) proposal.Status = v1.StatusVotingPeriod proposal.VotingEndTime = &endTime @@ -194,7 +197,9 @@ func TestTickPassedDepositPeriod(t *testing.T) { newHeader.Time = ctx.HeaderInfo().Time.Add(time.Duration(1) * time.Second) ctx = ctx.WithHeaderInfo(newHeader) - newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}) + addr1Str, err := suite.AccountKeeper.AddressCodec().BytesToString(addrs[1]) + require.NoError(t, err) + newDepositMsg := v1.NewMsgDeposit(addr1Str, proposalID, sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 100000)}) res1, err := govMsgSvr.Deposit(ctx, newDepositMsg) require.NoError(t, err) @@ -293,7 +298,9 @@ func TestTickPassedVotingPeriod(t *testing.T) { newHeader.Time = ctx.HeaderInfo().Time.Add(time.Duration(1) * time.Second) ctx = ctx.WithHeaderInfo(newHeader) - newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, proposalCoins) + addr1Str, err := suite.AccountKeeper.AddressCodec().BytesToString(addrs[1]) + require.NoError(t, err) + newDepositMsg := v1.NewMsgDeposit(addr1Str, proposalID, proposalCoins) res1, err := govMsgSvr.Deposit(ctx, newDepositMsg) require.NoError(t, err) @@ -373,7 +380,9 @@ func TestProposalPassedEndblocker(t *testing.T) { require.NoError(t, err) proposalCoins := sdk.Coins{sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 10*depositMultiplier))} - newDepositMsg := v1.NewMsgDeposit(addrs[0], proposal.Id, proposalCoins) + addr0Str, err := suite.AccountKeeper.AddressCodec().BytesToString(addrs[0]) + require.NoError(t, err) + newDepositMsg := v1.NewMsgDeposit(addr0Str, proposal.Id, proposalCoins) res, err := govMsgSvr.Deposit(ctx, newDepositMsg) require.NoError(t, err) @@ -433,7 +442,9 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) { require.NoError(t, err) proposalCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.StakingKeeper.TokensFromConsensusPower(ctx, 10))) - newDepositMsg := v1.NewMsgDeposit(addrs[0], proposal.Id, proposalCoins) + addr0Str, err := suite.AccountKeeper.AddressCodec().BytesToString(addrs[0]) + require.NoError(t, err) + newDepositMsg := v1.NewMsgDeposit(addr0Str, proposal.Id, proposalCoins) govMsgSvr := keeper.NewMsgServerImpl(suite.GovKeeper) res, err := govMsgSvr.Deposit(ctx, newDepositMsg) @@ -531,7 +542,9 @@ func TestExpeditedProposal_PassAndConversionToRegular(t *testing.T) { newHeader.Time = ctx.HeaderInfo().Time.Add(time.Duration(1) * time.Second) ctx = ctx.WithHeaderInfo(newHeader) - newDepositMsg := v1.NewMsgDeposit(addrs[1], proposalID, proposalCoins) + addr1Str, err := suite.AccountKeeper.AddressCodec().BytesToString(addrs[1]) + require.NoError(t, err) + newDepositMsg := v1.NewMsgDeposit(addr1Str, proposalID, proposalCoins) res1, err := govMsgSvr.Deposit(ctx, newDepositMsg) require.NoError(t, err) diff --git a/tests/sims/gov/operations_test.go b/tests/sims/gov/operations_test.go index 581b6637467a..239049e76bc9 100644 --- a/tests/sims/gov/operations_test.go +++ b/tests/sims/gov/operations_test.go @@ -207,7 +207,8 @@ func TestSimulateMsgCancelProposal(t *testing.T) { r := rand.New(s) accounts := getTestingAccounts(t, r, suite.AccountKeeper, suite.BankKeeper, suite.StakingKeeper, ctx, 3) // setup a proposal - proposer := accounts[0].Address + proposer, err := suite.AccountKeeper.AddressCodec().BytesToString(accounts[0].Address) + require.NoError(t, err) content := v1beta1.NewTextProposal("Test", "description") contentMsg, err := v1.NewLegacyContent(content, suite.GovKeeper.GetGovernanceAccount(ctx).GetAddress().String()) require.NoError(t, err) @@ -233,7 +234,7 @@ func TestSimulateMsgCancelProposal(t *testing.T) { require.NoError(t, err) require.True(t, operationMsg.OK) require.Equal(t, uint64(1), msg.ProposalId) - require.Equal(t, proposer.String(), msg.Proposer) + require.Equal(t, proposer, msg.Proposer) require.Equal(t, simulation.TypeMsgCancelProposal, sdk.MsgTypeURL(&msg)) } @@ -259,7 +260,7 @@ func TestSimulateMsgDeposit(t *testing.T) { params, _ := suite.GovKeeper.Params.Get(ctx) depositPeriod := params.MaxDepositPeriod - proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_STANDARD) + proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) err = suite.GovKeeper.Proposals.Set(ctx, proposal.Id, proposal) @@ -303,7 +304,7 @@ func TestSimulateMsgVote(t *testing.T) { params, _ := suite.GovKeeper.Params.Get(ctx) depositPeriod := params.MaxDepositPeriod - proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_STANDARD) + proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "description", "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) err = suite.GovKeeper.ActivateVotingPeriod(ctx, proposal) @@ -345,7 +346,7 @@ func TestSimulateMsgVoteWeighted(t *testing.T) { params, _ := suite.GovKeeper.Params.Get(ctx) depositPeriod := params.MaxDepositPeriod - proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "test", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_STANDARD) + proposal, err := v1.NewProposal([]sdk.Msg{contentMsg}, 1, submitTime, submitTime.Add(*depositPeriod), "", "text proposal", "test", "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) err = suite.GovKeeper.ActivateVotingPeriod(ctx, proposal) diff --git a/x/gov/CHANGELOG.md b/x/gov/CHANGELOG.md index 4859161e7758..722c5f5f780b 100644 --- a/x/gov/CHANGELOG.md +++ b/x/gov/CHANGELOG.md @@ -62,6 +62,10 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### API Breaking Changes +* [#19850](https://github.com/cosmos/cosmos-sdk/pull/19850) Removes the use of Accounts String method: + * `NewDeposit`, `NewMsgDeposit`, `NewMsgVote`, `NewMsgVoteWeighted`, `NewVote`, `NewProposal`, `NewMsgSubmitProposal` now take a string as an argument instead of an `sdk.AccAddress`. + * `Prompt` and `PromptMetadata` take an address.Codec as arguments. + * `SetProposer` takes a String as an argument instead of a `fmt.Stringer`. * [#19481](https://github.com/cosmos/cosmos-sdk/pull/19481) Migrate module to use `appmodule.Environment`; `NewKeeper` now takes `appmodule.Environment` instead of a store service and no `baseapp.MessageRouter` anymore. * [#19481](https://github.com/cosmos/cosmos-sdk/pull/19481) v1beta1 proposal handlers now take a `context.Context` instead of an `sdk.Context`. * [#19592](https://github.com/cosmos/cosmos-sdk/pull/19592) `types.Config` and `types.DefaultConfig` have been moved to the keeper package in order to support the custom tallying function. diff --git a/x/gov/client/cli/prompt.go b/x/gov/client/cli/prompt.go index 8ab8a823cdcb..bb6706479bf1 100644 --- a/x/gov/client/cli/prompt.go +++ b/x/gov/client/cli/prompt.go @@ -12,6 +12,7 @@ import ( "github.com/manifoldco/promptui" "github.com/spf13/cobra" + "cosmossdk.io/core/address" authtypes "cosmossdk.io/x/auth/types" "cosmossdk.io/x/gov/types" @@ -64,7 +65,7 @@ var suggestedProposalTypes = []proposalType{ // namePrefix is the name to be displayed as "Enter " // TODO: when bringing this in autocli, use proto message instead // this will simplify the get address logic -func Prompt[T any](data T, namePrefix string) (T, error) { +func Prompt[T any](data T, namePrefix string, addressCodec address.Codec) (T, error) { v := reflect.ValueOf(&data).Elem() if v.Kind() == reflect.Interface { v = reflect.ValueOf(data) @@ -95,7 +96,11 @@ func Prompt[T any](data T, namePrefix string) (T, error) { if strings.EqualFold(fieldName, "authority") { // pre-fill with gov address - prompt.Default = authtypes.NewModuleAddress(types.ModuleName).String() + defaultAddr, err := addressCodec.BytesToString(authtypes.NewModuleAddress(types.ModuleName)) + if err != nil { + return data, err + } + prompt.Default = defaultAddr prompt.Validate = client.ValidatePromptAddress } @@ -158,8 +163,8 @@ type proposalType struct { } // Prompt the proposal type values and return the proposal and its metadata -func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool) (*proposal, types.ProposalMetadata, error) { - metadata, err := PromptMetadata(skipMetadata) +func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool, addressCodec address.Codec) (*proposal, types.ProposalMetadata, error) { + metadata, err := PromptMetadata(skipMetadata, addressCodec) if err != nil { return nil, metadata, fmt.Errorf("failed to set proposal metadata: %w", err) } @@ -185,7 +190,7 @@ func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool) (*proposal, ty } // set messages field - result, err := Prompt(p.Msg, "msg") + result, err := Prompt(p.Msg, "msg", addressCodec) if err != nil { return nil, metadata, fmt.Errorf("failed to set proposal message: %w", err) } @@ -209,9 +214,9 @@ func getProposalSuggestions() []string { } // PromptMetadata prompts for proposal metadata or only title and summary if skip is true -func PromptMetadata(skip bool) (types.ProposalMetadata, error) { +func PromptMetadata(skip bool, addressCodec address.Codec) (types.ProposalMetadata, error) { if !skip { - metadata, err := Prompt(types.ProposalMetadata{}, "proposal") + metadata, err := Prompt(types.ProposalMetadata{}, "proposal", addressCodec) if err != nil { return metadata, fmt.Errorf("failed to set proposal metadata: %w", err) } @@ -306,7 +311,7 @@ func NewCmdDraftProposal() *cobra.Command { skipMetadataPrompt, _ := cmd.Flags().GetBool(flagSkipMetadata) - result, metadata, err := proposal.Prompt(clientCtx.Codec, skipMetadataPrompt) + result, metadata, err := proposal.Prompt(clientCtx.Codec, skipMetadataPrompt, clientCtx.AddressCodec) if err != nil { return err } diff --git a/x/gov/client/cli/prompt_test.go b/x/gov/client/cli/prompt_test.go index cfb23272a184..89110536d7e1 100644 --- a/x/gov/client/cli/prompt_test.go +++ b/x/gov/client/cli/prompt_test.go @@ -18,6 +18,8 @@ import ( "github.com/stretchr/testify/require" "cosmossdk.io/x/gov/client/cli" + + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" ) type st struct { @@ -50,7 +52,7 @@ func TestPromptIntegerOverflow(t *testing.T) { _, err := fw.Write([]byte(overflowStr + "\n")) assert.NoError(t, err) - v, err := cli.Prompt(st{}, "") + v, err := cli.Prompt(st{}, "", codectestutil.CodecOptions{}.GetAddressCodec()) assert.Equal(t, st{}, v, "expected a value of zero") require.NotNil(t, err, "expected a report of an overflow") require.Contains(t, err.Error(), "range") @@ -81,7 +83,7 @@ func TestPromptParseInteger(t *testing.T) { readline.Stdin = fin _, err := fw.Write([]byte(tc.in + "\n")) assert.NoError(t, err) - v, err := cli.Prompt(st{}, "") + v, err := cli.Prompt(st{}, "", codectestutil.CodecOptions{}.GetAddressCodec()) assert.Nil(t, err, "expected a nil error") assert.Equal(t, tc.want, v.I, "expected %d = %d", tc.want, v.I) }) diff --git a/x/gov/client/cli/tx.go b/x/gov/client/cli/tx.go index d63e0dc24118..cdd56d144a78 100644 --- a/x/gov/client/cli/tx.go +++ b/x/gov/client/cli/tx.go @@ -138,7 +138,12 @@ metadata example: return err } - msg, err := v1.NewMsgSubmitProposal(msgs, deposit, clientCtx.GetFromAddress().String(), proposal.Metadata, proposal.Title, proposal.Summary, proposal.proposalType) + addr, err := clientCtx.AddressCodec.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + msg, err := v1.NewMsgSubmitProposal(msgs, deposit, addr, proposal.Metadata, proposal.Title, proposal.Summary, proposal.proposalType) if err != nil { return fmt.Errorf("invalid message: %w", err) } @@ -203,7 +208,12 @@ $ %s tx gov submit-legacy-proposal --title="Test Proposal" --description="My awe return fmt.Errorf("failed to create proposal content: unknown proposal type %s", proposal.Type) } - msg, err := v1beta1.NewMsgSubmitProposal(content, amount, clientCtx.GetFromAddress()) + proposer, err := clientCtx.AddressCodec.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + + msg, err := v1beta1.NewMsgSubmitProposal(content, amount, proposer) if err != nil { return fmt.Errorf("invalid message: %w", err) } @@ -247,7 +257,10 @@ $ %s tx gov weighted-vote 1 yes=0.6,no=0.3,abstain=0.05,no-with-veto=0.05 --from } // Get voter address - from := clientCtx.GetFromAddress() + from, err := clientCtx.AddressCodec.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } // validate that the proposal id is a uint proposalID, err := strconv.ParseUint(args[0], 10, 64) diff --git a/x/gov/client/cli/tx_test.go b/x/gov/client/cli/tx_test.go index dd903034e109..744f990653e1 100644 --- a/x/gov/client/cli/tx_test.go +++ b/x/gov/client/cli/tx_test.go @@ -68,35 +68,39 @@ func (s *CLITestSuite) SetupSuite() { s.clientCtx = ctxGen() val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + val0StrAddr, err := s.clientCtx.AddressCodec.BytesToString(val[0].Address) + s.Require().NoError(err) // create a proposal with deposit - _, err := govclitestutil.MsgSubmitLegacyProposal(s.clientCtx, val[0].Address.String(), + _, err = govclitestutil.MsgSubmitLegacyProposal(s.clientCtx, val0StrAddr, "Text Proposal 1", "Where is the title!?", v1beta1.ProposalTypeText, fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin("stake", v1.DefaultMinDepositTokens).String())) s.Require().NoError(err) // vote for proposal - _, err = govclitestutil.MsgVote(s.clientCtx, val[0].Address.String(), "1", "yes") + _, err = govclitestutil.MsgVote(s.clientCtx, val0StrAddr, "1", "yes") s.Require().NoError(err) // create a proposal without deposit - _, err = govclitestutil.MsgSubmitLegacyProposal(s.clientCtx, val[0].Address.String(), + _, err = govclitestutil.MsgSubmitLegacyProposal(s.clientCtx, val0StrAddr, "Text Proposal 2", "Where is the title!?", v1beta1.ProposalTypeText) s.Require().NoError(err) // create a proposal3 with deposit - _, err = govclitestutil.MsgSubmitLegacyProposal(s.clientCtx, val[0].Address.String(), + _, err = govclitestutil.MsgSubmitLegacyProposal(s.clientCtx, val0StrAddr, "Text Proposal 3", "Where is the title!?", v1beta1.ProposalTypeText, fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin("stake", v1.DefaultMinDepositTokens).String())) s.Require().NoError(err) // vote for proposal3 as val - _, err = govclitestutil.MsgVote(s.clientCtx, val[0].Address.String(), "3", "yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05") + _, err = govclitestutil.MsgVote(s.clientCtx, val0StrAddr, "3", "yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05") s.Require().NoError(err) } func (s *CLITestSuite) TestNewCmdSubmitProposal() { val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + val0StrAddr, err := s.clientCtx.AddressCodec.BytesToString(val[0].Address) + s.Require().NoError(err) // Create a legacy proposal JSON, make sure it doesn't pass this new CLI // command. @@ -150,7 +154,7 @@ func (s *CLITestSuite) TestNewCmdSubmitProposal() { "valid proposal", []string{ validPropFile.Name(), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), @@ -180,6 +184,8 @@ func (s *CLITestSuite) TestNewCmdSubmitProposal() { func (s *CLITestSuite) TestNewCmdSubmitLegacyProposal() { val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + val0StrAddr, err := s.clientCtx.AddressCodec.BytesToString(val[0].Address) + s.Require().NoError(err) invalidProp := `{ "title": "", @@ -207,7 +213,7 @@ func (s *CLITestSuite) TestNewCmdSubmitLegacyProposal() { "invalid proposal (file)", []string{ fmt.Sprintf("--%s=%s", cli.FlagProposal, invalidPropFile.Name()), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), }, @@ -219,7 +225,7 @@ func (s *CLITestSuite) TestNewCmdSubmitLegacyProposal() { fmt.Sprintf("--%s='Where is the title!?'", cli.FlagDescription), fmt.Sprintf("--%s=%s", cli.FlagProposalType, v1beta1.ProposalTypeText), fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin("stake", sdkmath.NewInt(5431)).String()), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), }, @@ -230,7 +236,7 @@ func (s *CLITestSuite) TestNewCmdSubmitLegacyProposal() { []string{ fmt.Sprintf("--%s=%s", cli.FlagProposal, validPropFile.Name()), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), @@ -244,7 +250,7 @@ func (s *CLITestSuite) TestNewCmdSubmitLegacyProposal() { fmt.Sprintf("--%s='Where is the title!?'", cli.FlagDescription), fmt.Sprintf("--%s=%s", cli.FlagProposalType, v1beta1.ProposalTypeText), fmt.Sprintf("--%s=%s", cli.FlagDeposit, sdk.NewCoin("stake", sdkmath.NewInt(5431)).String()), - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), @@ -274,6 +280,8 @@ func (s *CLITestSuite) TestNewCmdSubmitLegacyProposal() { func (s *CLITestSuite) TestNewCmdWeightedVote() { val := testutil.CreateKeyringAccounts(s.T(), s.kr, 1) + val0StrAddr, err := s.clientCtx.AddressCodec.BytesToString(val[0].Address) + s.Require().NoError(err) testCases := []struct { name string @@ -285,7 +293,7 @@ func (s *CLITestSuite) TestNewCmdWeightedVote() { []string{ "abc", "yes", - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), @@ -297,7 +305,7 @@ func (s *CLITestSuite) TestNewCmdWeightedVote() { []string{ "1", "AYE", - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), @@ -309,7 +317,7 @@ func (s *CLITestSuite) TestNewCmdWeightedVote() { []string{ "1", "yes", - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), @@ -321,7 +329,7 @@ func (s *CLITestSuite) TestNewCmdWeightedVote() { []string{ "1", "yes", - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--metadata=%s", "AQ=="), @@ -334,7 +342,7 @@ func (s *CLITestSuite) TestNewCmdWeightedVote() { []string{ "1", "yes/0.6,no/0.3,abstain/0.05,no_with_veto/0.05", - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), @@ -346,7 +354,7 @@ func (s *CLITestSuite) TestNewCmdWeightedVote() { []string{ "1", "yes=0.6,no=0.3,abstain=0.05,no_with_veto=0.05", - fmt.Sprintf("--%s=%s", flags.FlagFrom, val[0].Address.String()), + fmt.Sprintf("--%s=%s", flags.FlagFrom, val0StrAddr), fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))).String()), diff --git a/x/gov/client/cli/util.go b/x/gov/client/cli/util.go index 760a6344683a..562b26f59328 100644 --- a/x/gov/client/cli/util.go +++ b/x/gov/client/cli/util.go @@ -201,5 +201,10 @@ func ReadGovPropCmdFlags(proposer string, flagSet *pflag.FlagSet) (*govv1.MsgSub // See also AddGovPropFlagsToCmd. // Deprecated: use ReadPropCmdFlags instead, as this depends on global bech32 prefixes. func ReadGovPropFlags(clientCtx client.Context, flagSet *pflag.FlagSet) (*govv1.MsgSubmitProposal, error) { - return ReadGovPropCmdFlags(clientCtx.GetFromAddress().String(), flagSet) + addr, err := clientCtx.AddressCodec.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return nil, err + } + + return ReadGovPropCmdFlags(addr, flagSet) } diff --git a/x/gov/client/cli/util_test.go b/x/gov/client/cli/util_test.go index 702d6d448ef6..2601a526fe1b 100644 --- a/x/gov/client/cli/util_test.go +++ b/x/gov/client/cli/util_test.go @@ -21,6 +21,7 @@ import ( "github.com/cosmos/cosmos-sdk/client" "github.com/cosmos/cosmos-sdk/codec" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" codectypes "github.com/cosmos/cosmos-sdk/codec/types" "github.com/cosmos/cosmos-sdk/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -147,6 +148,9 @@ func TestParseSubmitLegacyProposal(t *testing.T) { func TestParseSubmitProposal(t *testing.T) { _, _, addr := testdata.KeyTestPubAddr() + addrStr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(addr) + require.NoError(t, err) + interfaceRegistry := codectypes.NewInterfaceRegistry() cdc := codec.NewProtoCodec(interfaceRegistry) banktypes.RegisterInterfaces(interfaceRegistry) @@ -191,7 +195,7 @@ func TestParseSubmitProposal(t *testing.T) { badJSON := testutil.WriteToNewTempFile(t, "bad json") // nonexistent json - _, _, _, err := parseSubmitProposal(cdc, "fileDoesNotExist") + _, _, _, err = parseSubmitProposal(cdc, "fileDoesNotExist") require.Error(t, err) // invalid json @@ -206,17 +210,17 @@ func TestParseSubmitProposal(t *testing.T) { require.Len(t, msgs, 3) msg1, ok := msgs[0].(*banktypes.MsgSend) require.True(t, ok) - require.Equal(t, addr.String(), msg1.FromAddress) - require.Equal(t, addr.String(), msg1.ToAddress) + require.Equal(t, addrStr, msg1.FromAddress) + require.Equal(t, addrStr, msg1.ToAddress) require.Equal(t, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10))), msg1.Amount) msg2, ok := msgs[1].(*stakingtypes.MsgDelegate) require.True(t, ok) - require.Equal(t, addr.String(), msg2.DelegatorAddress) - require.Equal(t, addr.String(), msg2.ValidatorAddress) + require.Equal(t, addrStr, msg2.DelegatorAddress) + require.Equal(t, addrStr, msg2.ValidatorAddress) require.Equal(t, sdk.NewCoin("stake", sdkmath.NewInt(10)), msg2.Amount) msg3, ok := msgs[2].(*v1.MsgExecLegacyContent) require.True(t, ok) - require.Equal(t, addr.String(), msg3.Authority) + require.Equal(t, addrStr, msg3.Authority) textProp, ok := msg3.Content.GetCachedValue().(*v1beta1.TextProposal) require.True(t, ok) require.Equal(t, "My awesome title", textProp.Title) @@ -300,6 +304,8 @@ func TestReadGovPropFlags(t *testing.T) { argTitle := "--" + FlagTitle argSummary := "--" + FlagSummary + fromAddrStr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(fromAddr) + require.NoError(t, err) // cz is a shorter way to define coins objects for these tests. cz := func(coins string) sdk.Coins { rv, err := sdk.ParseCoinsNormalized(coins) @@ -332,7 +338,7 @@ func TestReadGovPropFlags(t *testing.T) { args: []string{}, exp: &v1.MsgSubmitProposal{ InitialDeposit: nil, - Proposer: fromAddr.String(), + Proposer: fromAddrStr, Metadata: "", Title: "", Summary: "", @@ -547,7 +553,7 @@ func TestReadGovPropFlags(t *testing.T) { }, exp: &v1.MsgSubmitProposal{ InitialDeposit: cz("56depcoin"), - Proposer: fromAddr.String(), + Proposer: fromAddrStr, Metadata: "my proposal is cool", Title: "Simple Gov Prop Title", Summary: "This is just a test summary on a simple gov prop.", @@ -564,7 +570,7 @@ func TestReadGovPropFlags(t *testing.T) { }, exp: &v1.MsgSubmitProposal{ InitialDeposit: cz("78coolcoin"), - Proposer: fromAddr.String(), + Proposer: fromAddrStr, Metadata: "this proposal is cooler", Title: "This title is a *bit* more complex.", Summary: "This\nis\na\ncrazy\nsummary", @@ -614,7 +620,7 @@ func TestReadGovPropFlags(t *testing.T) { }, exp: &v1.MsgSubmitProposal{ InitialDeposit: nil, - Proposer: fromAddr.String(), + Proposer: fromAddrStr, Metadata: "worthless metadata", Title: "This is a Title", Summary: "This is a useless summary", @@ -631,7 +637,7 @@ func TestReadGovPropFlags(t *testing.T) { }, exp: &v1.MsgSubmitProposal{ InitialDeposit: cz("99mdcoin"), - Proposer: fromAddr.String(), + Proposer: fromAddrStr, Metadata: "", Title: "Bland Title", Summary: "Boring summary", @@ -647,7 +653,7 @@ func TestReadGovPropFlags(t *testing.T) { }, exp: &v1.MsgSubmitProposal{ InitialDeposit: cz("71whatcoin"), - Proposer: fromAddr.String(), + Proposer: fromAddrStr, Metadata: "this metadata does not have the title either", Title: "", Summary: "This is a summary on a titleless proposal.", @@ -664,7 +670,7 @@ func TestReadGovPropFlags(t *testing.T) { }, exp: &v1.MsgSubmitProposal{ InitialDeposit: cz("42musiccoin"), - Proposer: fromAddr.String(), + Proposer: fromAddrStr, Metadata: "28", Title: "Now This is What I Call A Governance Proposal 28", Summary: "", @@ -687,7 +693,8 @@ func TestReadGovPropFlags(t *testing.T) { flagSet := cmd.Flags() clientCtx := client.Context{ - FromAddress: tc.fromAddr, + FromAddress: tc.fromAddr, + AddressCodec: codectestutil.CodecOptions{}.GetAddressCodec(), } var msg *v1.MsgSubmitProposal diff --git a/x/gov/client/utils/query.go b/x/gov/client/utils/query.go index 6043c2823248..fdc5354f1f23 100644 --- a/x/gov/client/utils/query.go +++ b/x/gov/client/utils/query.go @@ -120,8 +120,13 @@ type QueryVoteParams struct { // QueryVoteByTxQuery will query for a single vote via a direct txs tags query. func QueryVoteByTxQuery(clientCtx client.Context, params QueryVoteParams) ([]byte, error) { + voterAddr, err := clientCtx.AddressCodec.BytesToString(params.Voter) + if err != nil { + return nil, err + } + q1 := fmt.Sprintf("%s.%s='%d'", types.EventTypeProposalVote, types.AttributeKeyProposalID, params.ProposalID) - q2 := fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeySender, params.Voter.String()) + q2 := fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeySender, voterAddr) q3 := fmt.Sprintf("%s.%s='%s'", sdk.EventTypeMessage, sdk.AttributeKeySender, params.Voter) searchResult, err := authtx.QueryTxsByEvents(clientCtx, defaultPage, defaultLimit, fmt.Sprintf("%s AND (%s OR %s)", q1, q2, q3), "") if err != nil { diff --git a/x/gov/client/utils/query_test.go b/x/gov/client/utils/query_test.go index 5c0aed3ac7fa..be2ffb621994 100644 --- a/x/gov/client/utils/query_test.go +++ b/x/gov/client/utils/query_test.go @@ -55,7 +55,8 @@ func (mock TxSearchMock) Block(ctx context.Context, height *int64) (*coretypes.R } func TestGetPaginatedVotes(t *testing.T) { - encCfg := moduletestutil.MakeTestEncodingConfig(codectestutil.CodecOptions{}, gov.AppModule{}) + cdcOpts := codectestutil.CodecOptions{} + encCfg := moduletestutil.MakeTestEncodingConfig(cdcOpts, gov.AppModule{}) type testCase struct { description string @@ -65,16 +66,20 @@ func TestGetPaginatedVotes(t *testing.T) { } acc1 := make(sdk.AccAddress, 20) acc1[0] = 1 + acc1Str, err := cdcOpts.GetAddressCodec().BytesToString(acc1) + require.NoError(t, err) acc2 := make(sdk.AccAddress, 20) acc2[0] = 2 + acc2Str, err := cdcOpts.GetAddressCodec().BytesToString(acc2) + require.NoError(t, err) acc1Msgs := []sdk.Msg{ - v1.NewMsgVote(acc1, 0, v1.OptionYes, ""), - v1.NewMsgVote(acc1, 0, v1.OptionYes, ""), - v1.NewMsgDeposit(acc1, 0, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10)))), // should be ignored + v1.NewMsgVote(acc1Str, 0, v1.OptionYes, ""), + v1.NewMsgVote(acc1Str, 0, v1.OptionYes, ""), + v1.NewMsgDeposit(acc1Str, 0, sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(10)))), // should be ignored } acc2Msgs := []sdk.Msg{ - v1.NewMsgVote(acc2, 0, v1.OptionYes, ""), - v1.NewMsgVoteWeighted(acc2, 0, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + v1.NewMsgVote(acc2Str, 0, v1.OptionYes, ""), + v1.NewMsgVoteWeighted(acc2Str, 0, v1.NewNonSplitVoteOption(v1.OptionYes), ""), } for _, tc := range []testCase{ { @@ -86,8 +91,8 @@ func TestGetPaginatedVotes(t *testing.T) { acc2Msgs[:1], }, votes: []v1.Vote{ - v1.NewVote(0, acc1, v1.NewNonSplitVoteOption(v1.OptionYes), ""), - v1.NewVote(0, acc2, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + v1.NewVote(0, acc1Str, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + v1.NewVote(0, acc2Str, v1.NewNonSplitVoteOption(v1.OptionYes), ""), }, }, { @@ -99,8 +104,8 @@ func TestGetPaginatedVotes(t *testing.T) { acc2Msgs, }, votes: []v1.Vote{ - v1.NewVote(0, acc1, v1.NewNonSplitVoteOption(v1.OptionYes), ""), - v1.NewVote(0, acc1, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + v1.NewVote(0, acc1Str, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + v1.NewVote(0, acc1Str, v1.NewNonSplitVoteOption(v1.OptionYes), ""), }, }, { @@ -112,8 +117,8 @@ func TestGetPaginatedVotes(t *testing.T) { acc2Msgs, }, votes: []v1.Vote{ - v1.NewVote(0, acc2, v1.NewNonSplitVoteOption(v1.OptionYes), ""), - v1.NewVote(0, acc2, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + v1.NewVote(0, acc2Str, v1.NewNonSplitVoteOption(v1.OptionYes), ""), + v1.NewVote(0, acc2Str, v1.NewNonSplitVoteOption(v1.OptionYes), ""), }, }, { @@ -123,7 +128,7 @@ func TestGetPaginatedVotes(t *testing.T) { msgs: [][]sdk.Msg{ acc1Msgs[:1], }, - votes: []v1.Vote{v1.NewVote(0, acc1, v1.NewNonSplitVoteOption(v1.OptionYes), "")}, + votes: []v1.Vote{v1.NewVote(0, acc1Str, v1.NewNonSplitVoteOption(v1.OptionYes), "")}, }, { description: "InvalidPage", diff --git a/x/gov/depinject.go b/x/gov/depinject.go index 0a24603c421c..72f9b4767169 100644 --- a/x/gov/depinject.go +++ b/x/gov/depinject.go @@ -76,6 +76,10 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { if in.Config.Authority != "" { authority = authtypes.NewModuleAddressOrBech32Address(in.Config.Authority) } + authorityAddr, err := in.AccountKeeper.AddressCodec().BytesToString(authority) + if err != nil { + panic(err) + } k := keeper.NewKeeper( in.Cdc, @@ -85,7 +89,7 @@ func ProvideModule(in ModuleInputs) ModuleOutputs { in.StakingKeeper, in.PoolKeeper, defaultConfig, - authority.String(), + authorityAddr, ) m := NewAppModule(in.Cdc, k, in.AccountKeeper, in.BankKeeper, in.PoolKeeper, in.LegacyProposalHandler...) hr := v1beta1.HandlerRoute{Handler: v1beta1.ProposalHandler, RouteKey: govtypes.RouterKey} diff --git a/x/gov/keeper/common_test.go b/x/gov/keeper/common_test.go index 1ab164143397..3e1be306d15f 100644 --- a/x/gov/keeper/common_test.go +++ b/x/gov/keeper/common_test.go @@ -35,7 +35,6 @@ var ( govAcct = authtypes.NewModuleAddress(types.ModuleName) poolAcct = authtypes.NewModuleAddress(protocolModuleName) govAcctStr = "cosmos10d07y265gmmuvt4z0w9aw880jnsr700j6zn9kn" - addrStr = addr.String() TestProposal = getTestProposal() ) @@ -49,7 +48,17 @@ const ( // getTestProposal creates and returns a test proposal message. func getTestProposal() []sdk.Msg { - legacyProposalMsg, err := v1.NewLegacyContent(v1beta1.NewTextProposal("Title", "description"), authtypes.NewModuleAddress(types.ModuleName).String()) + moduleAddr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(authtypes.NewModuleAddress(types.ModuleName)) + if err != nil { + panic(err) + } + + legacyProposalMsg, err := v1.NewLegacyContent(v1beta1.NewTextProposal("Title", "description"), moduleAddr) + if err != nil { + panic(err) + } + + addrStr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(addr) if err != nil { panic(err) } @@ -74,9 +83,12 @@ func mockAccountKeeperExpectations(ctx sdk.Context, m mocks) { m.acctKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() } -func mockDefaultExpectations(ctx sdk.Context, m mocks) { +func mockDefaultExpectations(ctx sdk.Context, m mocks) error { mockAccountKeeperExpectations(ctx, m) - trackMockBalances(m.bankKeeper) + err := trackMockBalances(m.bankKeeper) + if err != nil { + return err + } m.stakingKeeper.EXPECT().TokensFromConsensusPower(ctx, gomock.Any()).DoAndReturn(func(ctx sdk.Context, power int64) math.Int { return sdk.TokensFromConsensusPower(power, math.NewIntFromUint64(1000000)) }).AnyTimes() @@ -85,6 +97,7 @@ func mockDefaultExpectations(ctx sdk.Context, m mocks) { m.stakingKeeper.EXPECT().IterateBondedValidatorsByPower(gomock.Any(), gomock.Any()).AnyTimes() m.stakingKeeper.EXPECT().IterateDelegations(gomock.Any(), gomock.Any(), gomock.Any()).AnyTimes() m.stakingKeeper.EXPECT().TotalBondedTokens(gomock.Any()).Return(math.NewInt(10000000), nil).AnyTimes() + return nil } // setupGovKeeper creates a govKeeper as well as all its dependencies. @@ -124,21 +137,24 @@ func setupGovKeeper(t *testing.T, expectations ...func(sdk.Context, mocks)) ( poolKeeper: govtestutil.NewMockPoolKeeper(ctrl), } if len(expectations) == 0 { - mockDefaultExpectations(ctx, m) + err := mockDefaultExpectations(ctx, m) + require.NoError(t, err) } else { for _, exp := range expectations { exp(ctx, m) } } - // Gov keeper initializations + govAddr, err := m.acctKeeper.AddressCodec().BytesToString(govAcct) + require.NoError(t, err) - govKeeper := keeper.NewKeeper(encCfg.Codec, environment, m.acctKeeper, m.bankKeeper, m.stakingKeeper, m.poolKeeper, keeper.DefaultConfig(), govAcct.String()) + // Gov keeper initializations + govKeeper := keeper.NewKeeper(encCfg.Codec, environment, m.acctKeeper, m.bankKeeper, m.stakingKeeper, m.poolKeeper, keeper.DefaultConfig(), govAddr) require.NoError(t, govKeeper.ProposalID.Set(ctx, 1)) govRouter := v1beta1.NewRouter() // Also register legacy gov handlers to test them too. govRouter.AddRoute(types.RouterKey, v1beta1.ProposalHandler) govKeeper.SetLegacyRouter(govRouter) - err := govKeeper.Params.Set(ctx, v1.DefaultParams()) + err = govKeeper.Params.Set(ctx, v1.DefaultParams()) require.NoError(t, err) err = govKeeper.Constitution.Set(ctx, "constitution") require.NoError(t, err) @@ -152,9 +168,14 @@ func setupGovKeeper(t *testing.T, expectations ...func(sdk.Context, mocks)) ( // trackMockBalances sets up expected calls on the Mock BankKeeper, and also // locally tracks accounts balances (not modules balances). -func trackMockBalances(bankKeeper *govtestutil.MockBankKeeper) { +func trackMockBalances(bankKeeper *govtestutil.MockBankKeeper) error { + addressCdc := codectestutil.CodecOptions{}.GetAddressCodec() + poolAcctStr, err := addressCdc.BytesToString(poolAcct) + if err != nil { + return err + } balances := make(map[string]sdk.Coins) - balances[poolAcct.String()] = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0))) + balances[poolAcctStr] = sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0))) // We don't track module account balances. bankKeeper.EXPECT().MintCoins(gomock.Any(), mintModuleName, gomock.Any()).AnyTimes() @@ -163,27 +184,44 @@ func trackMockBalances(bankKeeper *govtestutil.MockBankKeeper) { // But we do track normal account balances. bankKeeper.EXPECT().SendCoinsFromAccountToModule(gomock.Any(), gomock.Any(), types.ModuleName, gomock.Any()).DoAndReturn(func(_ sdk.Context, sender sdk.AccAddress, _ string, coins sdk.Coins) error { - newBalance, negative := balances[sender.String()].SafeSub(coins...) + senderAddr, err := addressCdc.BytesToString(sender) + if err != nil { + return err + } + newBalance, negative := balances[senderAddr].SafeSub(coins...) if negative { return fmt.Errorf("not enough balance") } - balances[sender.String()] = newBalance + balances[senderAddr] = newBalance return nil }).AnyTimes() bankKeeper.EXPECT().SendCoinsFromModuleToAccount(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).DoAndReturn(func(_ sdk.Context, module string, rcpt sdk.AccAddress, coins sdk.Coins) error { - balances[rcpt.String()] = balances[rcpt.String()].Add(coins...) + rcptAddr, err := addressCdc.BytesToString(rcpt) + if err != nil { + return err + } + balances[rcptAddr] = balances[rcptAddr].Add(coins...) return nil }).AnyTimes() - bankKeeper.EXPECT().GetAllBalances(gomock.Any(), gomock.Any()).DoAndReturn(func(_ sdk.Context, addr sdk.AccAddress) sdk.Coins { - return balances[addr.String()] + bankKeeper.EXPECT().GetAllBalances(gomock.Any(), gomock.Any()).DoAndReturn(func(_ sdk.Context, addr sdk.AccAddress) (sdk.Coins, error) { + addrStr, err := addressCdc.BytesToString(addr) + if err != nil { + return sdk.Coins{}, err + } + return balances[addrStr], nil }).AnyTimes() - bankKeeper.EXPECT().GetBalance(gomock.Any(), gomock.Any(), sdk.DefaultBondDenom).DoAndReturn(func(_ sdk.Context, addr sdk.AccAddress, _ string) sdk.Coin { - balances := balances[addr.String()] + bankKeeper.EXPECT().GetBalance(gomock.Any(), gomock.Any(), sdk.DefaultBondDenom).DoAndReturn(func(_ sdk.Context, addr sdk.AccAddress, _ string) (sdk.Coin, error) { + addrStr, err := addressCdc.BytesToString(addr) + if err != nil { + return sdk.Coin{}, err + } + balances := balances[addrStr] for _, balance := range balances { if balance.Denom == sdk.DefaultBondDenom { - return balance + return balance, nil } } - return sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0)) + return sdk.NewCoin(sdk.DefaultBondDenom, math.NewInt(0)), nil }).AnyTimes() + return nil } diff --git a/x/gov/keeper/deposit.go b/x/gov/keeper/deposit.go index 18980698efe1..9a8eb44043a3 100644 --- a/x/gov/keeper/deposit.go +++ b/x/gov/keeper/deposit.go @@ -165,7 +165,11 @@ func (k Keeper) AddDeposit(ctx context.Context, proposalID uint64, depositorAddr deposit.Amount = sdk.NewCoins(deposit.Amount...).Add(depositAmount...) case errors.IsOf(err, collections.ErrNotFound): // deposit doesn't exist - deposit = v1.NewDeposit(proposalID, depositorAddr, depositAmount) + addr, err := k.authKeeper.AddressCodec().BytesToString(depositorAddr) + if err != nil { + return false, err + } + deposit = v1.NewDeposit(proposalID, addr, depositAmount) default: // failed to get deposit return false, err @@ -248,7 +252,10 @@ func (k Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destAddres // burn the cancellation fee or send the cancellation charges to destination address. if !cancellationCharges.IsZero() { // get the pool module account address - poolAddress := k.authKeeper.GetModuleAddress(pooltypes.ModuleName) + poolAddress, err := k.authKeeper.AddressCodec().BytesToString(k.authKeeper.GetModuleAddress(pooltypes.ModuleName)) + if err != nil { + return err + } switch { case destAddress == "": // burn the cancellation charges from deposits @@ -256,7 +263,7 @@ func (k Keeper) ChargeDeposit(ctx context.Context, proposalID uint64, destAddres if err != nil { return err } - case poolAddress.String() == destAddress: + case poolAddress == destAddress: err := k.poolKeeper.FundCommunityPool(ctx, cancellationCharges, k.ModuleAccountAddress()) if err != nil { return err diff --git a/x/gov/keeper/deposit_test.go b/x/gov/keeper/deposit_test.go index afe696c4fc76..c0dbba8f91a4 100644 --- a/x/gov/keeper/deposit_test.go +++ b/x/gov/keeper/deposit_test.go @@ -40,8 +40,8 @@ func TestDeposits(t *testing.T) { t.Run(tc.name, func(t *testing.T) { govKeeper, mocks, _, ctx := setupGovKeeper(t) authKeeper, bankKeeper, stakingKeeper := mocks.acctKeeper, mocks.bankKeeper, mocks.stakingKeeper - trackMockBalances(bankKeeper) - + err := trackMockBalances(bankKeeper) + require.NoError(t, err) // With expedited proposals the minimum deposit is higher, so we must // initialize and deposit an amount depositMultiplier times larger // than the regular min deposit amount. @@ -53,6 +53,11 @@ func TestDeposits(t *testing.T) { TestAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdkmath.NewInt(10000000*depositMultiplier)) authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + addr0Str, err := authKeeper.AddressCodec().BytesToString(TestAddrs[0]) + require.NoError(t, err) + addr1Str, err := authKeeper.AddressCodec().BytesToString(TestAddrs[1]) + require.NoError(t, err) + tp := TestProposal proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "summary", TestAddrs[0], tc.proposalType) require.NoError(t, err) @@ -80,7 +85,7 @@ func TestDeposits(t *testing.T) { deposit, err := govKeeper.Deposits.Get(ctx, collections.Join(proposalID, TestAddrs[0])) require.Nil(t, err) require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...)) - require.Equal(t, TestAddrs[0].String(), deposit.Depositor) + require.Equal(t, addr0Str, deposit.Depositor) proposal, err = govKeeper.Proposals.Get(ctx, proposalID) require.Nil(t, err) require.Equal(t, fourStake, sdk.NewCoins(proposal.TotalDeposit...)) @@ -93,7 +98,7 @@ func TestDeposits(t *testing.T) { deposit, err = govKeeper.Deposits.Get(ctx, collections.Join(proposalID, TestAddrs[0])) require.Nil(t, err) require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(deposit.Amount...)) - require.Equal(t, TestAddrs[0].String(), deposit.Depositor) + require.Equal(t, addr0Str, deposit.Depositor) proposal, err = govKeeper.Proposals.Get(ctx, proposalID) require.Nil(t, err) require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(proposal.TotalDeposit...)) @@ -105,7 +110,7 @@ func TestDeposits(t *testing.T) { require.True(t, votingStarted) deposit, err = govKeeper.Deposits.Get(ctx, collections.Join(proposalID, TestAddrs[1])) require.Nil(t, err) - require.Equal(t, TestAddrs[1].String(), deposit.Depositor) + require.Equal(t, addr1Str, deposit.Depositor) require.Equal(t, fourStake, sdk.NewCoins(deposit.Amount...)) proposal, err = govKeeper.Proposals.Get(ctx, proposalID) require.Nil(t, err) @@ -128,9 +133,9 @@ func TestDeposits(t *testing.T) { require.Len(t, deposits, 2) propDeposits, _ := govKeeper.GetDeposits(ctx, proposalID) require.Equal(t, deposits, propDeposits) - require.Equal(t, TestAddrs[0].String(), deposits[0].Depositor) + require.Equal(t, addr0Str, deposits[0].Depositor) require.Equal(t, fourStake.Add(fiveStake...), sdk.NewCoins(deposits[0].Amount...)) - require.Equal(t, TestAddrs[1].String(), deposits[1].Depositor) + require.Equal(t, addr1Str, deposits[1].Depositor) require.Equal(t, fourStake, sdk.NewCoins(deposits[1].Amount...)) // Test Refund Deposits @@ -214,7 +219,8 @@ func TestDepositAmount(t *testing.T) { t.Run(tc.name, func(t *testing.T) { govKeeper, mocks, _, ctx := setupGovKeeper(t) authKeeper, bankKeeper, stakingKeeper := mocks.acctKeeper, mocks.bankKeeper, mocks.stakingKeeper - trackMockBalances(bankKeeper) + err := trackMockBalances(bankKeeper) + require.NoError(t, err) testAddrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdkmath.NewInt(1000000000000000)) authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() @@ -222,7 +228,7 @@ func TestDepositAmount(t *testing.T) { params, _ := govKeeper.Params.Get(ctx) params.MinDepositRatio = tc.minDepositRatio params.MinDeposit = sdk.NewCoins(params.MinDeposit...).Add(sdk.NewCoin("zcoin", sdkmath.NewInt(10000))) // coins must be sorted by denom - err := govKeeper.Params.Set(ctx, params) + err = govKeeper.Params.Set(ctx, params) require.NoError(t, err) tp := TestProposal @@ -410,10 +416,14 @@ func TestChargeDeposit(t *testing.T) { params.ProposalCancelDest = "" case 1: // normal account address for proposal cancel dest address - params.ProposalCancelDest = TestAddrs[1].String() + addrStr, err := authKeeper.AddressCodec().BytesToString(TestAddrs[1]) + require.NoError(t, err) + params.ProposalCancelDest = addrStr default: // community address for proposal cancel dest address - params.ProposalCancelDest = authtypes.NewModuleAddress(protocolModuleName).String() + addrStr, err := authKeeper.AddressCodec().BytesToString(authtypes.NewModuleAddress(protocolModuleName)) + require.NoError(t, err) + params.ProposalCancelDest = addrStr } err := govKeeper.Params.Set(ctx, params) @@ -440,8 +450,11 @@ func TestChargeDeposit(t *testing.T) { // get the deposits allDeposits, _ := govKeeper.GetDeposits(ctx, proposalID) + addr0Str, err := authKeeper.AddressCodec().BytesToString(TestAddrs[0]) + require.NoError(t, err) + // charge cancellation charges for cancel proposal - err = govKeeper.ChargeDeposit(ctx, proposalID, TestAddrs[0].String(), params.ProposalCancelRatio) + err = govKeeper.ChargeDeposit(ctx, proposalID, addr0Str, params.ProposalCancelRatio) if tc.expectError { require.Error(t, err) return diff --git a/x/gov/keeper/grpc_query_test.go b/x/gov/keeper/grpc_query_test.go index 28ceb6236d9e..0d90df884de6 100644 --- a/x/gov/keeper/grpc_query_test.go +++ b/x/gov/keeper/grpc_query_test.go @@ -19,7 +19,8 @@ import ( func (suite *KeeperTestSuite) TestGRPCQueryProposal() { suite.reset() ctx, queryClient, addrs := suite.ctx, suite.queryClient, suite.addrs - + govAcctStr, err := suite.acctKeeper.AddressCodec().BytesToString(govAcct) + suite.Require().NoError(err) var ( req *v1.QueryProposalRequest expProposal v1.Proposal @@ -56,7 +57,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposal() { func() { req = &v1.QueryProposalRequest{ProposalId: 1} testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal") - msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String()) + msgContent, err := v1.NewLegacyContent(testProposal, govAcctStr) suite.Require().NoError(err) submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], v1.ProposalType_PROPOSAL_TYPE_STANDARD) suite.Require().NoError(err) @@ -102,6 +103,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryConstitution() { func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() { suite.reset() ctx, queryClient, addrs := suite.ctx, suite.legacyQueryClient, suite.addrs + govAcctStr, err := suite.acctKeeper.AddressCodec().BytesToString(govAcct) + suite.Require().NoError(err) var ( req *v1beta1.QueryProposalRequest @@ -139,7 +142,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() { func() { req = &v1beta1.QueryProposalRequest{ProposalId: 1} testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal") - msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String()) + msgContent, err := v1.NewLegacyContent(testProposal, govAcctStr) suite.Require().NoError(err) submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], v1.ProposalType_PROPOSAL_TYPE_STANDARD) suite.Require().NoError(err) @@ -155,7 +158,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() { func() { req = &v1beta1.QueryProposalRequest{ProposalId: 2} testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal") - msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String()) + msgContent, err := v1.NewLegacyContent(testProposal, govAcctStr) suite.Require().NoError(err) submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], v1.ProposalType_PROPOSAL_TYPE_EXPEDITED) suite.Require().NoError(err) @@ -191,7 +194,8 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposal() { func (suite *KeeperTestSuite) TestGRPCQueryProposals() { suite.reset() ctx, queryClient, addrs := suite.ctx, suite.queryClient, suite.addrs - + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) testProposals := []*v1.Proposal{} var ( @@ -216,7 +220,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { func() { // create 5 test proposals for i := 0; i < 5; i++ { - govAddress := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + govAddress, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) testProposal := []sdk.Msg{ v1.NewMsgVote(govAddress, uint64(i), v1.OptionYes, ""), } @@ -279,12 +284,12 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { "request with filter of deposit address", func() { depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.stakingKeeper.TokensFromConsensusPower(ctx, 20))) - deposit := v1.NewDeposit(testProposals[0].Id, addrs[0], depositCoins) + deposit := v1.NewDeposit(testProposals[0].Id, addr0Str, depositCoins) err := suite.govKeeper.SetDeposit(ctx, deposit) suite.Require().NoError(err) req = &v1.QueryProposalsRequest{ - Depositor: addrs[0].String(), + Depositor: addr0Str, } expRes = &v1.QueryProposalsResponse{ @@ -302,7 +307,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { suite.Require().NoError(suite.govKeeper.AddVote(ctx, testProposals[1].Id, addrs[0], v1.NewNonSplitVoteOption(v1.OptionAbstain), "")) req = &v1.QueryProposalsRequest{ - Voter: addrs[0].String(), + Voter: addr0Str, } expRes = &v1.QueryProposalsResponse{ @@ -406,6 +411,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryProposals() { func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposals() { suite.reset() ctx, queryClient, addrs := suite.ctx, suite.legacyQueryClient, suite.addrs + govAcctStr, err := suite.acctKeeper.AddressCodec().BytesToString(govAcct) + suite.Require().NoError(err) var req *v1beta1.QueryProposalsRequest @@ -419,7 +426,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposals() { func() { req = &v1beta1.QueryProposalsRequest{} testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal") - msgContent, err := v1.NewLegacyContent(testProposal, govAcct.String()) + msgContent, err := v1.NewLegacyContent(testProposal, govAcctStr) suite.Require().NoError(err) submittedProposal, err := suite.govKeeper.SubmitProposal(ctx, []sdk.Msg{msgContent}, "", "title", "summary", addrs[0], v1.ProposalType_PROPOSAL_TYPE_STANDARD) suite.Require().NoError(err) @@ -451,6 +458,10 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryProposals() { func (suite *KeeperTestSuite) TestGRPCQueryVote() { ctx, queryClient, addrs := suite.ctx, suite.queryClient, suite.addrs + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) + addr1Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[1]) + suite.Require().NoError(err) var ( req *v1.QueryVoteRequest @@ -475,7 +486,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func() { req = &v1.QueryVoteRequest{ ProposalId: 0, - Voter: addrs[0].String(), + Voter: addr0Str, } }, false, @@ -495,7 +506,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func() { req = &v1.QueryVoteRequest{ ProposalId: 3, - Voter: addrs[0].String(), + Voter: addr0Str, } }, false, @@ -509,7 +520,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { req = &v1.QueryVoteRequest{ ProposalId: proposal.Id, - Voter: addrs[0].String(), + Voter: addr0Str, } expRes = &v1.QueryVoteResponse{} @@ -526,10 +537,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { req = &v1.QueryVoteRequest{ ProposalId: proposal.Id, - Voter: addrs[0].String(), + Voter: addr0Str, } - expRes = &v1.QueryVoteResponse{Vote: &v1.Vote{ProposalId: proposal.Id, Voter: addrs[0].String(), Options: []*v1.WeightedVoteOption{{Option: v1.OptionAbstain, Weight: math.LegacyMustNewDecFromStr("1.0").String()}}}} + expRes = &v1.QueryVoteResponse{Vote: &v1.Vote{ProposalId: proposal.Id, Voter: addr0Str, Options: []*v1.WeightedVoteOption{{Option: v1.OptionAbstain, Weight: math.LegacyMustNewDecFromStr("1.0").String()}}}} }, true, }, @@ -538,7 +549,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func() { req = &v1.QueryVoteRequest{ ProposalId: proposal.Id, - Voter: addrs[1].String(), + Voter: addr1Str, } expRes = &v1.QueryVoteResponse{} @@ -568,7 +579,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryVote() { func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { ctx, queryClient, addrs := suite.ctx, suite.legacyQueryClient, suite.addrs - + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) + addr1Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[1]) + suite.Require().NoError(err) var ( req *v1beta1.QueryVoteRequest expRes *v1beta1.QueryVoteResponse @@ -592,7 +606,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { func() { req = &v1beta1.QueryVoteRequest{ ProposalId: 0, - Voter: addrs[0].String(), + Voter: addr0Str, } }, false, @@ -612,7 +626,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { func() { req = &v1beta1.QueryVoteRequest{ ProposalId: 3, - Voter: addrs[0].String(), + Voter: addr0Str, } }, false, @@ -626,7 +640,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { req = &v1beta1.QueryVoteRequest{ ProposalId: proposal.Id, - Voter: addrs[0].String(), + Voter: addr0Str, } expRes = &v1beta1.QueryVoteResponse{} @@ -643,10 +657,10 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { req = &v1beta1.QueryVoteRequest{ ProposalId: proposal.Id, - Voter: addrs[0].String(), + Voter: addr0Str, } - expRes = &v1beta1.QueryVoteResponse{Vote: v1beta1.Vote{ProposalId: proposal.Id, Voter: addrs[0].String(), Options: []v1beta1.WeightedVoteOption{{Option: v1beta1.OptionAbstain, Weight: math.LegacyMustNewDecFromStr("1.0")}}}} + expRes = &v1beta1.QueryVoteResponse{Vote: v1beta1.Vote{ProposalId: proposal.Id, Voter: addr0Str, Options: []v1beta1.WeightedVoteOption{{Option: v1beta1.OptionAbstain, Weight: math.LegacyMustNewDecFromStr("1.0")}}}} }, true, }, @@ -655,7 +669,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVote() { func() { req = &v1beta1.QueryVoteRequest{ ProposalId: proposal.Id, - Voter: addrs[1].String(), + Voter: addr1Str, } expRes = &v1beta1.QueryVoteResponse{} @@ -688,6 +702,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryVotes() { ctx, queryClient := suite.ctx, suite.queryClient addrs := simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, ctx, 2, math.NewInt(30000000)) + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) + addr1Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[1]) + suite.Require().NoError(err) var ( req *v1.QueryVotesRequest @@ -746,8 +764,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryVotes() { err := suite.govKeeper.Proposals.Set(suite.ctx, proposal.Id, proposal) suite.Require().NoError(err) votes = []*v1.Vote{ - {ProposalId: proposal.Id, Voter: addrs[0].String(), Options: v1.NewNonSplitVoteOption(v1.OptionAbstain)}, - {ProposalId: proposal.Id, Voter: addrs[1].String(), Options: v1.NewNonSplitVoteOption(v1.OptionYes)}, + {ProposalId: proposal.Id, Voter: addr0Str, Options: v1.NewNonSplitVoteOption(v1.OptionAbstain)}, + {ProposalId: proposal.Id, Voter: addr1Str, Options: v1.NewNonSplitVoteOption(v1.OptionYes)}, } codec := address.NewBech32Codec("cosmos") @@ -794,6 +812,10 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() { ctx, queryClient := suite.ctx, suite.legacyQueryClient addrs := simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, ctx, 2, math.NewInt(30000000)) + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) + addr1Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[1]) + suite.Require().NoError(err) var ( req *v1beta1.QueryVotesRequest @@ -853,8 +875,8 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryVotes() { suite.Require().NoError(err) votes = []v1beta1.Vote{ - {ProposalId: proposal.Id, Voter: addrs[0].String(), Options: v1beta1.NewNonSplitVoteOption(v1beta1.OptionAbstain)}, - {ProposalId: proposal.Id, Voter: addrs[1].String(), Options: v1beta1.NewNonSplitVoteOption(v1beta1.OptionYes)}, + {ProposalId: proposal.Id, Voter: addr0Str, Options: v1beta1.NewNonSplitVoteOption(v1beta1.OptionAbstain)}, + {ProposalId: proposal.Id, Voter: addr1Str, Options: v1beta1.NewNonSplitVoteOption(v1beta1.OptionYes)}, } codec := address.NewBech32Codec("cosmos") @@ -1095,6 +1117,8 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryParams() { func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { suite.reset() ctx, queryClient, addrs := suite.ctx, suite.queryClient, suite.addrs + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) var ( req *v1.QueryDepositRequest @@ -1119,7 +1143,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { func() { req = &v1.QueryDepositRequest{ ProposalId: 0, - Depositor: addrs[0].String(), + Depositor: addr0Str, } }, false, @@ -1139,7 +1163,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { func() { req = &v1.QueryDepositRequest{ ProposalId: 2, - Depositor: addrs[0].String(), + Depositor: addr0Str, } }, false, @@ -1154,7 +1178,7 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { req = &v1.QueryDepositRequest{ ProposalId: proposal.Id, - Depositor: addrs[0].String(), + Depositor: addr0Str, } }, false, @@ -1163,13 +1187,13 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { "valid request", func() { depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.stakingKeeper.TokensFromConsensusPower(ctx, 20))) - deposit := v1.NewDeposit(proposal.Id, addrs[0], depositCoins) + deposit := v1.NewDeposit(proposal.Id, addr0Str, depositCoins) err := suite.govKeeper.SetDeposit(ctx, deposit) suite.Require().NoError(err) req = &v1.QueryDepositRequest{ ProposalId: proposal.Id, - Depositor: addrs[0].String(), + Depositor: addr0Str, } expRes = &v1.QueryDepositResponse{Deposit: &deposit} @@ -1199,6 +1223,8 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposit() { func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { ctx, queryClient, addrs := suite.ctx, suite.legacyQueryClient, suite.addrs + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) var ( req *v1beta1.QueryDepositRequest @@ -1223,7 +1249,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { func() { req = &v1beta1.QueryDepositRequest{ ProposalId: 0, - Depositor: addrs[0].String(), + Depositor: addr0Str, } }, false, @@ -1243,7 +1269,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { func() { req = &v1beta1.QueryDepositRequest{ ProposalId: 2, - Depositor: addrs[0].String(), + Depositor: addr0Str, } }, false, @@ -1258,7 +1284,7 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { req = &v1beta1.QueryDepositRequest{ ProposalId: proposal.Id, - Depositor: addrs[0].String(), + Depositor: addr0Str, } }, false, @@ -1267,14 +1293,14 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { "valid request", func() { depositCoins := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.stakingKeeper.TokensFromConsensusPower(ctx, 20))) - deposit := v1beta1.NewDeposit(proposal.Id, addrs[0], depositCoins) - v1deposit := v1.NewDeposit(proposal.Id, addrs[0], depositCoins) + deposit := v1beta1.NewDeposit(proposal.Id, addr0Str, depositCoins) + v1deposit := v1.NewDeposit(proposal.Id, addr0Str, depositCoins) err := suite.govKeeper.SetDeposit(ctx, v1deposit) suite.Require().NoError(err) req = &v1beta1.QueryDepositRequest{ ProposalId: proposal.Id, - Depositor: addrs[0].String(), + Depositor: addr0Str, } expRes = &v1beta1.QueryDepositResponse{Deposit: deposit} @@ -1304,6 +1330,10 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposit() { func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { ctx, queryClient, addrs := suite.ctx, suite.queryClient, suite.addrs + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) + addr1Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[1]) + suite.Require().NoError(err) var ( req *v1.QueryDepositsRequest @@ -1358,12 +1388,12 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { "get deposits with default limit", func() { depositAmount1 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.stakingKeeper.TokensFromConsensusPower(ctx, 20))) - deposit1 := v1.NewDeposit(proposal.Id, addrs[0], depositAmount1) + deposit1 := v1.NewDeposit(proposal.Id, addr0Str, depositAmount1) err := suite.govKeeper.SetDeposit(ctx, deposit1) suite.Require().NoError(err) depositAmount2 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.stakingKeeper.TokensFromConsensusPower(ctx, 30))) - deposit2 := v1.NewDeposit(proposal.Id, addrs[1], depositAmount2) + deposit2 := v1.NewDeposit(proposal.Id, addr1Str, depositAmount2) err = suite.govKeeper.SetDeposit(ctx, deposit2) suite.Require().NoError(err) @@ -1403,6 +1433,10 @@ func (suite *KeeperTestSuite) TestGRPCQueryDeposits() { func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposits() { suite.reset() ctx, queryClient, addrs := suite.ctx, suite.legacyQueryClient, suite.addrs + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) + addr1Str, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[1]) + suite.Require().NoError(err) var ( req *v1beta1.QueryDepositsRequest @@ -1457,14 +1491,14 @@ func (suite *KeeperTestSuite) TestLegacyGRPCQueryDeposits() { "get deposits with default limit", func() { depositAmount1 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.stakingKeeper.TokensFromConsensusPower(ctx, 20))) - deposit1 := v1beta1.NewDeposit(proposal.Id, addrs[0], depositAmount1) - v1deposit1 := v1.NewDeposit(proposal.Id, addrs[0], depositAmount1) + deposit1 := v1beta1.NewDeposit(proposal.Id, addr0Str, depositAmount1) + v1deposit1 := v1.NewDeposit(proposal.Id, addr0Str, depositAmount1) err := suite.govKeeper.SetDeposit(ctx, v1deposit1) suite.Require().NoError(err) depositAmount2 := sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, suite.stakingKeeper.TokensFromConsensusPower(ctx, 30))) - deposit2 := v1beta1.NewDeposit(proposal.Id, addrs[1], depositAmount2) - v1deposit2 := v1.NewDeposit(proposal.Id, addrs[1], depositAmount2) + deposit2 := v1beta1.NewDeposit(proposal.Id, addr1Str, depositAmount2) + v1deposit2 := v1.NewDeposit(proposal.Id, addr1Str, depositAmount2) err = suite.govKeeper.SetDeposit(ctx, v1deposit2) suite.Require().NoError(err) diff --git a/x/gov/keeper/keeper_test.go b/x/gov/keeper/keeper_test.go index f24149a42183..1d6644f4aef1 100644 --- a/x/gov/keeper/keeper_test.go +++ b/x/gov/keeper/keeper_test.go @@ -72,7 +72,10 @@ func (suite *KeeperTestSuite) reset() { suite.legacyQueryClient = legacyQueryClient suite.msgSrvr = keeper.NewMsgServerImpl(suite.govKeeper) - suite.legacyMsgSrvr = keeper.NewLegacyMsgServerImpl(govAcct.String(), suite.msgSrvr) + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(govAcct) + suite.Require().NoError(err) + + suite.legacyMsgSrvr = keeper.NewLegacyMsgServerImpl(govStrAcct, suite.msgSrvr) suite.addrs = simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 3, sdkmath.NewInt(300000000)) suite.acctKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() diff --git a/x/gov/keeper/msg_server_test.go b/x/gov/keeper/msg_server_test.go index 994d4672825b..7015e047e7d7 100644 --- a/x/gov/keeper/msg_server_test.go +++ b/x/gov/keeper/msg_server_test.go @@ -9,6 +9,7 @@ import ( v1 "cosmossdk.io/x/gov/types/v1" "cosmossdk.io/x/gov/types/v1beta1" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/codec/types" simtestutil "github.com/cosmos/cosmos-sdk/testutil/sims" "github.com/cosmos/cosmos-sdk/testutil/testdata" @@ -24,17 +25,20 @@ var longAddressError = "address max length is 255" func (suite *KeeperTestSuite) TestMsgSubmitProposal() { suite.reset() - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() addrs := suite.addrs - proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) + + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) initialDeposit := coins params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } @@ -63,7 +67,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( nil, initialDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -78,7 +82,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, "", "", "description of proposal", @@ -93,7 +97,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "", @@ -108,7 +112,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, "{\"title\":\"Proposal\", \"description\":\"description of proposal\"}", "Proposal2", "description of proposal", @@ -123,7 +127,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, "{\"title\":\"Proposal\", \"description\":\"description of proposal\"}", "Proposal", "description", @@ -138,7 +142,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, "Metadata", strings.Repeat("1", 256), "description of proposal", @@ -153,7 +157,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, strings.Repeat("1", 257), "Proposal", "description of proposal", @@ -168,7 +172,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, "", "Proposal", strings.Repeat("1", 10201), @@ -183,7 +187,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{testdata.NewTestMsg(govAcct, addrs[0])}, initialDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -198,7 +202,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{testdata.NewTestMsg(addrs[0])}, initialDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -213,7 +217,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{testdata.NewTestMsg(govAcct)}, initialDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -228,7 +232,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, []sdk.Coin{sdk.NewCoin("invalid", sdkmath.NewInt(100))}, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -243,7 +247,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit.Add(sdk.NewCoin("invalid", sdkmath.NewInt(100))), - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -258,7 +262,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, initialDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -272,7 +276,7 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { return v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -304,7 +308,8 @@ func (suite *KeeperTestSuite) TestMsgSubmitProposal() { func (suite *KeeperTestSuite) TestSubmitMultipleChoiceProposal() { suite.reset() addrs := suite.addrs - proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(addrs[0]) + suite.Require().NoError(err) initialDeposit := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) cases := map[string]struct { @@ -316,7 +321,7 @@ func (suite *KeeperTestSuite) TestSubmitMultipleChoiceProposal() { preRun: func() (*v1.MsgSubmitMultipleChoiceProposal, error) { return v1.NewMultipleChoiceMsgSubmitProposal( initialDeposit, - proposer.String(), + proposerAddr, "mandatory metadata", "Proposal", "description of proposal", @@ -330,7 +335,7 @@ func (suite *KeeperTestSuite) TestSubmitMultipleChoiceProposal() { preRun: func() (*v1.MsgSubmitMultipleChoiceProposal, error) { return v1.NewMultipleChoiceMsgSubmitProposal( initialDeposit, - proposer.String(), + proposerAddr, "mandatory metadata", "Proposal", "description of proposal", @@ -347,7 +352,7 @@ func (suite *KeeperTestSuite) TestSubmitMultipleChoiceProposal() { preRun: func() (*v1.MsgSubmitMultipleChoiceProposal, error) { return v1.NewMultipleChoiceMsgSubmitProposal( initialDeposit, - proposer.String(), + proposerAddr, "mandatory metadata", "Proposal", "description of proposal", @@ -380,18 +385,23 @@ func (suite *KeeperTestSuite) TestMsgCancelProposal() { govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() addrs := suite.addrs proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(proposer) + suite.Require().NoError(err) + + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(govAcct) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "title", "summary", v1.ProposalType_PROPOSAL_TYPE_STANDARD, ) @@ -438,7 +448,7 @@ func (suite *KeeperTestSuite) TestMsgCancelProposal() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -459,8 +469,10 @@ func (suite *KeeperTestSuite) TestMsgCancelProposal() { for name, tc := range cases { suite.Run(name, func() { proposalID := tc.preRun() - cancelProposalReq := v1.NewMsgCancelProposal(proposalID, tc.depositor.String()) - _, err := suite.msgSrvr.CancelProposal(suite.ctx, cancelProposalReq) + depositor, err := suite.acctKeeper.AddressCodec().BytesToString(tc.depositor) + suite.Require().NoError(err) + cancelProposalReq := v1.NewMsgCancelProposal(proposalID, depositor) + _, err = suite.msgSrvr.CancelProposal(suite.ctx, cancelProposalReq) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -473,23 +485,26 @@ func (suite *KeeperTestSuite) TestMsgCancelProposal() { func (suite *KeeperTestSuite) TestMsgVote() { suite.reset() - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() addrs := suite.addrs proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(proposer) + suite.Require().NoError(err) + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -503,12 +518,14 @@ func (suite *KeeperTestSuite) TestMsgVote() { proposalID := res.ProposalId cases := map[string]struct { - preRun func() uint64 - expErr bool - expErrMsg string - option v1.VoteOption - metadata string - voter sdk.AccAddress + preRun func() uint64 + expErr bool + expErrMsg string + expAddrErr bool + expAddrErrMsg string + option v1.VoteOption + metadata string + voter sdk.AccAddress }{ "empty voter": { preRun: func() uint64 { @@ -535,7 +552,7 @@ func (suite *KeeperTestSuite) TestMsgVote() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -559,7 +576,7 @@ func (suite *KeeperTestSuite) TestMsgVote() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -592,18 +609,20 @@ func (suite *KeeperTestSuite) TestMsgVote() { preRun: func() uint64 { return proposalID }, - option: v1.VoteOption_VOTE_OPTION_ONE, - voter: sdk.AccAddress(strings.Repeat("a", 300)), - metadata: "", - expErr: true, - expErrMsg: longAddressError, + option: v1.VoteOption_VOTE_OPTION_ONE, + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "invalid voter address: empty address string is not allowed", + expAddrErr: true, + expAddrErrMsg: longAddressError, }, "all good": { preRun: func() uint64 { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -626,8 +645,15 @@ func (suite *KeeperTestSuite) TestMsgVote() { for name, tc := range cases { suite.Run(name, func() { pID := tc.preRun() - voteReq := v1.NewMsgVote(tc.voter, pID, tc.option, tc.metadata) - _, err := suite.msgSrvr.Vote(suite.ctx, voteReq) + voter, err := suite.acctKeeper.AddressCodec().BytesToString(tc.voter) + if tc.expAddrErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expAddrErrMsg) + } else { + suite.Require().NoError(err) + } + voteReq := v1.NewMsgVote(voter, pID, tc.option, tc.metadata) + _, err = suite.msgSrvr.Vote(suite.ctx, voteReq) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -641,22 +667,26 @@ func (suite *KeeperTestSuite) TestMsgVote() { func (suite *KeeperTestSuite) TestMsgVoteWeighted() { suite.reset() govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(govAcct) + suite.Require().NoError(err) proposer := simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, suite.ctx, 1, sdkmath.NewInt(50000000))[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(proposer) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -670,13 +700,15 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { proposalID := res.ProposalId cases := map[string]struct { - preRun func() uint64 - vote *v1.MsgVote - expErr bool - expErrMsg string - option v1.WeightedVoteOptions - metadata string - voter sdk.AccAddress + preRun func() uint64 + vote *v1.MsgVote + expErr bool + expErrMsg string + expAddrErr bool + expAddrErrMsg string + option v1.WeightedVoteOptions + metadata string + voter sdk.AccAddress }{ "empty voter": { preRun: func() uint64 { @@ -778,7 +810,7 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -814,7 +846,7 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -847,18 +879,20 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { preRun: func() uint64 { return proposalID }, - option: v1.NewNonSplitVoteOption(v1.VoteOption_VOTE_OPTION_ONE), - voter: sdk.AccAddress(strings.Repeat("a", 300)), - metadata: "", - expErr: true, - expErrMsg: longAddressError, + option: v1.NewNonSplitVoteOption(v1.VoteOption_VOTE_OPTION_ONE), + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "invalid voter address: empty address string is not allowed", + expAddrErr: true, + expAddrErrMsg: longAddressError, }, "all good": { preRun: func() uint64 { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -881,7 +915,7 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -907,8 +941,15 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { for name, tc := range cases { suite.Run(name, func() { pID := tc.preRun() - voteReq := v1.NewMsgVoteWeighted(tc.voter, pID, tc.option, tc.metadata) - _, err := suite.msgSrvr.VoteWeighted(suite.ctx, voteReq) + voter, err := suite.acctKeeper.AddressCodec().BytesToString(tc.voter) + if tc.expAddrErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expAddrErrMsg) + } else { + suite.Require().NoError(err) + } + voteReq := v1.NewMsgVoteWeighted(voter, pID, tc.option, tc.metadata) + _, err = suite.msgSrvr.VoteWeighted(suite.ctx, voteReq) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -921,23 +962,26 @@ func (suite *KeeperTestSuite) TestMsgVoteWeighted() { func (suite *KeeperTestSuite) TestMsgDeposit() { suite.reset() - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) addrs := suite.addrs proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(proposer) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := sdk.Coins(params.MinDeposit) bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1007,8 +1051,10 @@ func (suite *KeeperTestSuite) TestMsgDeposit() { for name, tc := range cases { suite.Run(name, func() { proposalID := tc.preRun() - depositReq := v1.NewMsgDeposit(tc.depositor, proposalID, tc.deposit) - _, err := suite.msgSrvr.Deposit(suite.ctx, depositReq) + depositor, err := suite.acctKeeper.AddressCodec().BytesToString(tc.depositor) + suite.Require().NoError(err) + depositReq := v1.NewMsgDeposit(depositor, proposalID, tc.deposit) + _, err = suite.msgSrvr.Deposit(suite.ctx, depositReq) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -1021,12 +1067,14 @@ func (suite *KeeperTestSuite) TestMsgDeposit() { // legacy msg server tests func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { - proposer := simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, suite.ctx, 1, sdkmath.NewInt(50000000))[0] + proposer, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(simtestutil.AddTestAddrsIncremental(suite.bankKeeper, suite.stakingKeeper, suite.ctx, 1, sdkmath.NewInt(50000000))[0]) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) initialDeposit := coins params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit - + address, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(sdk.AccAddress{}) + suite.Require().NoError(err) cases := map[string]struct { preRun func() (*v1beta1.MsgSubmitProposal, error) expErr bool @@ -1062,7 +1110,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { return v1beta1.NewMsgSubmitProposal( content, initialDeposit, - sdk.AccAddress{}, + address, ) }, expErr: true, @@ -1131,23 +1179,26 @@ func (suite *KeeperTestSuite) TestLegacyMsgSubmitProposal() { } func (suite *KeeperTestSuite) TestLegacyMsgVote() { - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) addrs := suite.addrs proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(proposer) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1161,12 +1212,14 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { proposalID := res.ProposalId cases := map[string]struct { - preRun func() uint64 - expErr bool - expErrMsg string - option v1beta1.VoteOption - metadata string - voter sdk.AccAddress + preRun func() uint64 + expErr bool + expAddrErr bool + expErrMsg string + expAddrErrMsg string + option v1beta1.VoteOption + metadata string + voter sdk.AccAddress }{ "empty voter": { preRun: func() uint64 { @@ -1193,7 +1246,7 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1216,18 +1269,20 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { preRun: func() uint64 { return proposalID }, - option: v1beta1.OptionYes, - voter: sdk.AccAddress(strings.Repeat("a", 300)), - metadata: "", - expErr: true, - expErrMsg: longAddressError, + option: v1beta1.OptionYes, + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "invalid voter address: empty address string is not allowed", + expAddrErr: true, + expAddrErrMsg: longAddressError, }, "all good": { preRun: func() uint64 { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1250,8 +1305,15 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { for name, tc := range cases { suite.Run(name, func() { pID := tc.preRun() - voteReq := v1beta1.NewMsgVote(tc.voter, pID, tc.option) - _, err := suite.legacyMsgSrvr.Vote(suite.ctx, voteReq) + voter, err := suite.acctKeeper.AddressCodec().BytesToString(tc.voter) + if tc.expAddrErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expAddrErrMsg) + } else { + suite.Require().NoError(err) + } + voteReq := v1beta1.NewMsgVote(voter, pID, tc.option) + _, err = suite.legacyMsgSrvr.Vote(suite.ctx, voteReq) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -1264,23 +1326,26 @@ func (suite *KeeperTestSuite) TestLegacyMsgVote() { func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { suite.reset() - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) addrs := suite.addrs proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(proposer) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1294,13 +1359,15 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { proposalID := res.ProposalId cases := map[string]struct { - preRun func() uint64 - vote *v1beta1.MsgVote - expErr bool - expErrMsg string - option v1beta1.WeightedVoteOptions - metadata string - voter sdk.AccAddress + preRun func() uint64 + vote *v1beta1.MsgVote + expErr bool + expAddrErr bool + expErrMsg string + expAddrErrMsg string + option v1beta1.WeightedVoteOptions + metadata string + voter sdk.AccAddress }{ "empty voter": { preRun: func() uint64 { @@ -1430,7 +1497,7 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1464,17 +1531,19 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { Weight: sdkmath.LegacyNewDec(1), }, }, - voter: sdk.AccAddress(strings.Repeat("a", 300)), - metadata: "", - expErr: true, - expErrMsg: longAddressError, + voter: sdk.AccAddress(strings.Repeat("a", 300)), + metadata: "", + expErr: true, + expErrMsg: "invalid voter address: empty address string is not allowed", + expAddrErr: true, + expAddrErrMsg: longAddressError, }, "all good": { preRun: func() uint64 { msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, minDeposit, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1502,8 +1571,15 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { for name, tc := range cases { suite.Run(name, func() { pID := tc.preRun() - voteReq := v1beta1.NewMsgVoteWeighted(tc.voter, pID, tc.option) - _, err := suite.legacyMsgSrvr.VoteWeighted(suite.ctx, voteReq) + voter, err := suite.acctKeeper.AddressCodec().BytesToString(tc.voter) + if tc.expAddrErr { + suite.Require().Error(err) + suite.Require().Contains(err.Error(), tc.expAddrErrMsg) + } else { + suite.Require().NoError(err) + } + voteReq := v1beta1.NewMsgVoteWeighted(voter, pID, tc.option) + _, err = suite.legacyMsgSrvr.VoteWeighted(suite.ctx, voteReq) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -1515,23 +1591,26 @@ func (suite *KeeperTestSuite) TestLegacyVoteWeighted() { } func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress() + govStrAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) addrs := suite.addrs proposer := addrs[0] + proposerAddr, err := suite.acctKeeper.AddressCodec().BytesToString(proposer) + suite.Require().NoError(err) coins := sdk.NewCoins(sdk.NewCoin("stake", sdkmath.NewInt(100000))) params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit bankMsg := &banktypes.MsgSend{ - FromAddress: govAcct.String(), - ToAddress: proposer.String(), + FromAddress: govStrAcct, + ToAddress: proposerAddr, Amount: coins, } msg, err := v1.NewMsgSubmitProposal( []sdk.Msg{bankMsg}, coins, - proposer.String(), + proposerAddr, "", "Proposal", "description of proposal", @@ -1583,8 +1662,10 @@ func (suite *KeeperTestSuite) TestLegacyMsgDeposit() { for name, tc := range cases { suite.Run(name, func() { proposalID := tc.preRun() - depositReq := v1beta1.NewMsgDeposit(tc.depositor, proposalID, tc.deposit) - _, err := suite.legacyMsgSrvr.Deposit(suite.ctx, depositReq) + depositor, err := suite.acctKeeper.AddressCodec().BytesToString(tc.depositor) + suite.Require().NoError(err) + depositReq := v1beta1.NewMsgDeposit(depositor, proposalID, tc.deposit) + _, err = suite.legacyMsgSrvr.Deposit(suite.ctx, depositReq) if tc.expErr { suite.Require().Error(err) suite.Require().Contains(err.Error(), tc.expErrMsg) @@ -2134,15 +2215,16 @@ func (suite *KeeperTestSuite) TestSubmitProposal_InitialDeposit() { suite.Run(name, func() { // Setup govKeeper, ctx := suite.govKeeper, suite.ctx - address := simtestutil.AddTestAddrs(suite.bankKeeper, suite.stakingKeeper, ctx, 1, tc.accountBalance[0].Amount)[0] + address, err := suite.acctKeeper.AddressCodec().BytesToString(simtestutil.AddTestAddrs(suite.bankKeeper, suite.stakingKeeper, ctx, 1, tc.accountBalance[0].Amount)[0]) + suite.Require().NoError(err) params := v1.DefaultParams() params.MinDeposit = tc.minDeposit params.MinInitialDepositRatio = tc.minInitialDepositRatio.String() - err := govKeeper.Params.Set(ctx, params) + err = govKeeper.Params.Set(ctx, params) suite.Require().NoError(err) - msg, err := v1.NewMsgSubmitProposal(TestProposal, tc.initialDeposit, address.String(), "test", "Proposal", "description of proposal", v1.ProposalType_PROPOSAL_TYPE_STANDARD) + msg, err := v1.NewMsgSubmitProposal(TestProposal, tc.initialDeposit, address, "test", "Proposal", "description of proposal", v1.ProposalType_PROPOSAL_TYPE_STANDARD) suite.Require().NoError(err) // System under test @@ -2159,10 +2241,12 @@ func (suite *KeeperTestSuite) TestSubmitProposal_InitialDeposit() { } func (suite *KeeperTestSuite) TestMsgSudoExec() { + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(suite.addrs[0]) + suite.Require().NoError(err) // setup for valid use case params, _ := suite.govKeeper.Params.Get(suite.ctx) minDeposit := params.MinDeposit - proposal, err := v1.NewMsgSubmitProposal([]sdk.Msg{}, minDeposit, suite.addrs[0].String(), "{\"title\":\"Proposal\", \"summary\":\"description of proposal\"}", "Proposal", "description of proposal", v1.ProposalType_PROPOSAL_TYPE_STANDARD) + proposal, err := v1.NewMsgSubmitProposal([]sdk.Msg{}, minDeposit, addr0Str, "{\"title\":\"Proposal\", \"summary\":\"description of proposal\"}", "Proposal", "description of proposal", v1.ProposalType_PROPOSAL_TYPE_STANDARD) suite.Require().NoError(err) proposalResp, err := suite.msgSrvr.SubmitProposal(suite.ctx, proposal) suite.Require().NoError(err) @@ -2171,7 +2255,7 @@ func (suite *KeeperTestSuite) TestMsgSudoExec() { // normally it isn't possible as governance isn't the signer. // governance needs to sudo the vote. validMsg := &v1.MsgSudoExec{Authority: suite.govKeeper.GetAuthority()} - _, err = validMsg.SetSudoedMsg(v1.NewMsgVote(suite.addrs[0], proposalResp.ProposalId, v1.OptionYes, "")) + _, err = validMsg.SetSudoedMsg(v1.NewMsgVote(addr0Str, proposalResp.ProposalId, v1.OptionYes, "")) suite.Require().NoError(err) invalidMsg := &v1.MsgSudoExec{Authority: suite.govKeeper.GetAuthority()} diff --git a/x/gov/keeper/proposal.go b/x/gov/keeper/proposal.go index 3cf868689458..108a4c3602c1 100644 --- a/x/gov/keeper/proposal.go +++ b/x/gov/keeper/proposal.go @@ -80,7 +80,11 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata // assert that the governance module account is the only signer of the messages if !bytes.Equal(signers[0], k.GetGovernanceAccount(ctx).GetAddress()) { - return v1.Proposal{}, errorsmod.Wrapf(types.ErrInvalidSigner, sdk.AccAddress(signers[0]).String()) + addr, err := k.authKeeper.AddressCodec().BytesToString(signers[0]) + if err != nil { + return v1.Proposal{}, errorsmod.Wrapf(types.ErrInvalidSigner, err.Error()) + } + return v1.Proposal{}, errorsmod.Wrapf(types.ErrInvalidSigner, addr) } if err := k.environment.RouterService.MessageRouterService().CanInvoke(ctx, sdk.MsgTypeURL(msg)); err != nil { @@ -124,8 +128,12 @@ func (k Keeper) SubmitProposal(ctx context.Context, messages []sdk.Msg, metadata return v1.Proposal{}, err } + proposerAddr, err := k.authKeeper.AddressCodec().BytesToString(proposer) + if err != nil { + return v1.Proposal{}, err + } submitTime := k.environment.HeaderService.GetHeaderInfo(ctx).Time - proposal, err := v1.NewProposal(messages, proposalID, submitTime, submitTime.Add(*params.MaxDepositPeriod), metadata, title, summary, proposer, proposalType) + proposal, err := v1.NewProposal(messages, proposalID, submitTime, submitTime.Add(*params.MaxDepositPeriod), metadata, title, summary, proposerAddr, proposalType) if err != nil { return v1.Proposal{}, err } diff --git a/x/gov/keeper/proposal_test.go b/x/gov/keeper/proposal_test.go index d691cf99b881..eb5e7b41abe0 100644 --- a/x/gov/keeper/proposal_test.go +++ b/x/gov/keeper/proposal_test.go @@ -13,6 +13,7 @@ import ( v1 "cosmossdk.io/x/gov/types/v1" "cosmossdk.io/x/gov/types/v1beta1" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/testutil/testdata" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -125,9 +126,11 @@ type invalidProposalRoute struct{ v1beta1.TextProposal } func (invalidProposalRoute) ProposalRoute() string { return "nonexistingroute" } func (suite *KeeperTestSuite) TestSubmitProposal() { - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress().String() - _, _, randomAddr := testdata.KeyTestPubAddr() - + govAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) + _, _, randomAddress := testdata.KeyTestPubAddr() + randomAddr, err := suite.acctKeeper.AddressCodec().BytesToString(randomAddress) + suite.Require().NoError(err) tp := v1beta1.TextProposal{Title: "title", Description: "description"} legacyProposal := func(content v1beta1.Content, authority string) []sdk.Msg { prop, err := v1.NewLegacyContent(content, authority) @@ -136,7 +139,7 @@ func (suite *KeeperTestSuite) TestSubmitProposal() { } // create custom message based params for x/gov/MsgUpdateParams - err := suite.govKeeper.MessageBasedParams.Set(suite.ctx, sdk.MsgTypeURL(&v1.MsgUpdateParams{}), v1.MessageBasedParams{ + err = suite.govKeeper.MessageBasedParams.Set(suite.ctx, sdk.MsgTypeURL(&v1.MsgUpdateParams{}), v1.MessageBasedParams{ VotingPeriod: func() *time.Duration { t := time.Hour * 24 * 7; return &t }(), Quorum: "0.4", Threshold: "0.5", @@ -161,7 +164,7 @@ func (suite *KeeperTestSuite) TestSubmitProposal() { {legacyProposal(&v1beta1.TextProposal{Title: "title", Description: ""}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, nil}, {legacyProposal(&v1beta1.TextProposal{Title: "title", Description: strings.Repeat("1234567890", 1000)}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED, nil}, // error when signer is not gov acct - {legacyProposal(&tp, randomAddr.String()), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrInvalidSigner}, + {legacyProposal(&tp, randomAddr), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrInvalidSigner}, // error only when invalid route {legacyProposal(&invalidProposalRoute{}, govAcct), "", v1.ProposalType_PROPOSAL_TYPE_STANDARD, types.ErrNoProposalHandlerExists}, // error invalid multiple choice proposal @@ -181,7 +184,8 @@ func (suite *KeeperTestSuite) TestSubmitProposal() { } func (suite *KeeperTestSuite) TestCancelProposal() { - govAcct := suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress().String() + govAcct, err := suite.acctKeeper.AddressCodec().BytesToString(suite.govKeeper.GetGovernanceAccount(suite.ctx).GetAddress()) + suite.Require().NoError(err) tp := v1beta1.TextProposal{Title: "title", Description: "description"} prop, err := v1.NewLegacyContent(&tp, govAcct) suite.Require().NoError(err) @@ -189,6 +193,11 @@ func (suite *KeeperTestSuite) TestCancelProposal() { suite.Require().NoError(err) proposalID := proposal.Id + addr0Str, err := suite.acctKeeper.AddressCodec().BytesToString(suite.addrs[0]) + suite.Require().NoError(err) + addr1Str, err := suite.acctKeeper.AddressCodec().BytesToString(suite.addrs[1]) + suite.Require().NoError(err) + proposal2, err := suite.govKeeper.SubmitProposal(suite.ctx, []sdk.Msg{prop}, "", "title", "summary", suite.addrs[1], v1.ProposalType_PROPOSAL_TYPE_EXPEDITED) suite.Require().NoError(err) proposal2ID := proposal2.Id @@ -227,14 +236,14 @@ func (suite *KeeperTestSuite) TestCancelProposal() { { name: "invalid proposal id", malleate: func() (uint64, string) { - return 10, suite.addrs[1].String() + return 10, addr1Str }, expectedErrMsg: "proposal 10 doesn't exist", }, { name: "valid proposalID but invalid proposer", malleate: func() (uint64, string) { - return proposalID, suite.addrs[1].String() + return proposalID, addr1Str }, expectedErrMsg: "invalid proposer", }, @@ -248,7 +257,7 @@ func (suite *KeeperTestSuite) TestCancelProposal() { proposal2.Status = v1.ProposalStatus_PROPOSAL_STATUS_PASSED err = suite.govKeeper.Proposals.Set(suite.ctx, proposal2.Id, proposal2) suite.Require().NoError(err) - return proposal2ID, suite.addrs[1].String() + return proposal2ID, addr1Str }, expectedErrMsg: "proposal should be in the deposit or voting period", }, @@ -267,14 +276,14 @@ func (suite *KeeperTestSuite) TestCancelProposal() { suite.ctx = suite.ctx.WithHeaderInfo(headerInfo) suite.Require().NoError(err) - return proposal2ID, suite.addrs[1].String() + return proposal2ID, addr1Str }, expectedErrMsg: "too late", }, { name: "valid proposer and proposal id", malleate: func() (uint64, string) { - return proposalID, suite.addrs[0].String() + return proposalID, addr0Str }, }, { @@ -294,7 +303,7 @@ func (suite *KeeperTestSuite) TestCancelProposal() { suite.Require().NoError(err) suite.Require().NotNil(vote) - return proposalID, suite.addrs[0].String() + return proposalID, addr0Str }, }, } @@ -321,7 +330,9 @@ func (suite *KeeperTestSuite) TestCancelProposal() { func TestMigrateProposalMessages(t *testing.T) { content := v1beta1.NewTextProposal("Test", "description") - contentMsg, err := v1.NewLegacyContent(content, sdk.AccAddress("test1").String()) + addr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(sdk.AccAddress("test1")) + require.NoError(t, err) + contentMsg, err := v1.NewLegacyContent(content, addr) require.NoError(t, err) content, err = v1.LegacyContentFromMessage(contentMsg) require.NoError(t, err) diff --git a/x/gov/keeper/tally_test.go b/x/gov/keeper/tally_test.go index 723cfb779f31..fa1109b03115 100644 --- a/x/gov/keeper/tally_test.go +++ b/x/gov/keeper/tally_test.go @@ -145,9 +145,13 @@ func TestTally_Standard(t *testing.T) { name: "one delegator votes: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -170,9 +174,13 @@ func TestTally_Standard(t *testing.T) { name: "one delegator votes yes, validator votes also yes: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -196,9 +204,13 @@ func TestTally_Standard(t *testing.T) { name: "one delegator votes yes, validator votes no: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -227,15 +239,21 @@ func TestTally_Standard(t *testing.T) { name: "delegator with mixed delegations: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) + val1Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[1]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{ { - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(21), }, { - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[1].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val1Addr, Shares: sdkmath.LegacyNewDec(21), }, } @@ -460,8 +478,10 @@ func TestTally_Standard(t *testing.T) { DoAndReturn( func(ctx context.Context, fn func(index int64, validator sdk.ValidatorI) bool) error { for i := int64(0); i < int64(numVals); i++ { + valAddr, err := mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(valAddrs[i]) + require.NoError(t, err) fn(i, stakingtypes.Validator{ - OperatorAddress: valAddrs[i].String(), + OperatorAddress: valAddr, Status: stakingtypes.Bonded, Tokens: sdkmath.NewInt(1000000), DelegatorShares: sdkmath.LegacyNewDec(1000000), @@ -591,9 +611,13 @@ func TestTally_Expedited(t *testing.T) { name: "one delegator votes: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -616,9 +640,13 @@ func TestTally_Expedited(t *testing.T) { name: "one delegator votes yes, validator votes also yes: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -642,9 +670,13 @@ func TestTally_Expedited(t *testing.T) { name: "one delegator votes yes, validator votes no: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -673,15 +705,21 @@ func TestTally_Expedited(t *testing.T) { name: "delegator with mixed delegations: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) + val1Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[1]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{ { - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(21), }, { - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[1].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val1Addr, Shares: sdkmath.LegacyNewDec(21), }, } @@ -910,8 +948,10 @@ func TestTally_Expedited(t *testing.T) { DoAndReturn( func(ctx context.Context, fn func(index int64, validator sdk.ValidatorI) bool) error { for i := int64(0); i < int64(numVals); i++ { + valAddr, err := mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(valAddrs[i]) + require.NoError(t, err) fn(i, stakingtypes.Validator{ - OperatorAddress: valAddrs[i].String(), + OperatorAddress: valAddr, Status: stakingtypes.Bonded, Tokens: sdkmath.NewInt(1000000), DelegatorShares: sdkmath.LegacyNewDec(1000000), @@ -1001,9 +1041,13 @@ func TestTally_Optimistic(t *testing.T) { name: "one delegator votes: threshold no not reached, prop passes", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_THREE) @@ -1068,8 +1112,10 @@ func TestTally_Optimistic(t *testing.T) { DoAndReturn( func(ctx context.Context, fn func(index int64, validator sdk.ValidatorI) bool) error { for i := int64(0); i < int64(numVals); i++ { + valAddr, err := mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(valAddrs[i]) + require.NoError(t, err) fn(i, stakingtypes.Validator{ - OperatorAddress: valAddrs[i].String(), + OperatorAddress: valAddr, Status: stakingtypes.Bonded, Tokens: sdkmath.NewInt(1000000), DelegatorShares: sdkmath.LegacyNewDec(1000000), @@ -1199,9 +1245,13 @@ func TestTally_MultipleChoice(t *testing.T) { name: "one delegator votes: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -1224,9 +1274,13 @@ func TestTally_MultipleChoice(t *testing.T) { name: "one delegator votes yes, validator votes also yes: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -1250,9 +1304,13 @@ func TestTally_MultipleChoice(t *testing.T) { name: "one delegator votes yes, validator votes no: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{{ - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(42), }} delegatorVote(s, s.delAddrs[0], delegations, v1.VoteOption_VOTE_OPTION_ONE) @@ -1281,15 +1339,21 @@ func TestTally_MultipleChoice(t *testing.T) { name: "delegator with mixed delegations: prop fails/burn deposit", setup: func(s tallyFixture) { setTotalBonded(s, 10000000) + del0Addr, err := s.mocks.acctKeeper.AddressCodec().BytesToString(s.delAddrs[0]) + require.NoError(t, err) + val0Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[0]) + require.NoError(t, err) + val1Addr, err := s.mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(s.valAddrs[1]) + require.NoError(t, err) delegations := []stakingtypes.Delegation{ { - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[0].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val0Addr, Shares: sdkmath.LegacyNewDec(21), }, { - DelegatorAddress: s.delAddrs[0].String(), - ValidatorAddress: s.valAddrs[1].String(), + DelegatorAddress: del0Addr, + ValidatorAddress: val1Addr, Shares: sdkmath.LegacyNewDec(21), }, } @@ -1434,8 +1498,10 @@ func TestTally_MultipleChoice(t *testing.T) { DoAndReturn( func(ctx context.Context, fn func(index int64, validator sdk.ValidatorI) bool) error { for i := int64(0); i < int64(numVals); i++ { + valAddr, err := mocks.stakingKeeper.ValidatorAddressCodec().BytesToString(valAddrs[i]) + require.NoError(t, err) fn(i, stakingtypes.Validator{ - OperatorAddress: valAddrs[i].String(), + OperatorAddress: valAddr, Status: stakingtypes.Bonded, Tokens: sdkmath.NewInt(1000000), DelegatorShares: sdkmath.LegacyNewDec(1000000), diff --git a/x/gov/keeper/vote.go b/x/gov/keeper/vote.go index 41805fe0b891..1e635c34c0a1 100644 --- a/x/gov/keeper/vote.go +++ b/x/gov/keeper/vote.go @@ -68,7 +68,11 @@ func (k Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr sdk.Ac } } - vote := v1.NewVote(proposalID, voterAddr, options, metadata) + voterStrAddr, err := k.authKeeper.AddressCodec().BytesToString(voterAddr) + if err != nil { + return err + } + vote := v1.NewVote(proposalID, voterStrAddr, options, metadata) err = k.Votes.Set(ctx, collections.Join(proposalID, voterAddr), vote) if err != nil { return err @@ -80,7 +84,7 @@ func (k Keeper) AddVote(ctx context.Context, proposalID uint64, voterAddr sdk.Ac } return k.environment.EventService.EventManager(ctx).EmitKV(types.EventTypeProposalVote, - event.NewAttribute(types.AttributeKeyVoter, voterAddr.String()), + event.NewAttribute(types.AttributeKeyVoter, voterStrAddr), event.NewAttribute(types.AttributeKeyOption, options.String()), event.NewAttribute(types.AttributeKeyProposalID, fmt.Sprintf("%d", proposalID)), ) diff --git a/x/gov/keeper/vote_test.go b/x/gov/keeper/vote_test.go index 59905f8b07f5..b008f804f7e3 100644 --- a/x/gov/keeper/vote_test.go +++ b/x/gov/keeper/vote_test.go @@ -22,6 +22,11 @@ func TestVotes(t *testing.T) { addrs := simtestutil.AddTestAddrsIncremental(bankKeeper, stakingKeeper, ctx, 2, sdkmath.NewInt(10000000)) authKeeper.EXPECT().AddressCodec().Return(address.NewBech32Codec("cosmos")).AnyTimes() + addrs0Str, err := authKeeper.AddressCodec().BytesToString(addrs[0]) + require.NoError(t, err) + addrs1Str, err := authKeeper.AddressCodec().BytesToString(addrs[1]) + require.NoError(t, err) + tp := TestProposal proposal, err := govKeeper.SubmitProposal(ctx, tp, "", "title", "description", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) @@ -41,7 +46,7 @@ func TestVotes(t *testing.T) { require.NoError(t, govKeeper.AddVote(ctx, proposalID, addrs[0], v1.NewNonSplitVoteOption(v1.OptionAbstain), metadata)) vote, err := govKeeper.Votes.Get(ctx, collections.Join(proposalID, addrs[0])) require.Nil(t, err) - require.Equal(t, addrs[0].String(), vote.Voter) + require.Equal(t, addrs0Str, vote.Voter) require.Equal(t, proposalID, vote.ProposalId) require.True(t, len(vote.Options) == 1) require.Equal(t, v1.OptionAbstain, vote.Options[0].Option) @@ -50,7 +55,7 @@ func TestVotes(t *testing.T) { require.NoError(t, govKeeper.AddVote(ctx, proposalID, addrs[0], v1.NewNonSplitVoteOption(v1.OptionYes), "")) vote, err = govKeeper.Votes.Get(ctx, collections.Join(proposalID, addrs[0])) require.Nil(t, err) - require.Equal(t, addrs[0].String(), vote.Voter) + require.Equal(t, addrs0Str, vote.Voter) require.Equal(t, proposalID, vote.ProposalId) require.True(t, len(vote.Options) == 1) require.Equal(t, v1.OptionYes, vote.Options[0].Option) @@ -64,7 +69,7 @@ func TestVotes(t *testing.T) { }, "")) vote, err = govKeeper.Votes.Get(ctx, collections.Join(proposalID, addrs[1])) require.Nil(t, err) - require.Equal(t, addrs[1].String(), vote.Voter) + require.Equal(t, addrs1Str, vote.Voter) require.Equal(t, proposalID, vote.ProposalId) require.True(t, len(vote.Options) == 4) require.Equal(t, v1.OptionYes, vote.Options[0].Option) @@ -90,11 +95,11 @@ func TestVotes(t *testing.T) { return false, nil })) require.Equal(t, votes, propVotes) - require.Equal(t, addrs[0].String(), votes[0].Voter) + require.Equal(t, addrs0Str, votes[0].Voter) require.Equal(t, proposalID, votes[0].ProposalId) require.True(t, len(votes[0].Options) == 1) require.Equal(t, v1.OptionYes, votes[0].Options[0].Option) - require.Equal(t, addrs[1].String(), votes[1].Voter) + require.Equal(t, addrs1Str, votes[1].Voter) require.Equal(t, proposalID, votes[1].ProposalId) require.True(t, len(votes[1].Options) == 4) require.Equal(t, votes[1].Options[0].Weight, sdkmath.LegacyNewDecWithPrec(60, 2).String()) diff --git a/x/gov/module.go b/x/gov/module.go index 6effa507b528..f88ed628a4fe 100644 --- a/x/gov/module.go +++ b/x/gov/module.go @@ -123,7 +123,11 @@ func (am AppModule) RegisterInvariants(ir sdk.InvariantRegistry) { // RegisterServices registers module services. func (am AppModule) RegisterServices(registrar grpc.ServiceRegistrar) error { msgServer := keeper.NewMsgServerImpl(am.keeper) - v1beta1.RegisterMsgServer(registrar, keeper.NewLegacyMsgServerImpl(am.accountKeeper.GetModuleAddress(govtypes.ModuleName).String(), msgServer)) + addr, err := am.accountKeeper.AddressCodec().BytesToString(am.accountKeeper.GetModuleAddress(govtypes.ModuleName)) + if err != nil { + return err + } + v1beta1.RegisterMsgServer(registrar, keeper.NewLegacyMsgServerImpl(addr, msgServer)) v1.RegisterMsgServer(registrar, msgServer) v1beta1.RegisterQueryServer(registrar, keeper.NewLegacyQueryServer(am.keeper)) diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index 749106a58262..6941bcc87d38 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -185,8 +185,11 @@ func SimulateMsgSubmitLegacyProposal( return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "content is nil"), nil, nil } - govacc := k.GetGovernanceAccount(ctx) - contentMsg, err := v1.NewLegacyContent(content, govacc.GetAddress().String()) + govacc, err := ak.AddressCodec().BytesToString(k.GetGovernanceAccount(ctx).GetAddress()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "error getting governance account address"), nil, err + } + contentMsg, err := v1.NewLegacyContent(content, govacc) if err != nil { return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "error converting legacy content into proposal message"), nil, err } @@ -245,10 +248,14 @@ func simulateMsgSubmitProposal( proposalType = v1.ProposalType_PROPOSAL_TYPE_EXPEDITED } + accAddr, err := ak.AddressCodec().BytesToString(simAccount.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgSubmitProposal, "error getting simAccount address"), nil, err + } msg, err := v1.NewMsgSubmitProposal( proposalMsgs, deposit, - simAccount.Address.String(), + accAddr, simtypes.RandStringOfLength(r, 100), simtypes.RandStringOfLength(r, 100), simtypes.RandStringOfLength(r, 100), @@ -343,7 +350,11 @@ func SimulateMsgDeposit( return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "unable to generate deposit"), nil, err } - msg := v1.NewMsgDeposit(simAccount.Address, proposalID, deposit) + addr, err := ak.AddressCodec().BytesToString(simAccount.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgDeposit, "unable to get simAccount address"), nil, err + } + msg := v1.NewMsgDeposit(addr, proposalID, deposit) account := ak.GetAccount(ctx, simAccount.Address) spendable := bk.SpendableCoins(ctx, account.GetAddress()) @@ -413,7 +424,11 @@ func operationSimulateMsgVote( } option := randomVotingOption(r) - msg := v1.NewMsgVote(simAccount.Address, proposalID, option, "") + addr, err := ak.AddressCodec().BytesToString(simAccount.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgVote, "unable to get simAccount address"), nil, err + } + msg := v1.NewMsgVote(addr, proposalID, option, "") account := ak.GetAccount(ctx, simAccount.Address) spendable := bk.SpendableCoins(ctx, account.GetAddress()) @@ -476,7 +491,11 @@ func operationSimulateMsgVoteWeighted( } options := randomWeightedVotingOptions(r) - msg := v1.NewMsgVoteWeighted(simAccount.Address, proposalID, options, "") + addr, err := ak.AddressCodec().BytesToString(simAccount.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgVoteWeighted, "unable to get simAccount address"), nil, err + } + msg := v1.NewMsgVoteWeighted(addr, proposalID, options, "") account := ak.GetAccount(ctx, simAccount.Address) spendable := bk.SpendableCoins(ctx, account.GetAddress()) @@ -516,7 +535,11 @@ func SimulateMsgCancelProposal( return simtypes.NoOpMsg(types.ModuleName, TypeMsgCancelProposal, "no proposals found"), nil, nil } - if proposal.Proposer != simAccount.Address.String() { + proposerAddr, err := ak.AddressCodec().BytesToString(simAccount.Address) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgCancelProposal, "invalid proposer"), nil, err + } + if proposal.Proposer != proposerAddr { return simtypes.NoOpMsg(types.ModuleName, TypeMsgCancelProposal, "invalid proposer"), nil, nil } @@ -527,7 +550,11 @@ func SimulateMsgCancelProposal( account := ak.GetAccount(ctx, simAccount.Address) spendable := bk.SpendableCoins(ctx, account.GetAddress()) - msg := v1.NewMsgCancelProposal(proposal.Id, account.GetAddress().String()) + accAddr, err := ak.AddressCodec().BytesToString(account.GetAddress()) + if err != nil { + return simtypes.NoOpMsg(types.ModuleName, TypeMsgCancelProposal, "could not get account address"), nil, err + } + msg := v1.NewMsgCancelProposal(proposal.Id, accAddr) txCtx := simulation.OperationInput{ R: r, diff --git a/x/gov/types/v1/deposit.go b/x/gov/types/v1/deposit.go index 2ddbd8c221ac..a35d6928cf9a 100644 --- a/x/gov/types/v1/deposit.go +++ b/x/gov/types/v1/deposit.go @@ -7,8 +7,8 @@ import ( ) // NewDeposit creates a new Deposit instance -func NewDeposit(proposalID uint64, depositor sdk.AccAddress, amount sdk.Coins) Deposit { - return Deposit{proposalID, depositor.String(), amount} +func NewDeposit(proposalID uint64, depositor string, amount sdk.Coins) Deposit { + return Deposit{proposalID, depositor, amount} } // Deposits is a collection of Deposit objects diff --git a/x/gov/types/v1/msgs.go b/x/gov/types/v1/msgs.go index 010bc65605be..d25a9ed33aad 100644 --- a/x/gov/types/v1/msgs.go +++ b/x/gov/types/v1/msgs.go @@ -87,18 +87,18 @@ func NewMultipleChoiceMsgSubmitProposal( } // NewMsgDeposit creates a new MsgDeposit instance -func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins) *MsgDeposit { - return &MsgDeposit{proposalID, depositor.String(), amount} +func NewMsgDeposit(depositor string, proposalID uint64, amount sdk.Coins) *MsgDeposit { + return &MsgDeposit{proposalID, depositor, amount} } // NewMsgVote creates a message to cast a vote on an active proposal -func NewMsgVote(voter sdk.AccAddress, proposalID uint64, option VoteOption, metadata string) *MsgVote { - return &MsgVote{proposalID, voter.String(), option, metadata} +func NewMsgVote(voter string, proposalID uint64, option VoteOption, metadata string) *MsgVote { + return &MsgVote{proposalID, voter, option, metadata} } // NewMsgVoteWeighted creates a message to cast a vote on an active proposal -func NewMsgVoteWeighted(voter sdk.AccAddress, proposalID uint64, options WeightedVoteOptions, metadata string) *MsgVoteWeighted { - return &MsgVoteWeighted{proposalID, voter.String(), options, metadata} +func NewMsgVoteWeighted(voter string, proposalID uint64, options WeightedVoteOptions, metadata string) *MsgVoteWeighted { + return &MsgVoteWeighted{proposalID, voter, options, metadata} } // NewMsgExecLegacyContent creates a new MsgExecLegacyContent instance. diff --git a/x/gov/types/v1/msgs_test.go b/x/gov/types/v1/msgs_test.go index 29155a123be4..ad266b15e008 100644 --- a/x/gov/types/v1/msgs_test.go +++ b/x/gov/types/v1/msgs_test.go @@ -10,6 +10,7 @@ import ( v1 "cosmossdk.io/x/gov/types/v1" "github.com/cosmos/cosmos-sdk/codec" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -33,7 +34,9 @@ func init() { func TestMsgDepositGetSignBytes(t *testing.T) { addr := sdk.AccAddress("addr1") - msg := v1.NewMsgDeposit(addr, 0, coinsPos) + addrStr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(addr) + require.NoError(t, err) + msg := v1.NewMsgDeposit(addrStr, 0, coinsPos) pc := codec.NewProtoCodec(types.NewInterfaceRegistry()) res, err := pc.MarshalAminoJSON(msg) require.NoError(t, err) @@ -44,6 +47,8 @@ func TestMsgDepositGetSignBytes(t *testing.T) { // this tests that Amino JSON MsgSubmitProposal.GetSignBytes() still works with Content as Any using the ModuleCdc func TestMsgSubmitProposal_GetSignBytes(t *testing.T) { pc := codec.NewProtoCodec(types.NewInterfaceRegistry()) + addr0Str, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(addrs[0]) + require.NoError(t, err) testcases := []struct { name string proposal []sdk.Msg @@ -54,7 +59,7 @@ func TestMsgSubmitProposal_GetSignBytes(t *testing.T) { }{ { "MsgVote", - []sdk.Msg{v1.NewMsgVote(addrs[0], 1, v1.OptionYes, "")}, + []sdk.Msg{v1.NewMsgVote(addr0Str, 1, v1.OptionYes, "")}, "gov/MsgVote", "Proposal for a governance vote msg", v1.ProposalType_PROPOSAL_TYPE_STANDARD, diff --git a/x/gov/types/v1/params.go b/x/gov/types/v1/params.go index 66efdf0d43c9..1f594e368cca 100644 --- a/x/gov/types/v1/params.go +++ b/x/gov/types/v1/params.go @@ -260,7 +260,7 @@ func (p Params) ValidateBasic(addressCodec address.Codec) error { } if len(p.ProposalCancelDest) != 0 { - _, err := sdk.AccAddressFromBech32(p.ProposalCancelDest) + _, err := addressCodec.StringToBytes(p.ProposalCancelDest) if err != nil { return fmt.Errorf("deposits destination address is invalid: %s", p.ProposalCancelDest) } diff --git a/x/gov/types/v1/proposal.go b/x/gov/types/v1/proposal.go index 47615313fe11..aec495ff2040 100644 --- a/x/gov/types/v1/proposal.go +++ b/x/gov/types/v1/proposal.go @@ -23,7 +23,7 @@ const ( ) // NewProposal creates a new Proposal instance -func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.Time, metadata, title, summary string, proposer sdk.AccAddress, proposalType ProposalType) (Proposal, error) { +func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time.Time, metadata, title, summary, proposer string, proposalType ProposalType) (Proposal, error) { msgs, err := sdktx.SetMsgs(messages) if err != nil { return Proposal{}, err @@ -46,7 +46,7 @@ func NewProposal(messages []sdk.Msg, id uint64, submitTime, depositEndTime time. DepositEndTime: &depositEndTime, Title: title, Summary: summary, - Proposer: proposer.String(), + Proposer: proposer, ProposalType: proposalType, } diff --git a/x/gov/types/v1/proposals_test.go b/x/gov/types/v1/proposals_test.go index 2152a60e1bbb..01e01d392af7 100644 --- a/x/gov/types/v1/proposals_test.go +++ b/x/gov/types/v1/proposals_test.go @@ -37,7 +37,7 @@ func TestNestedAnys(t *testing.T) { testProposal := v1beta1.NewTextProposal("Proposal", "testing proposal") msgContent, err := v1.NewLegacyContent(testProposal, "cosmos1govacct") require.NoError(t, err) - proposal, err := v1.NewProposal([]sdk.Msg{msgContent}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_STANDARD) + proposal, err := v1.NewProposal([]sdk.Msg{msgContent}, 1, time.Now(), time.Now(), "", "title", "summary", "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) require.NotPanics(t, func() { _ = proposal.String() }) @@ -46,12 +46,12 @@ func TestNestedAnys(t *testing.T) { func TestProposalSetExpedited(t *testing.T) { const startExpedited = false - proposal, err := v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_STANDARD) + proposal, err := v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", v1.ProposalType_PROPOSAL_TYPE_STANDARD) require.NoError(t, err) require.Equal(t, startExpedited, proposal.Expedited) require.Equal(t, proposal.ProposalType, v1.ProposalType_PROPOSAL_TYPE_STANDARD) - proposal, err = v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), v1.ProposalType_PROPOSAL_TYPE_EXPEDITED) + proposal, err = v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", v1.ProposalType_PROPOSAL_TYPE_EXPEDITED) require.NoError(t, err) require.Equal(t, !startExpedited, proposal.Expedited) require.Equal(t, proposal.ProposalType, v1.ProposalType_PROPOSAL_TYPE_EXPEDITED) @@ -73,7 +73,7 @@ func TestProposalGetMinDepositFromParams(t *testing.T) { } for _, tc := range testcases { - proposal, err := v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", sdk.AccAddress("cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r"), tc.proposalType) + proposal, err := v1.NewProposal([]sdk.Msg{}, 1, time.Now(), time.Now(), "", "title", "summary", "cosmos1ghekyjucln7y67ntx7cf27m9dpuxxemn4c8g4r", tc.proposalType) require.NoError(t, err) actualMinDeposit := proposal.GetMinDepositFromParams(v1.DefaultParams()) diff --git a/x/gov/types/v1/vote.go b/x/gov/types/v1/vote.go index fcd40a061660..f88b5a627e1a 100644 --- a/x/gov/types/v1/vote.go +++ b/x/gov/types/v1/vote.go @@ -6,8 +6,6 @@ import ( "strings" "cosmossdk.io/math" - - sdk "github.com/cosmos/cosmos-sdk/types" ) const ( @@ -25,8 +23,8 @@ const ( ) // NewVote creates a new Vote instance -func NewVote(proposalID uint64, voter sdk.AccAddress, options WeightedVoteOptions, metadata string) Vote { - return Vote{ProposalId: proposalID, Voter: voter.String(), Options: options, Metadata: metadata} +func NewVote(proposalID uint64, voter string, options WeightedVoteOptions, metadata string) Vote { + return Vote{ProposalId: proposalID, Voter: voter, Options: options, Metadata: metadata} } // Empty returns whether a vote is empty. diff --git a/x/gov/types/v1beta1/deposit.go b/x/gov/types/v1beta1/deposit.go index c9945b420990..48d901a2b197 100644 --- a/x/gov/types/v1beta1/deposit.go +++ b/x/gov/types/v1beta1/deposit.go @@ -7,8 +7,8 @@ import ( ) // NewDeposit creates a new Deposit instance -func NewDeposit(proposalID uint64, depositor sdk.AccAddress, amount sdk.Coins) Deposit { - return Deposit{proposalID, depositor.String(), amount} +func NewDeposit(proposalID uint64, depositor string, amount sdk.Coins) Deposit { + return Deposit{proposalID, depositor, amount} } // Empty returns whether a deposit is empty. diff --git a/x/gov/types/v1beta1/msgs.go b/x/gov/types/v1beta1/msgs.go index 1f8a62019f05..298f26c592eb 100644 --- a/x/gov/types/v1beta1/msgs.go +++ b/x/gov/types/v1beta1/msgs.go @@ -24,10 +24,10 @@ var ( ) // NewMsgSubmitProposal creates a new MsgSubmitProposal. -func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer sdk.AccAddress) (*MsgSubmitProposal, error) { +func NewMsgSubmitProposal(content Content, initialDeposit sdk.Coins, proposer string) (*MsgSubmitProposal, error) { m := &MsgSubmitProposal{ InitialDeposit: initialDeposit, - Proposer: proposer.String(), + Proposer: proposer, } err := m.SetContent(content) if err != nil { @@ -54,8 +54,8 @@ func (m *MsgSubmitProposal) SetInitialDeposit(coins sdk.Coins) { } // SetProposer sets the given proposer address for MsgSubmitProposal. -func (m *MsgSubmitProposal) SetProposer(address fmt.Stringer) { - m.Proposer = address.String() +func (m *MsgSubmitProposal) SetProposer(address string) { + m.Proposer = address } // SetContent sets the content for MsgSubmitProposal. @@ -79,16 +79,16 @@ func (m MsgSubmitProposal) UnpackInterfaces(unpacker codectypes.AnyUnpacker) err } // NewMsgDeposit creates a new MsgDeposit instance -func NewMsgDeposit(depositor sdk.AccAddress, proposalID uint64, amount sdk.Coins) *MsgDeposit { - return &MsgDeposit{proposalID, depositor.String(), amount} +func NewMsgDeposit(depositor string, proposalID uint64, amount sdk.Coins) *MsgDeposit { + return &MsgDeposit{proposalID, depositor, amount} } // NewMsgVote creates a message to cast a vote on an active proposal -func NewMsgVote(voter sdk.AccAddress, proposalID uint64, option VoteOption) *MsgVote { - return &MsgVote{proposalID, voter.String(), option} +func NewMsgVote(voter string, proposalID uint64, option VoteOption) *MsgVote { + return &MsgVote{proposalID, voter, option} } // NewMsgVoteWeighted creates a message to cast a vote on an active proposal. -func NewMsgVoteWeighted(voter sdk.AccAddress, proposalID uint64, options WeightedVoteOptions) *MsgVoteWeighted { - return &MsgVoteWeighted{proposalID, voter.String(), options} +func NewMsgVoteWeighted(voter string, proposalID uint64, options WeightedVoteOptions) *MsgVoteWeighted { + return &MsgVoteWeighted{proposalID, voter, options} } diff --git a/x/gov/types/v1beta1/msgs_test.go b/x/gov/types/v1beta1/msgs_test.go index a190c80c3a70..791a8c9f6da7 100644 --- a/x/gov/types/v1beta1/msgs_test.go +++ b/x/gov/types/v1beta1/msgs_test.go @@ -6,6 +6,7 @@ import ( "github.com/stretchr/testify/require" "github.com/cosmos/cosmos-sdk/codec" + codectestutil "github.com/cosmos/cosmos-sdk/codec/testutil" "github.com/cosmos/cosmos-sdk/codec/types" sdk "github.com/cosmos/cosmos-sdk/types" ) @@ -20,7 +21,8 @@ func init() { } func TestMsgDepositGetSignBytes(t *testing.T) { - addr := sdk.AccAddress("addr1") + addr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(sdk.AccAddress("addr1")) + require.NoError(t, err) msg := NewMsgDeposit(addr, 0, coinsPos) pc := codec.NewProtoCodec(types.NewInterfaceRegistry()) res, err := pc.MarshalAminoJSON(msg) @@ -32,7 +34,9 @@ func TestMsgDepositGetSignBytes(t *testing.T) { // this tests that Amino JSON MsgSubmitProposal.GetSignBytes() still works with Content as Any using the ModuleCdc func TestMsgSubmitProposal_GetSignBytes(t *testing.T) { - msg, err := NewMsgSubmitProposal(NewTextProposal("test", "abcd"), sdk.NewCoins(), sdk.AccAddress{}) + addr, err := codectestutil.CodecOptions{}.GetAddressCodec().BytesToString(sdk.AccAddress{}) + require.NoError(t, err) + msg, err := NewMsgSubmitProposal(NewTextProposal("test", "abcd"), sdk.NewCoins(), addr) require.NoError(t, err) pc := codec.NewProtoCodec(types.NewInterfaceRegistry()) bz, err := pc.MarshalAminoJSON(msg) diff --git a/x/group/client/cli/prompt.go b/x/group/client/cli/prompt.go index 62056573f689..3cb018e02548 100644 --- a/x/group/client/cli/prompt.go +++ b/x/group/client/cli/prompt.go @@ -9,6 +9,7 @@ import ( "github.com/manifoldco/promptui" "github.com/spf13/cobra" + "cosmossdk.io/core/address" govcli "cosmossdk.io/x/gov/client/cli" govtypes "cosmossdk.io/x/gov/types" @@ -31,9 +32,9 @@ type proposalType struct { } // Prompt the proposal type values and return the proposal and its metadata. -func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool) (*Proposal, govtypes.ProposalMetadata, error) { +func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool, addressCodec address.Codec) (*Proposal, govtypes.ProposalMetadata, error) { // set metadata - metadata, err := govcli.PromptMetadata(skipMetadata) + metadata, err := govcli.PromptMetadata(skipMetadata, addressCodec) if err != nil { return nil, metadata, fmt.Errorf("failed to set proposal metadata: %w", err) } @@ -71,7 +72,7 @@ func (p *proposalType) Prompt(cdc codec.Codec, skipMetadata bool) (*Proposal, go } // set messages field - result, err := govcli.Prompt(p.Msg, "msg") + result, err := govcli.Prompt(p.Msg, "msg", addressCodec) if err != nil { return nil, metadata, fmt.Errorf("failed to set proposal message: %w", err) } @@ -142,7 +143,7 @@ func NewCmdDraftProposal() *cobra.Command { skipMetadataPrompt, _ := cmd.Flags().GetBool(flagSkipMetadata) - result, metadata, err := proposal.Prompt(clientCtx.Codec, skipMetadataPrompt) + result, metadata, err := proposal.Prompt(clientCtx.Codec, skipMetadataPrompt, clientCtx.AddressCodec) if err != nil { return err } diff --git a/x/params/client/cli/tx.go b/x/params/client/cli/tx.go index 3e3937a77b12..c768b298d12c 100644 --- a/x/params/client/cli/tx.go +++ b/x/params/client/cli/tx.go @@ -67,7 +67,11 @@ Where proposal.json contains: return err } - from := clientCtx.GetFromAddress() + from, err := clientCtx.AddressCodec.BytesToString(clientCtx.GetFromAddress()) + if err != nil { + return err + } + content := paramproposal.NewParameterChangeProposal( proposal.Title, proposal.Description, proposal.Changes.ToParamChanges(), ) From 23723bef2152b89175d3dcdfbbc74090bf93a872 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 11:31:09 +0100 Subject: [PATCH 19/20] build(deps): Bump github.com/creachadair/atomicfile from 0.3.3 to 0.3.4 in /tools/confix (#19864) Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> --- simapp/go.mod | 2 +- simapp/go.sum | 8 ++++---- tools/confix/go.mod | 2 +- tools/confix/go.sum | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/simapp/go.mod b/simapp/go.mod index 7af6d8757346..f038e990b5cb 100644 --- a/simapp/go.mod +++ b/simapp/go.mod @@ -84,7 +84,7 @@ require ( github.com/cosmos/iavl v1.1.1 // indirect github.com/cosmos/ics23/go v0.10.0 // indirect github.com/cosmos/ledger-cosmos-go v0.13.3 // indirect - github.com/creachadair/atomicfile v0.3.3 // indirect + github.com/creachadair/atomicfile v0.3.4 // indirect github.com/creachadair/tomledit v0.0.26 // indirect github.com/danieljoos/wincred v1.2.1 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect diff --git a/simapp/go.sum b/simapp/go.sum index 672f05f1fcd2..abf11ada5f49 100644 --- a/simapp/go.sum +++ b/simapp/go.sum @@ -361,10 +361,10 @@ github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5X github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/atomicfile v0.3.3 h1:yJlDq8qk9QmD/6ol+jq1X4bcoLNVdYq95+owOnauziE= -github.com/creachadair/atomicfile v0.3.3/go.mod h1:X1r9P4wigJlGkYJO1HXZREdkVn+b1yHrsBBMLSj7tak= -github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce h1:BFjvg2Oq88/2DOcUFu1ScIwKUn7KJYYvLr6AeuCJD54= -github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce/go.mod h1:okn1ft6DY+qjPmnvYynyq7ufIQKJ2x2qwOCJZecei1k= +github.com/creachadair/atomicfile v0.3.4 h1:AjNK7To+S1p+nk7uJXJMZFpcV9XHOyAaULyDeU6LEqM= +github.com/creachadair/atomicfile v0.3.4/go.mod h1:ByEUbfQyms+tRtE7Wk7WdS6PZeyMzfSFlNX1VoKEh6E= +github.com/creachadair/mds v0.13.3 h1:OqXNRorXKsuvfjor+0ixtrpA4IINApH8zgm23XLlngk= +github.com/creachadair/mds v0.13.3/go.mod h1:4vrFYUzTXMJpMBU+OA292I6IUxKWCCfZkgXg+/kBZMo= github.com/creachadair/tomledit v0.0.26 h1:MoDdgHIHZ5PctBVsAZDjxdxreWUEa9ObPKTRkk5PPwA= github.com/creachadair/tomledit v0.0.26/go.mod h1:SJi1OxKpMyR141tq1lzsbPtIg3j8TeVPM/ZftfieD7o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= diff --git a/tools/confix/go.mod b/tools/confix/go.mod index 926c76737734..c090791179cd 100644 --- a/tools/confix/go.mod +++ b/tools/confix/go.mod @@ -4,7 +4,7 @@ go 1.21 require ( github.com/cosmos/cosmos-sdk v0.50.5 - github.com/creachadair/atomicfile v0.3.3 + github.com/creachadair/atomicfile v0.3.4 github.com/creachadair/tomledit v0.0.26 github.com/pelletier/go-toml/v2 v2.2.0 github.com/spf13/cobra v1.8.0 diff --git a/tools/confix/go.sum b/tools/confix/go.sum index 2507afc04db3..86f3b065168a 100644 --- a/tools/confix/go.sum +++ b/tools/confix/go.sum @@ -161,10 +161,10 @@ github.com/cosmos/ledger-cosmos-go v0.13.3/go.mod h1:HENcEP+VtahZFw38HZ3+LS3Iv5X github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE= github.com/cpuguy83/go-md2man/v2 v2.0.0-20190314233015-f79a8a8ca69d/go.mod h1:maD7wRr/U5Z6m/iR4s+kqSMx2CaBsrgA7czyZG/E6dU= github.com/cpuguy83/go-md2man/v2 v2.0.3/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o= -github.com/creachadair/atomicfile v0.3.3 h1:yJlDq8qk9QmD/6ol+jq1X4bcoLNVdYq95+owOnauziE= -github.com/creachadair/atomicfile v0.3.3/go.mod h1:X1r9P4wigJlGkYJO1HXZREdkVn+b1yHrsBBMLSj7tak= -github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce h1:BFjvg2Oq88/2DOcUFu1ScIwKUn7KJYYvLr6AeuCJD54= -github.com/creachadair/mtest v0.0.0-20231015022703-31f2ea539dce/go.mod h1:okn1ft6DY+qjPmnvYynyq7ufIQKJ2x2qwOCJZecei1k= +github.com/creachadair/atomicfile v0.3.4 h1:AjNK7To+S1p+nk7uJXJMZFpcV9XHOyAaULyDeU6LEqM= +github.com/creachadair/atomicfile v0.3.4/go.mod h1:ByEUbfQyms+tRtE7Wk7WdS6PZeyMzfSFlNX1VoKEh6E= +github.com/creachadair/mds v0.13.3 h1:OqXNRorXKsuvfjor+0ixtrpA4IINApH8zgm23XLlngk= +github.com/creachadair/mds v0.13.3/go.mod h1:4vrFYUzTXMJpMBU+OA292I6IUxKWCCfZkgXg+/kBZMo= github.com/creachadair/tomledit v0.0.26 h1:MoDdgHIHZ5PctBVsAZDjxdxreWUEa9ObPKTRkk5PPwA= github.com/creachadair/tomledit v0.0.26/go.mod h1:SJi1OxKpMyR141tq1lzsbPtIg3j8TeVPM/ZftfieD7o= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= From 6e9528a2f5e71b38e4866c57b4e9efd82ee4ee12 Mon Sep 17 00:00:00 2001 From: Emil Georgiev Date: Tue, 26 Mar 2024 13:19:18 +0200 Subject: [PATCH 20/20] test(sims): fix test cases feegrant (#19863) Co-authored-by: son trinh --- tests/sims/feegrant/operations_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sims/feegrant/operations_test.go b/tests/sims/feegrant/operations_test.go index 41e9fb1feb04..cf00c52389f8 100644 --- a/tests/sims/feegrant/operations_test.go +++ b/tests/sims/feegrant/operations_test.go @@ -86,6 +86,8 @@ func (suite *SimTestSuite) getTestingAccounts(r *rand.Rand, n int) []simtypes.Ac // add coins to the accounts for _, account := range accounts { + acc := suite.accountKeeper.NewAccountWithAddress(suite.ctx, account.Address) + suite.accountKeeper.SetAccount(suite.ctx, acc) err := banktestutil.FundAccount(suite.ctx, suite.bankKeeper, account.Address, initCoins) suite.Require().NoError(err) }