diff --git a/.golangci.yml b/.golangci.yml index 8f25778116..94d5cdaf2b 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -103,7 +103,6 @@ linters-settings: sections: - standard # Standard section: captures all standard packages. - default # Default section: contains all imports that could not be matched to another section type. - - prefix(github.com/Finschia/ostracon) - prefix(github.com/Finschia/finschia-sdk) revive: rules: diff --git a/CHANGELOG.md b/CHANGELOG.md index 3775132abc..1496383e1c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -39,6 +39,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ## [Unreleased](https://github.com/Finschia/finschia-sdk/compare/v0.48.0...HEAD) ### Features +* (consensus) [\#1178](https://github.com/Finschia/finschia-sdk/pull/1178) change the consensus from Ostracon to Tendermint v0.34.24 ### Improvements * (docs) [\#1120](https://github.com/Finschia/finschia-sdk/pull/1120) Update links in x/foundation README.md @@ -55,6 +56,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ ### Removed ### Breaking Changes +* (consensus) [\#1178](https://github.com/Finschia/finschia-sdk/pull/1178) change the consensus from Ostracon to Tendermint v0.34.24 ### State Machine Breaking diff --git a/Makefile b/Makefile index 8d7a75d490..1ddf69d1b0 100644 --- a/Makefile +++ b/Makefile @@ -142,7 +142,7 @@ mocks: $(MOCKS_DIR) mockgen -source=types/router.go -package mocks -destination tests/mocks/types_router.go mockgen -source=types/handler.go -package mocks -destination tests/mocks/types_handler.go mockgen -package mocks -destination tests/mocks/grpc_server.go github.com/gogo/protobuf/grpc Server - mockgen -package mocks -destination tests/mocks/tendermint_tendermint_libs_log_DB.go github.com/Finschia/ostracon/libs/log Logger + mockgen -package mocks -destination tests/mocks/tendermint_tendermint_libs_log_DB.go github.com/tendermint/tendermint/libs/log Logger mockgen -source=x/stakingplus/expected_keepers.go -package testutil -destination x/stakingplus/testutil/expected_keepers_mocks.go .PHONY: mocks diff --git a/README.md b/README.md index b2a4874660..d2cb933853 100644 --- a/README.md +++ b/README.md @@ -21,12 +21,6 @@ The following work was carried out to improve performance. - Use [fastcache](https://github.com/victoriametrics/fastcache) for inter block cache and nodedb cache of iavl - Lock granularity enhancement -In addition, the following functions were added: - -- Virtual machine using `cosmwasm` that makes smart contracts possible to be executed -- Use [Ostracon](https://github.com/Finschia/ostracon) as consensus engine instead of `Tendermint` - - To learn about Cosmos SDK, please refer [Cosmos SDK Docs](https://github.com/cosmos/cosmos-sdk/blob/master/docs). ## Quick Start diff --git a/baseapp/abci.go b/baseapp/abci.go index 6abb758ac6..57554321a3 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -17,8 +17,6 @@ import ( "google.golang.org/grpc/codes" grpcstatus "google.golang.org/grpc/status" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/codec" snapshottypes "github.com/Finschia/finschia-sdk/snapshots/types" "github.com/Finschia/finschia-sdk/telemetry" @@ -125,7 +123,7 @@ func (app *BaseApp) SetOption(req abci.RequestSetOption) (res abci.ResponseSetOp } // BeginBlock implements the ABCI application interface. -func (app *BaseApp) BeginBlock(req ocabci.RequestBeginBlock) (res abci.ResponseBeginBlock) { +func (app *BaseApp) BeginBlock(req abci.RequestBeginBlock) (res abci.ResponseBeginBlock) { defer telemetry.MeasureSince(time.Now(), "abci", "begin_block") if app.cms.TracingEnabled() { @@ -138,9 +136,6 @@ func (app *BaseApp) BeginBlock(req ocabci.RequestBeginBlock) (res abci.ResponseB panic(err) } - // set the signed validators for addition to context in deliverTx - app.voteInfos = req.LastCommitInfo.GetVotes() - // Initialize the DeliverTx state. If this is the first block, it should // already be initialized in InitChain. Otherwise app.deliverState will be // nil, since it is reset on Commit. @@ -165,7 +160,6 @@ func (app *BaseApp) BeginBlock(req ocabci.RequestBeginBlock) (res abci.ResponseB // NOTE: header hash is not set in NewContext, so we manually set it here app.deliverState.ctx = app.deliverState.ctx. - WithVoteInfos(app.voteInfos). WithBlockGasMeter(gasMeter). WithHeaderHash(req.Hash). WithConsensusParams(app.GetConsensusParams(app.deliverState.ctx)) @@ -228,63 +222,36 @@ func (app *BaseApp) EndBlock(req abci.RequestEndBlock) (res abci.ResponseEndBloc // internal CheckTx state if the AnteHandler passes. Otherwise, the ResponseCheckTx // will contain releveant error information. Regardless of tx execution outcome, // the ResponseCheckTx will contain relevant gas execution context. -func (app *BaseApp) CheckTxSync(req abci.RequestCheckTx) ocabci.ResponseCheckTx { +func (app *BaseApp) CheckTx(req abci.RequestCheckTx) abci.ResponseCheckTx { defer telemetry.MeasureSince(time.Now(), "abci", "check_tx") - if req.Type != abci.CheckTxType_New && req.Type != abci.CheckTxType_Recheck { - panic(fmt.Sprintf("unknown RequestCheckTx type: %s", req.Type)) - } + var mode runTxMode - tx, err := app.preCheckTx(req.Tx) - if err != nil { - return sdkerrors.ResponseCheckTx(err, 0, 0, app.trace) - } + switch { + case req.Type == abci.CheckTxType_New: + mode = runTxModeCheck - waits, signals := app.checkAccountWGs.Register(tx) + case req.Type == abci.CheckTxType_Recheck: + mode = runTxModeReCheck - app.checkAccountWGs.Wait(waits) - defer app.checkAccountWGs.Done(signals) + default: + panic(fmt.Sprintf("unknown RequestCheckTx type: %s", req.Type)) + } - gInfo, err := app.checkTx(req.Tx, tx, req.Type == abci.CheckTxType_Recheck) + gInfo, result, anteEvents, err := app.runTx(mode, req.Tx) if err != nil { - return sdkerrors.ResponseCheckTx(err, gInfo.GasWanted, gInfo.GasUsed, app.trace) - // return sdkerrors.ResponseCheckTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, anteEvents, app.trace) // TODO(dudong2): need to fix to use ResponseCheckTxWithEvents + return sdkerrors.ResponseCheckTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, anteEvents, app.trace) } - return ocabci.ResponseCheckTx{ + return abci.ResponseCheckTx{ GasWanted: int64(gInfo.GasWanted), // TODO: Should type accept unsigned ints? GasUsed: int64(gInfo.GasUsed), // TODO: Should type accept unsigned ints? + Log: result.Log, + Data: result.Data, + Events: sdk.MarkEventsToIndex(result.Events, app.indexEvents), } } -func (app *BaseApp) CheckTxAsync(req abci.RequestCheckTx, callback ocabci.CheckTxCallback) { - if req.Type != abci.CheckTxType_New && req.Type != abci.CheckTxType_Recheck { - panic(fmt.Sprintf("unknown RequestCheckTx type: %s", req.Type)) - } - - reqCheckTx := &RequestCheckTxAsync{ - txBytes: req.Tx, - recheck: req.Type == abci.CheckTxType_Recheck, - callback: callback, - prepare: waitGroup1(), - } - app.chCheckTx <- reqCheckTx - - go app.prepareCheckTx(reqCheckTx) -} - -// BeginRecheckTx implements the ABCI interface and set the check state based on the given header -func (app *BaseApp) BeginRecheckTx(req ocabci.RequestBeginRecheckTx) ocabci.ResponseBeginRecheckTx { - // NOTE: This is safe because Ostracon holds a lock on the mempool for Rechecking. - app.setCheckState(req.Header) - return ocabci.ResponseBeginRecheckTx{Code: abci.CodeTypeOK} -} - -// EndRecheckTx implements the ABCI interface. -func (app *BaseApp) EndRecheckTx(req ocabci.RequestEndRecheckTx) ocabci.ResponseEndRecheckTx { - return ocabci.ResponseEndRecheckTx{Code: abci.CodeTypeOK} -} - // DeliverTx implements the ABCI interface and executes a tx in DeliverTx mode. // State only gets persisted if all messages are valid and get executed successfully. // Otherwise, the ResponseDeliverTx will contain releveant error information. @@ -311,12 +278,7 @@ func (app *BaseApp) DeliverTx(req abci.RequestDeliverTx) (res abci.ResponseDeliv telemetry.SetGauge(float32(gInfo.GasWanted), "tx", "gas", "wanted") }() - tx, err := app.txDecoder(req.Tx) - if err != nil { - return sdkerrors.ResponseDeliverTx(err, 0, 0, app.trace) - } - - gInfo, result, anteEvents, err := app.runTx(req.Tx, tx, false) + gInfo, result, anteEvents, err := app.runTx(runTxModeDeliver, req.Tx) if err != nil { resultStr = "failed" return sdkerrors.ResponseDeliverTxWithEvents(err, gInfo.GasWanted, gInfo.GasUsed, sdk.MarkEventsToIndex(anteEvents, app.indexEvents), app.trace) @@ -350,6 +312,12 @@ func (app *BaseApp) Commit() (res abci.ResponseCommit) { commitID := app.cms.Commit() app.logger.Info("commit synced", "commit", fmt.Sprintf("%X", commitID)) + // Reset the Check state to the latest committed. + // + // NOTE: This is safe because Tendermint holds a lock on the mempool for + // Commit. Use the header from this latest block. + app.setCheckState(header) + // empty/reset the deliver state app.deliverState = nil @@ -690,11 +658,9 @@ func (app *BaseApp) createQueryContext(height int64, prove bool) (sdk.Context, e } // branch the commit-multistore for safety - app.checkStateMtx.RLock() ctx := sdk.NewContext( cacheMS, app.checkState.ctx.BlockHeader(), true, app.logger, ).WithMinGasPrices(app.minGasPrices).WithBlockHeight(height) - app.checkStateMtx.RUnlock() return ctx, nil } @@ -928,11 +894,9 @@ func (app *BaseApp) createQueryContextWithCheckState() sdk.Context { cacheMS := app.checkState.CacheMultiStore() // branch the commit-multistore for safety - app.checkStateMtx.RLock() ctx := sdk.NewContext( cacheMS, app.checkState.ctx.BlockHeader(), true, app.logger, ).WithMinGasPrices(app.minGasPrices).WithBlockHeight(app.LastBlockHeight()) - app.checkStateMtx.RUnlock() return ctx } diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index c4c047ad59..9b3f5cd661 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -9,8 +9,6 @@ import ( tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - sdk "github.com/Finschia/finschia-sdk/types" ) @@ -143,10 +141,10 @@ func TestBaseAppCreateQueryContext(t *testing.T) { err := app.init() require.NoError(t, err) - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) app.Commit() - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) app.Commit() testCases := []struct { @@ -195,7 +193,7 @@ func TestBaseAppBeginBlockConsensusParams(t *testing.T) { require.NoError(t, err) // set block params - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) ctx := app.deliverState.ctx maxGas := int64(123456789) app.paramStore.Set(ctx, ParamStoreKeyBlockParams, @@ -205,8 +203,8 @@ func TestBaseAppBeginBlockConsensusParams(t *testing.T) { app.Commit() // confirm consensus params updated into the context - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) - newCtx := app.getContextForTx(app.checkState, []byte{}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) + newCtx := app.getContextForTx(runTxModeCheck, []byte{}) require.Equal(t, maxGas, newCtx.ConsensusParams().Block.MaxGas) } diff --git a/baseapp/accountwgs.go b/baseapp/accountwgs.go deleted file mode 100644 index 65d75c404a..0000000000 --- a/baseapp/accountwgs.go +++ /dev/null @@ -1,85 +0,0 @@ -package baseapp - -import ( - "sync" - - sdk "github.com/Finschia/finschia-sdk/types" -) - -type AccountWGs struct { - mtx sync.Mutex - wgs map[string]*sync.WaitGroup -} - -func NewAccountWGs() *AccountWGs { - return &AccountWGs{ - wgs: make(map[string]*sync.WaitGroup), - } -} - -func (aw *AccountWGs) Register(tx sdk.Tx) (waits []*sync.WaitGroup, signals []*AccountWG) { - signers := getUniqSigners(tx) - - aw.mtx.Lock() - defer aw.mtx.Unlock() - for _, signer := range signers { - if wg := aw.wgs[signer]; wg != nil { - waits = append(waits, wg) - } - sig := waitGroup1() - aw.wgs[signer] = sig - signals = append(signals, NewAccountWG(signer, sig)) - } - - return waits, signals -} - -func (aw *AccountWGs) Wait(waits []*sync.WaitGroup) { - for _, wait := range waits { - wait.Wait() - } -} - -func (aw *AccountWGs) Done(signals []*AccountWG) { - aw.mtx.Lock() - defer aw.mtx.Unlock() - - for _, signal := range signals { - signal.wg.Done() - if aw.wgs[signal.acc] == signal.wg { - delete(aw.wgs, signal.acc) - } - } -} - -func getUniqSigners(tx sdk.Tx) []string { - seen := map[string]bool{} - var signers []string - for _, msg := range tx.GetMsgs() { - for _, addr := range msg.GetSigners() { - if !seen[addr.String()] { - signers = append(signers, string(addr)) - seen[addr.String()] = true - } - } - } - return signers -} - -type AccountWG struct { - acc string - wg *sync.WaitGroup -} - -func NewAccountWG(acc string, wg *sync.WaitGroup) *AccountWG { - return &AccountWG{ - acc: acc, - wg: wg, - } -} - -func waitGroup1() (wg *sync.WaitGroup) { - wg = &sync.WaitGroup{} - wg.Add(1) - return wg -} diff --git a/baseapp/accountwgs_test.go b/baseapp/accountwgs_test.go deleted file mode 100644 index 9a65a6f370..0000000000 --- a/baseapp/accountwgs_test.go +++ /dev/null @@ -1,103 +0,0 @@ -package baseapp - -import ( - "testing" - - "github.com/stretchr/testify/require" - - "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" - "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" -) - -func TestConvertByteSliceToString(t *testing.T) { - b := []byte{65, 66, 67, 0, 65, 66, 67} - s := string(b) - require.Equal(t, len(b), len(s)) - require.Equal(t, uint8(0), s[3]) -} - -func TestRegister(t *testing.T) { - app := setupBaseApp(t) - - privs := newTestPrivKeys(3) - tx := newTestTx(privs) - - waits, signals := app.checkAccountWGs.Register(tx) - - require.Equal(t, 0, len(waits)) - require.Equal(t, 3, len(signals)) - - for _, signal := range signals { - require.Equal(t, app.checkAccountWGs.wgs[signal.acc], signal.wg) - } -} - -func TestDontPanicWithNil(t *testing.T) { - app := setupBaseApp(t) - - require.NotPanics(t, func() { app.checkAccountWGs.Wait(nil) }) - require.NotPanics(t, func() { app.checkAccountWGs.Done(nil) }) -} - -func TestGetUniqSigners(t *testing.T) { - privs := newTestPrivKeys(3) - - addrs := getAddrs(privs) - addrs = append(addrs, addrs[1], addrs[0]) - require.Equal(t, 5, len(addrs)) - - tx := newTestTx(privs) - signers := getUniqSigners(tx) - - // length should be reduced because `duplicated` is removed - require.Less(t, len(signers), len(addrs)) - - // check uniqueness - for i, iv := range signers { - for j, jv := range signers { - if i != j { - require.True(t, iv != jv) - } - } - } -} - -type AccountLockTestTx struct { - Msgs []sdk.Msg -} - -var _ sdk.Tx = AccountLockTestTx{} - -func (tx AccountLockTestTx) GetMsgs() []sdk.Msg { - return tx.Msgs -} - -func (tx AccountLockTestTx) ValidateBasic() error { - return nil -} - -func newTestPrivKeys(num int) []*secp256k1.PrivKey { - privs := make([]*secp256k1.PrivKey, 0, num) - for i := 0; i < num; i++ { - privs = append(privs, secp256k1.GenPrivKey()) - } - return privs -} - -func getAddrs(privs []*secp256k1.PrivKey) []sdk.AccAddress { - addrs := make([]sdk.AccAddress, 0, len(privs)) - for _, priv := range privs { - addrs = append(addrs, sdk.AccAddress(priv.PubKey().Address())) - } - return addrs -} - -func newTestTx(privs []*secp256k1.PrivKey) sdk.Tx { - addrs := getAddrs(privs) - msgs := make([]sdk.Msg, len(addrs)) - for i, addr := range addrs { - msgs[i] = testdata.NewTestMsg(addr) - } - return AccountLockTestTx{Msgs: msgs} -} diff --git a/baseapp/baseapp.go b/baseapp/baseapp.go index 92de30a87d..493eb08fa4 100644 --- a/baseapp/baseapp.go +++ b/baseapp/baseapp.go @@ -5,19 +5,15 @@ import ( "fmt" "reflect" "strings" - "sync" "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/crypto/tmhash" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/crypto/tmhash" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec/types" - "github.com/Finschia/finschia-sdk/server/config" "github.com/Finschia/finschia-sdk/snapshots" "github.com/Finschia/finschia-sdk/store" "github.com/Finschia/finschia-sdk/store/rootmulti" @@ -26,9 +22,19 @@ import ( "github.com/Finschia/finschia-sdk/x/auth/legacy/legacytx" ) -var _ ocabci.Application = (*BaseApp)(nil) +const ( + runTxModeCheck runTxMode = iota // Check a transaction + runTxModeReCheck // Recheck a (pending) transaction after a commit + runTxModeSimulate // Simulate a transaction + runTxModeDeliver // Deliver a transaction +) + +var _ abci.Application = (*BaseApp)(nil) type ( + // Enum mode for app.runTx + runTxMode uint8 + // StoreLoader defines a customizable function to control how we load the CommitMultiStore // from disk. This is useful for state migration, when loading a datastore written with // an older version of the software. In particular, if a module changed the substore key name @@ -60,12 +66,6 @@ type BaseApp struct { //nolint: maligned checkState *state // for CheckTx deliverState *state // for DeliverTx - checkStateMtx sync.RWMutex - - checkAccountWGs *AccountWGs - chCheckTx chan *RequestCheckTxAsync - chCheckTxSize uint // chCheckTxSize is the initial size for chCheckTx - // paramStore is used to query for ABCI consensus parameters from an // application parameter store. paramStore ParamStore @@ -181,28 +181,19 @@ func NewBaseApp( grpcQueryRouter: NewGRPCQueryRouter(), msgServiceRouter: NewMsgServiceRouter(), }, - txDecoder: txDecoder, - checkAccountWGs: NewAccountWGs(), + txDecoder: txDecoder, } for _, option := range options { option(app) } - chCheckTxSize := app.chCheckTxSize - if chCheckTxSize == 0 { - chCheckTxSize = config.DefaultChanCheckTxSize - } - app.chCheckTx = make(chan *RequestCheckTxAsync, chCheckTxSize) - if app.interBlockCache != nil { app.cms.SetInterBlockCache(app.interBlockCache) } app.runTxRecoveryMiddleware = newDefaultRecoveryMiddleware() - app.startReactors() - return app } @@ -248,6 +239,9 @@ func (app *BaseApp) MountStores(keys ...sdk.StoreKey) { app.MountStore(key, sdk.StoreTypeDB) } + case *sdk.TransientStoreKey: + app.MountStore(key, sdk.StoreTypeTransient) + default: panic("Unrecognized store key type " + reflect.TypeOf(key).Name()) } @@ -268,6 +262,14 @@ func (app *BaseApp) MountKVStores(keys map[string]*sdk.KVStoreKey) { } } +// MountTransientStores mounts all transient stores to the provided keys in +// the BaseApp multistore. +func (app *BaseApp) MountTransientStores(keys map[string]*sdk.TransientStoreKey) { + for _, key := range keys { + app.MountStore(key, sdk.StoreTypeTransient) + } +} + // MountMemoryStores mounts all in-memory KVStores with the BaseApp's internal // commit multi-store. func (app *BaseApp) MountMemoryStores(keys map[string]*sdk.MemoryStoreKey) { @@ -416,16 +418,9 @@ func (app *BaseApp) IsSealed() bool { return app.sealed } // on Commit. func (app *BaseApp) setCheckState(header tmproto.Header) { ms := app.cms.CacheMultiStore() - app.checkStateMtx.Lock() - defer app.checkStateMtx.Unlock() - - ctx := sdk.NewContext(ms, header, true, app.logger). - WithMinGasPrices(app.minGasPrices). - WithVoteInfos(app.voteInfos) - app.checkState = &state{ ms: ms, - ctx: ctx, + ctx: sdk.NewContext(ms, header, true, app.logger).WithMinGasPrices(app.minGasPrices), } } @@ -519,7 +514,7 @@ func (app *BaseApp) getMaximumBlockGas(ctx sdk.Context) uint64 { } } -func (app *BaseApp) validateHeight(req ocabci.RequestBeginBlock) error { +func (app *BaseApp) validateHeight(req abci.RequestBeginBlock) error { if req.Header.Height < 1 { return fmt.Errorf("invalid height: %d", req.Header.Height) } @@ -562,28 +557,32 @@ func validateBasicTxMsgs(msgs []sdk.Msg) error { return nil } -func (app *BaseApp) getCheckContextForTx(txBytes []byte, recheck bool) sdk.Context { - app.checkStateMtx.RLock() - defer app.checkStateMtx.RUnlock() - return app.getContextForTx(app.checkState, txBytes).WithIsReCheckTx(recheck) +// Returns the application's deliverState if app is in runTxModeDeliver, +// otherwise it returns the application's checkstate. +func (app *BaseApp) getState(mode runTxMode) *state { + if mode == runTxModeDeliver { + return app.deliverState + } + + return app.checkState } // retrieve the context for the tx w/ txBytes and other memoized values. -func (app *BaseApp) getRunContextForTx(txBytes []byte, simulate bool) sdk.Context { - if !simulate { - return app.getContextForTx(app.deliverState, txBytes) +func (app *BaseApp) getContextForTx(mode runTxMode, txBytes []byte) sdk.Context { + ctx := app.getState(mode).ctx. + WithTxBytes(txBytes). + WithVoteInfos(app.voteInfos) + + ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) + + if mode == runTxModeReCheck { + ctx = ctx.WithIsReCheckTx(true) } - app.checkStateMtx.RLock() - defer app.checkStateMtx.RUnlock() - ctx := app.getContextForTx(app.checkState, txBytes) - ctx, _ = ctx.CacheContext() - return ctx -} + if mode == runTxModeSimulate { + ctx, _ = ctx.CacheContext() + } -func (app *BaseApp) getContextForTx(s *state, txBytes []byte) sdk.Context { - ctx := s.ctx.WithTxBytes(txBytes) - ctx = ctx.WithConsensusParams(app.GetConsensusParams(ctx)) return ctx } @@ -606,74 +605,6 @@ func (app *BaseApp) cacheTxContext(ctx sdk.Context, txBytes []byte) (sdk.Context return ctx.WithMultiStore(msCache), msCache } -// stateless checkTx -func (app *BaseApp) preCheckTx(txBytes []byte) (tx sdk.Tx, err error) { - defer func() { - if r := recover(); r != nil { - recoveryMW := newDefaultRecoveryMiddleware() - err = processRecovery(r, recoveryMW) - } - }() - - tx, err = app.txDecoder(txBytes) - if err != nil { - return tx, err - } - - msgs := tx.GetMsgs() - err = validateBasicTxMsgs(msgs) - - return tx, err -} - -func (app *BaseApp) PreCheckTx(txBytes []byte) (sdk.Tx, error) { - return app.preCheckTx(txBytes) -} - -func (app *BaseApp) checkTx(txBytes []byte, tx sdk.Tx, recheck bool) (gInfo sdk.GasInfo, err error) { - ctx := app.getCheckContextForTx(txBytes, recheck) - gasCtx := &ctx - - defer func() { - if r := recover(); r != nil { - recoveryMW := newDefaultRecoveryMiddleware() - err = processRecovery(r, recoveryMW) - } - gInfo = sdk.GasInfo{GasWanted: gasCtx.GasMeter().Limit(), GasUsed: gasCtx.GasMeter().GasConsumed()} - }() - - var anteCtx sdk.Context - anteCtx, err = app.anteTx(ctx, txBytes, tx, false) - if !anteCtx.IsZero() { - gasCtx = &anteCtx - } - - return gInfo, err -} - -func (app *BaseApp) anteTx(ctx sdk.Context, txBytes []byte, tx sdk.Tx, simulate bool) (sdk.Context, error) { - if app.anteHandler == nil { - return ctx, nil - } - - // Branch context before AnteHandler call in case it aborts. - // This is required for both CheckTx and DeliverTx. - // Ref: https://github.com/cosmos/cosmos-sdk/issues/2772 - // - // NOTE: Alternatively, we could require that AnteHandler ensures that - // writes do not happen if aborted/failed. This may have some - // performance benefits, but it'll be more difficult to get right. - anteCtx, msCache := app.cacheTxContext(ctx, txBytes) - anteCtx = anteCtx.WithEventManager(sdk.NewEventManager()) - newCtx, err := app.anteHandler(anteCtx, tx, simulate) - if err != nil { - return newCtx, err - } - - msCache.Write() - return newCtx, err -} - // runTx processes a transaction within a given execution mode, encoded transaction // bytes, and the decoded transaction itself. All state transitions occur through // a cached Context depending on the mode provided. State only gets persisted @@ -681,27 +612,32 @@ func (app *BaseApp) anteTx(ctx sdk.Context, txBytes []byte, tx sdk.Tx, simulate // Note, gas execution info is always returned. A reference to a Result is // returned if the tx does not run out of gas and if all the messages are valid // and execute successfully. An error is returned otherwise. -func (app *BaseApp) runTx(txBytes []byte, tx sdk.Tx, simulate bool) (gInfo sdk.GasInfo, result *sdk.Result, anteEvents []abci.Event, err error) { - ctx := app.getRunContextForTx(txBytes, simulate) +func (app *BaseApp) runTx(mode runTxMode, txBytes []byte) (gInfo sdk.GasInfo, result *sdk.Result, anteEvents []abci.Event, err error) { + // NOTE: GasWanted should be returned by the AnteHandler. GasUsed is + // determined by the GasMeter. We need access to the context to get the gas + // meter so we initialize upfront. + var gasWanted uint64 + + ctx := app.getContextForTx(mode, txBytes) ms := ctx.MultiStore() // only run the tx if there is block gas remaining - if !simulate && ctx.BlockGasMeter().IsOutOfGas() { + if mode == runTxModeDeliver && ctx.BlockGasMeter().IsOutOfGas() { return gInfo, nil, nil, sdkerrors.Wrap(sdkerrors.ErrOutOfGas, "no block gas left to run tx") } defer func() { if r := recover(); r != nil { - recoveryMW := newOutOfGasRecoveryMiddleware(ctx.GasMeter().Limit(), ctx, app.runTxRecoveryMiddleware) + recoveryMW := newOutOfGasRecoveryMiddleware(gasWanted, ctx, app.runTxRecoveryMiddleware) err, result = processRecovery(r, recoveryMW), nil } - gInfo = sdk.GasInfo{GasWanted: ctx.GasMeter().Limit(), GasUsed: ctx.GasMeter().GasConsumed()} + gInfo = sdk.GasInfo{GasWanted: gasWanted, GasUsed: ctx.GasMeter().GasConsumed()} }() blockGasConsumed := false // consumeBlockGas makes sure block gas is consumed at most once. It must happen after - // tx processing, and must be execute even if tx processing fails. Hence we use trick with `defer` + // tx processing, and must be executed even if tx processing fails. Hence we use trick with `defer` consumeBlockGas := func() { if !blockGasConsumed { blockGasConsumed = true @@ -716,33 +652,59 @@ func (app *BaseApp) runTx(txBytes []byte, tx sdk.Tx, simulate bool) (gInfo sdk.G // // NOTE: This must exist in a separate defer function for the above recovery // to recover from this one. - if !simulate { + if mode == runTxModeDeliver { defer consumeBlockGas() } + tx, err := app.txDecoder(txBytes) + if err != nil { + return sdk.GasInfo{}, nil, nil, err + } + msgs := tx.GetMsgs() if err = validateBasicTxMsgs(msgs); err != nil { return sdk.GasInfo{}, nil, nil, err } - var newCtx sdk.Context - newCtx, err = app.anteTx(ctx, txBytes, tx, simulate) - if !newCtx.IsZero() { - // At this point, newCtx.MultiStore() is a store branch, or something else - // replaced by the AnteHandler. We want the original multistore. + if app.anteHandler != nil { + var ( + anteCtx sdk.Context + msCache sdk.CacheMultiStore + ) + + // Branch context before AnteHandler call in case it aborts. + // This is required for both CheckTx and DeliverTx. + // Ref: https://github.com/cosmos/cosmos-sdk/issues/2772 // - // Also, in the case of the tx aborting, we need to track gas consumed via - // the instantiated gas meter in the AnteHandler, so we update the context - // prior to returning. - ctx = newCtx.WithMultiStore(ms) - } + // NOTE: Alternatively, we could require that AnteHandler ensures that + // writes do not happen if aborted/failed. This may have some + // performance benefits, but it'll be more difficult to get right. + anteCtx, msCache = app.cacheTxContext(ctx, txBytes) + anteCtx = anteCtx.WithEventManager(sdk.NewEventManager()) + newCtx, err := app.anteHandler(anteCtx, tx, mode == runTxModeSimulate) + + if !newCtx.IsZero() { + // At this point, newCtx.MultiStore() is a store branch, or something else + // replaced by the AnteHandler. We want the original multistore. + // + // Also, in the case of the tx aborting, we need to track gas consumed via + // the instantiated gas meter in the AnteHandler, so we update the context + // prior to returning. + ctx = newCtx.WithMultiStore(ms) + } - if err != nil { - return gInfo, nil, nil, err - } + events := ctx.EventManager().Events() - events := ctx.EventManager().Events() - anteEvents = events.ToABCIEvents() + // GasMeter expected to be set in AnteHandler + gasWanted = ctx.GasMeter().Limit() + + if err != nil { + return gInfo, nil, nil, err + } + + msCache.Write() + anteEvents = events.ToABCIEvents() + } // Create a new Context based off of the existing Context with a MultiStore branch // in case message processing fails. At this point, the MultiStore @@ -752,8 +714,8 @@ func (app *BaseApp) runTx(txBytes []byte, tx sdk.Tx, simulate bool) (gInfo sdk.G // Attempt to execute all messages and only update state if all messages pass // and we're in DeliverTx. Note, runMsgs will never return a reference to a // Result if any single message fails or does not have a registered Handler. - result, err = app.runMsgs(runMsgCtx, msgs) - if err == nil && !simulate { + result, err = app.runMsgs(runMsgCtx, msgs, mode) + if err == nil && mode == runTxModeDeliver { // When block gas exceeds, it'll panic and won't commit the cached store. consumeBlockGas() @@ -773,7 +735,7 @@ func (app *BaseApp) runTx(txBytes []byte, tx sdk.Tx, simulate bool) (gInfo sdk.G // and DeliverTx. An error is returned if any single message fails or if a // Handler does not exist for a given message route. Otherwise, a reference to a // Result is returned. The caller must not commit state if an error is returned. -func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg) (*sdk.Result, error) { +func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg, mode runTxMode) (*sdk.Result, error) { msgLogs := make(sdk.ABCIMessageLogs, 0, len(msgs)) events := sdk.EmptyEvents() txMsgData := &sdk.TxMsgData{ @@ -782,6 +744,11 @@ func (app *BaseApp) runMsgs(ctx sdk.Context, msgs []sdk.Msg) (*sdk.Result, error // NOTE: GasWanted is determined by the AnteHandler and GasUsed by the GasMeter. for i, msg := range msgs { + // skip actual execution for (Re)CheckTx mode + if mode == runTxModeCheck || mode == runTxModeReCheck { + break + } + var ( msgResult *sdk.Result err error diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 2ce750c823..844eea7393 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -9,15 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/codec/legacy" - "github.com/Finschia/finschia-sdk/server/config" "github.com/Finschia/finschia-sdk/snapshots" store "github.com/Finschia/finschia-sdk/store/types" sdk "github.com/Finschia/finschia-sdk/types" @@ -30,7 +27,7 @@ var ( ) func defaultLogger() log.Logger { - return log.NewOCLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") + return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") } func newBaseApp(name string, options ...func(*BaseApp)) *BaseApp { @@ -108,7 +105,7 @@ func TestLoadVersionPruning(t *testing.T) { // Commit seven blocks, of which 7 (latest) is kept in addition to 6, 5 // (keep recent) and 3 (keep every). for i := int64(1); i <= 7; i++ { - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) res := app.Commit() lastCommitID = sdk.CommitID{Version: i, Hash: res.Data} } @@ -213,19 +210,6 @@ func TestSnapshotManager(t *testing.T) { require.NotNil(t, app.SnapshotManager()) } -func TestSetChanCheckTxSize(t *testing.T) { - logger := defaultLogger() - db := dbm.NewMemDB() - - size := uint(100) - - app := NewBaseApp(t.Name(), logger, db, nil, SetChanCheckTxSize(size)) - require.Equal(t, int(size), cap(app.chCheckTx)) - - app = NewBaseApp(t.Name(), logger, db, nil) - require.Equal(t, config.DefaultChanCheckTxSize, cap(app.chCheckTx)) -} - func TestCreateEvents(t *testing.T) { testCases := map[string]struct { eventsIn sdk.Events diff --git a/baseapp/block_gas_test.go b/baseapp/block_gas_test.go index 39155bf178..c831fb21ba 100644 --- a/baseapp/block_gas_test.go +++ b/baseapp/block_gas_test.go @@ -8,12 +8,10 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/tx" @@ -106,7 +104,7 @@ func TestBaseApp_BlockGas(t *testing.T) { _, txBytes, err := createTestTx(encCfg.TxConfig, txBuilder, privs, accNums, accSeqs, ctx.ChainID()) require.NoError(t, err) - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) rsp := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) // check result diff --git a/baseapp/deliver_tx_test.go b/baseapp/deliver_tx_test.go index 78aadc971a..3194728e7d 100644 --- a/baseapp/deliver_tx_test.go +++ b/baseapp/deliver_tx_test.go @@ -15,12 +15,10 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" "github.com/Finschia/finschia-sdk/snapshots" @@ -219,7 +217,7 @@ func TestWithRouter(t *testing.T) { for blockN := 0; blockN < nBlocks; blockN++ { header := tmproto.Header{Height: int64(blockN) + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) for i := 0; i < txPerHeight; i++ { counter := int64(blockN*txPerHeight + i) @@ -307,16 +305,17 @@ func TestQuery(t *testing.T) { require.Equal(t, 0, len(res.Value)) // query is still empty after a CheckTx - _, err := app.Check(aminoTxEncoder(), tx) + _, resTx, err := app.Check(aminoTxEncoder(), tx) require.NoError(t, err) + require.NotNil(t, resTx) res = app.Query(query) require.Equal(t, 0, len(res.Value)) // query is still empty after a DeliverTx before we commit header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) - _, resTx, err := app.Deliver(aminoTxEncoder(), tx) + _, resTx, err = app.Deliver(aminoTxEncoder(), tx) require.NoError(t, err) require.NotNil(t, resTx) res = app.Query(query) @@ -341,7 +340,7 @@ func TestGRPCQuery(t *testing.T) { app.InitChain(abci.RequestInitChain{}) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.Commit() req := testdata.SayHelloRequest{Name: "foo"} @@ -420,7 +419,7 @@ func TestMultiMsgDeliverTx(t *testing.T) { // with all msgs the same route header := tmproto.Header{Height: 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(0, 0, 1, 2) txBytes, err := codec.Marshal(tx) require.NoError(t, err) @@ -501,7 +500,7 @@ func TestSimulateTx(t *testing.T) { for blockN := 0; blockN < nBlocks; blockN++ { count := int64(blockN + 1) header := tmproto.Header{Height: count} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(count, count) txBytes, err := cdc.Marshal(tx) @@ -556,7 +555,7 @@ func TestRunInvalidTransaction(t *testing.T) { app := setupBaseApp(t, anteOpt, routerOpt) header := tmproto.Header{Height: 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) // transaction with no messages { @@ -664,7 +663,7 @@ func TestTxGasLimits(t *testing.T) { } }() - count := tx.(*txTest).Counter + count := tx.(txTest).Counter newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") return newCtx, nil @@ -673,7 +672,7 @@ func TestTxGasLimits(t *testing.T) { routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - count := msg.(msgCounter).Counter + count := msg.(*msgCounter).Counter ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") return &sdk.Result{}, nil }) @@ -683,7 +682,7 @@ func TestTxGasLimits(t *testing.T) { app := setupBaseApp(t, anteOpt, routerOpt) header := tmproto.Header{Height: 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) testCases := []struct { tx *txTest @@ -748,7 +747,7 @@ func TestMaxBlockGasLimits(t *testing.T) { } }() - count := tx.(*txTest).Counter + count := tx.(txTest).Counter newCtx.GasMeter().ConsumeGas(uint64(count), "counter-ante") return @@ -757,7 +756,7 @@ func TestMaxBlockGasLimits(t *testing.T) { routerOpt := func(bapp *BaseApp) { r := sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { - count := msg.(msgCounter).Counter + count := msg.(*msgCounter).Counter ctx.GasMeter().ConsumeGas(uint64(count), "counter-handler") return &sdk.Result{}, nil }) @@ -797,13 +796,13 @@ func TestMaxBlockGasLimits(t *testing.T) { // reset the block gas header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) // execute the transaction multiple times for j := 0; j < tc.numDelivers; j++ { _, result, err := app.Deliver(aminoTxEncoder(), tx) - ctx := app.deliverState.ctx + ctx := app.getState(runTxModeDeliver).ctx // check for failed transactions if tc.fail && (j+1) > tc.failAfterDeliver { @@ -850,7 +849,7 @@ func TestCustomRunTxPanicHandler(t *testing.T) { app := setupBaseApp(t, anteOpt, routerOpt) header := tmproto.Header{Height: 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.AddRunTxRecoveryHandler(func(recoveryObj interface{}) error { err, ok := recoveryObj.(error) @@ -892,7 +891,7 @@ func TestBaseAppAnteHandler(t *testing.T) { registerTestCodec(cdc) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) // execute a tx that will fail ante handler execution // @@ -906,7 +905,7 @@ func TestBaseAppAnteHandler(t *testing.T) { require.Empty(t, res.Events) require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) - ctx := app.deliverState.ctx + ctx := app.getState(runTxModeDeliver).ctx store := ctx.KVStore(capKey1) require.Equal(t, int64(0), getIntFromStore(store, anteKey)) @@ -923,7 +922,7 @@ func TestBaseAppAnteHandler(t *testing.T) { require.NotEmpty(t, res.Events) require.False(t, res.IsOK(), fmt.Sprintf("%v", res)) - ctx = app.deliverState.ctx + ctx = app.getState(runTxModeDeliver).ctx store = ctx.KVStore(capKey1) require.Equal(t, int64(1), getIntFromStore(store, anteKey)) require.Equal(t, int64(0), getIntFromStore(store, deliverKey)) @@ -939,7 +938,7 @@ func TestBaseAppAnteHandler(t *testing.T) { require.NotEmpty(t, res.Events) require.True(t, res.IsOK(), fmt.Sprintf("%v", res)) - ctx = app.deliverState.ctx + ctx = app.getState(runTxModeDeliver).ctx store = ctx.KVStore(capKey1) require.Equal(t, int64(2), getIntFromStore(store, anteKey)) require.Equal(t, int64(1), getIntFromStore(store, deliverKey)) @@ -967,7 +966,7 @@ func TestGasConsumptionBadTx(t *testing.T) { } }() - txTest := tx.(*txTest) + txTest := tx.(txTest) newCtx.GasMeter().ConsumeGas(uint64(txTest.Counter), "counter-ante") if txTest.FailOnAnte { return newCtx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") @@ -1001,7 +1000,7 @@ func TestGasConsumptionBadTx(t *testing.T) { app.InitChain(abci.RequestInitChain{}) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) tx := newTxCounter(5, 0) tx.setFailOnAnte(true) @@ -1094,7 +1093,7 @@ func TestInitChainer(t *testing.T) { // commit and ensure we can still query header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.Commit() res = app.Query(query) @@ -1130,14 +1129,14 @@ func TestBeginBlock_WithInitialHeight(t *testing.T) { ) require.PanicsWithError(t, "invalid height: 4; expected: 3", func() { - app.BeginBlock(ocabci.RequestBeginBlock{ + app.BeginBlock(abci.RequestBeginBlock{ Header: tmproto.Header{ Height: 4, }, }) }) - app.BeginBlock(ocabci.RequestBeginBlock{ + app.BeginBlock(abci.RequestBeginBlock{ Header: tmproto.Header{ Height: 3, }, @@ -1306,30 +1305,6 @@ func anteHandlerTxTest(t *testing.T, capKey sdk.StoreKey, storeKey []byte) sdk.A } } -// TODO(dudong2): remove this func after reverting CheckTx logic -func anteHandlerTxTest2(t *testing.T, capKey sdk.StoreKey, storeKey []byte) sdk.AnteHandler { - t.Helper() - return func(ctx sdk.Context, tx sdk.Tx, simulate bool) (sdk.Context, error) { - store := ctx.KVStore(capKey) - txTest := tx.(*txTest) - - if txTest.FailOnAnte { - return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, "ante handler failure") - } - - _, err := incrementingCounter(t, store, storeKey, txTest.Counter) - if err != nil { - return ctx, err - } - - ctx.EventManager().EmitEvents( - counterEvent("ante_handler", txTest.Counter), - ) - - return ctx, nil - } -} - func counterEvent(evType string, msgCount int64) sdk.Events { return sdk.Events{ sdk.NewEvent( @@ -1413,7 +1388,7 @@ func TestCheckTx(t *testing.T) { // This ensures changes to the kvstore persist across successive CheckTx. counterKey := []byte("counter-key") - anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest2(t, capKey1, counterKey)) } + anteOpt := func(bapp *BaseApp) { bapp.SetAnteHandler(anteHandlerTxTest(t, capKey1, counterKey)) } routerOpt := func(bapp *BaseApp) { // TODO: can remove this once CheckTx doesnt process msgs. bapp.Router().AddRoute(sdk.NewRoute(routeMsgCounter, func(ctx sdk.Context, msg sdk.Msg) (*sdk.Result, error) { @@ -1434,8 +1409,9 @@ func TestCheckTx(t *testing.T) { tx := newTxCounter(i, 0) // no messages txBytes, err := codec.Marshal(tx) require.NoError(t, err) - _, err = app.checkTx(txBytes, tx, false) - require.NoError(t, err) + r := app.CheckTx(abci.RequestCheckTx{Tx: txBytes}) + require.Empty(t, r.GetEvents()) + require.True(t, r.IsOK(), fmt.Sprintf("%v", r)) } checkStateStore := app.checkState.ctx.KVStore(capKey1) @@ -1446,7 +1422,7 @@ func TestCheckTx(t *testing.T) { // If a block is committed, CheckTx state should be reset. header := tmproto.Header{Height: 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header, Hash: []byte("hash")}) + app.BeginBlock(abci.RequestBeginBlock{Header: header, Hash: []byte("hash")}) require.NotNil(t, app.checkState.ctx.BlockGasMeter(), "block gas meter should have been set to checkState") require.NotEmpty(t, app.checkState.ctx.HeaderHash()) @@ -1454,9 +1430,6 @@ func TestCheckTx(t *testing.T) { app.EndBlock(abci.RequestEndBlock{}) app.Commit() - // reset CheckTx state - app.BeginRecheckTx(ocabci.RequestBeginRecheckTx{Header: header}) - checkStateStore = app.checkState.ctx.KVStore(capKey1) storedBytes := checkStateStore.Get(counterKey) require.Nil(t, storedBytes) @@ -1488,7 +1461,7 @@ func TestDeliverTx(t *testing.T) { for blockN := 0; blockN < nBlocks; blockN++ { header := tmproto.Header{Height: int64(blockN) + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) for i := 0; i < txPerHeight; i++ { counter := int64(blockN*txPerHeight + i) @@ -1634,7 +1607,7 @@ func TestLoadVersionInvalid(t *testing.T) { require.Error(t, err) header := tmproto.Header{Height: 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) res := app.Commit() commitID1 := sdk.CommitID{Version: 1, Hash: res.Data} @@ -1685,7 +1658,7 @@ func setupBaseAppWithSnapshots(t *testing.T, blocks uint, blockTxs int, options r := rand.New(rand.NewSource(3920758213583)) keyCounter := 0 for height := int64(1); height <= int64(blocks); height++ { - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) for txNum := 0; txNum < blockTxs; txNum++ { tx := txTest{Msgs: []sdk.Msg{}} for msgNum := 0; msgNum < 100; msgNum++ { @@ -1757,13 +1730,13 @@ func TestLoadVersion(t *testing.T) { // execute a block, collect commit ID header := tmproto.Header{Height: 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) res := app.Commit() commitID1 := sdk.CommitID{Version: 1, Hash: res.Data} // execute a block, collect commit ID header = tmproto.Header{Height: 2} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) res = app.Commit() commitID2 := sdk.CommitID{Version: 2, Hash: res.Data} @@ -1780,7 +1753,7 @@ func TestLoadVersion(t *testing.T) { err = app.LoadVersion(1) require.Nil(t, err) testLoadVersionHelper(t, app, int64(1), commitID1) - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) app.Commit() testLoadVersionHelper(t, app, int64(2), commitID2) } @@ -1863,7 +1836,7 @@ func TestSetLoader(t *testing.T) { require.Nil(t, err) // "execute" one block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 2}}) res := app.Commit() require.NotNil(t, res.Data) diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index 55d4f5a10f..3bd633ae05 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -6,10 +6,9 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/codec/types" "github.com/Finschia/finschia-sdk/simapp" @@ -55,7 +54,7 @@ func TestRegisterQueryServiceTwice(t *testing.T) { // Setup baseapp. db := dbm.NewMemDB() encCfg := simapp.MakeTestEncodingConfig() - app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) testdata.RegisterInterfaces(encCfg.InterfaceRegistry) diff --git a/baseapp/msg_service_router.go b/baseapp/msg_service_router.go index 3348da2f5a..12e438453d 100644 --- a/baseapp/msg_service_router.go +++ b/baseapp/msg_service_router.go @@ -112,7 +112,15 @@ func (msr *MsgServiceRouter) RegisterService(sd *grpc.ServiceDesc, handler inter goCtx = context.WithValue(goCtx, sdk.SdkContextKey, ctx) return handler(goCtx, req) } - + if err := req.ValidateBasic(); err != nil { + if mm, ok := req.(getter1); ok { + if !mm.GetAmount().Amount.IsZero() { + return nil, err + } + } else { + return nil, err + } + } // Call the method handler from the service description with the handler object. // We don't do any decoding here because the decoding was already done. res, err := methodHandler(handler, sdk.WrapSDKContext(ctx), noopDecoder, interceptor) @@ -139,3 +147,7 @@ func noopDecoder(_ interface{}) error { return nil } func noopInterceptor(_ context.Context, _ interface{}, _ *grpc.UnaryServerInfo, _ grpc.UnaryHandler) (interface{}, error) { return nil, nil } + +type getter1 interface { + GetAmount() sdk.Coin +} diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 4c0363e0f5..520c04b9be 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -6,12 +6,10 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/client/tx" "github.com/Finschia/finschia-sdk/simapp" @@ -25,7 +23,7 @@ func TestRegisterMsgService(t *testing.T) { // Create an encoding config that doesn't register testdata Msg services. encCfg := simapp.MakeTestEncodingConfig() - app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) require.Panics(t, func() { testdata.RegisterMsgServer( @@ -48,7 +46,7 @@ func TestRegisterMsgServiceTwice(t *testing.T) { // Setup baseapp. db := dbm.NewMemDB() encCfg := simapp.MakeTestEncodingConfig() - app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) testdata.RegisterInterfaces(encCfg.InterfaceRegistry) @@ -74,13 +72,13 @@ func TestMsgService(t *testing.T) { encCfg := simapp.MakeTestEncodingConfig() testdata.RegisterInterfaces(encCfg.InterfaceRegistry) db := dbm.NewMemDB() - app := baseapp.NewBaseApp("test", log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) + app := baseapp.NewBaseApp("test", log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, encCfg.TxConfig.TxDecoder()) app.SetInterfaceRegistry(encCfg.InterfaceRegistry) testdata.RegisterMsgServer( app.MsgServiceRouter(), testdata.MsgServerImpl{}, ) - _ = app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) + _ = app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: 1}}) msg := testdata.MsgCreateDog{Dog: &testdata.Dog{Name: "Spot"}} txBuilder := encCfg.TxConfig.NewTxBuilder() diff --git a/baseapp/options.go b/baseapp/options.go index 2d68f14e74..3153662c4f 100644 --- a/baseapp/options.go +++ b/baseapp/options.go @@ -89,10 +89,6 @@ func SetSnapshotStore(snapshotStore *snapshots.Store) func(*BaseApp) { return func(app *BaseApp) { app.SetSnapshotStore(snapshotStore) } } -func SetChanCheckTxSize(size uint) func(*BaseApp) { - return func(app *BaseApp) { app.SetChanCheckTxSize(size) } -} - func (app *BaseApp) SetName(name string) { if app.sealed { panic("SetName() on sealed BaseApp") @@ -253,13 +249,6 @@ func (app *BaseApp) SetInterfaceRegistry(registry types.InterfaceRegistry) { app.msgServiceRouter.SetInterfaceRegistry(registry) } -func (app *BaseApp) SetChanCheckTxSize(chanCheckTxSize uint) { - if app.sealed { - panic("SetChanCheckTxSize() on sealed BaseApp") - } - app.chCheckTxSize = chanCheckTxSize -} - func MetricsProvider(prometheus bool) cache.MetricsProvider { namespace := "app" if prometheus { diff --git a/baseapp/reactor.go b/baseapp/reactor.go deleted file mode 100644 index 4211091cce..0000000000 --- a/baseapp/reactor.go +++ /dev/null @@ -1,58 +0,0 @@ -package baseapp - -import ( - "sync" - - ocabci "github.com/Finschia/ostracon/abci/types" - - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" -) - -func (app *BaseApp) startReactors() { - go app.checkTxAsyncReactor() -} - -type RequestCheckTxAsync struct { - txBytes []byte - recheck bool - callback ocabci.CheckTxCallback - prepare *sync.WaitGroup - tx sdk.Tx - err error -} - -func (app *BaseApp) checkTxAsyncReactor() { - for req := range app.chCheckTx { - req.prepare.Wait() - if req.err != nil { - req.callback(sdkerrors.ResponseCheckTx(req.err, 0, 0, app.trace)) - continue - } - - waits, signals := app.checkAccountWGs.Register(req.tx) - - go app.checkTxAsync(req, waits, signals) - } -} - -func (app *BaseApp) prepareCheckTx(req *RequestCheckTxAsync) { - defer req.prepare.Done() - req.tx, req.err = app.preCheckTx(req.txBytes) -} - -func (app *BaseApp) checkTxAsync(req *RequestCheckTxAsync, waits []*sync.WaitGroup, signals []*AccountWG) { - app.checkAccountWGs.Wait(waits) - defer app.checkAccountWGs.Done(signals) - - gInfo, err := app.checkTx(req.txBytes, req.tx, req.recheck) - if err != nil { - req.callback(sdkerrors.ResponseCheckTx(err, gInfo.GasWanted, gInfo.GasUsed, app.trace)) - return - } - - req.callback(ocabci.ResponseCheckTx{ - GasWanted: int64(gInfo.GasWanted), // TODO: Should type accept unsigned ints? - GasUsed: int64(gInfo.GasUsed), // TODO: Should type accept unsigned ints? - }) -} diff --git a/baseapp/streaming.go b/baseapp/streaming.go index aeaec29a93..7219432434 100644 --- a/baseapp/streaming.go +++ b/baseapp/streaming.go @@ -6,8 +6,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - store "github.com/Finschia/finschia-sdk/store/types" "github.com/Finschia/finschia-sdk/types" ) @@ -15,7 +13,7 @@ import ( // ABCIListener interface used to hook into the ABCI message processing of the BaseApp type ABCIListener interface { // ListenBeginBlock updates the streaming service with the latest BeginBlock messages - ListenBeginBlock(ctx types.Context, req ocabci.RequestBeginBlock, res abci.ResponseBeginBlock) error + ListenBeginBlock(ctx types.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock) error // ListenEndBlock updates the steaming service with the latest EndBlock messages ListenEndBlock(ctx types.Context, req abci.RequestEndBlock, res abci.ResponseEndBlock) error // ListenDeliverTx updates the steaming service with the latest DeliverTx messages diff --git a/baseapp/test_helpers.go b/baseapp/test_helpers.go index 9a1af9fb59..e6251bf55d 100644 --- a/baseapp/test_helpers.go +++ b/baseapp/test_helpers.go @@ -7,24 +7,20 @@ import ( sdkerrors "github.com/Finschia/finschia-sdk/types/errors" ) -func (app *BaseApp) Check(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, error) { +func (app *BaseApp) Check(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, *sdk.Result, error) { // runTx expects tx bytes as argument, so we encode the tx argument into // bytes. Note that runTx will actually decode those bytes again. But since // this helper is only used in tests/simulation, it's fine. - txBytes, err := txEncoder(tx) + bz, err := txEncoder(tx) if err != nil { - return sdk.GasInfo{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "%s", err) + return sdk.GasInfo{}, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "%s", err) } - return app.checkTx(txBytes, tx, false) + gasInfo, result, _, err := app.runTx(runTxModeCheck, bz) + return gasInfo, result, err } func (app *BaseApp) Simulate(txBytes []byte) (sdk.GasInfo, *sdk.Result, error) { - tx, err := app.txDecoder(txBytes) - if err != nil { - return sdk.GasInfo{}, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "%s", err) - } - - gasInfo, result, _, err := app.runTx(txBytes, tx, true) + gasInfo, result, _, err := app.runTx(runTxModeSimulate, txBytes) return gasInfo, result, err } @@ -34,7 +30,7 @@ func (app *BaseApp) Deliver(txEncoder sdk.TxEncoder, tx sdk.Tx) (sdk.GasInfo, *s if err != nil { return sdk.GasInfo{}, nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidRequest, "%s", err) } - gasInfo, result, _, err := app.runTx(txBytes, tx, false) + gasInfo, result, _, err := app.runTx(runTxModeDeliver, txBytes) return gasInfo, result, err } @@ -54,5 +50,5 @@ func (app *BaseApp) NewUncachedContext(isCheckTx bool, header tmproto.Header) sd } func (app *BaseApp) GetContextForDeliverTx(txBytes []byte) sdk.Context { - return app.getContextForTx(app.deliverState, txBytes) + return app.getContextForTx(runTxModeDeliver, txBytes) } diff --git a/client/broadcast.go b/client/broadcast.go index bea58f1f4a..0f4f6443c6 100644 --- a/client/broadcast.go +++ b/client/broadcast.go @@ -5,12 +5,11 @@ import ( "fmt" "strings" + "github.com/tendermint/tendermint/mempool" + tmtypes "github.com/tendermint/tendermint/types" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - "github.com/Finschia/ostracon/mempool" - octypes "github.com/Finschia/ostracon/types" - "github.com/Finschia/finschia-sdk/client/flags" sdk "github.com/Finschia/finschia-sdk/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" @@ -47,7 +46,7 @@ func (ctx Context) BroadcastTx(txBytes []byte) (res *sdk.TxResponse, err error) // TODO: Avoid brittle string matching in favor of error matching. This requires // a change to Tendermint's RPCError type to allow retrieval or matching against // a concrete error type. -func CheckTendermintError(err error, tx octypes.Tx) *sdk.TxResponse { +func CheckTendermintError(err error, tx tmtypes.Tx) *sdk.TxResponse { if err == nil { return nil } @@ -56,8 +55,7 @@ func CheckTendermintError(err error, tx octypes.Tx) *sdk.TxResponse { txHash := fmt.Sprintf("%X", tx.Hash()) switch { - case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())), - strings.Contains(errStr, strings.ToLower(mempool.ErrTxInMap.Error())): + case strings.Contains(errStr, strings.ToLower(mempool.ErrTxInCache.Error())): return &sdk.TxResponse{ Code: sdkerrors.ErrTxInMempoolCache.ABCICode(), Codespace: sdkerrors.ErrTxInMempoolCache.Codespace(), diff --git a/client/broadcast_test.go b/client/broadcast_test.go index e0b758b611..e03ecfe3b7 100644 --- a/client/broadcast_test.go +++ b/client/broadcast_test.go @@ -6,12 +6,11 @@ import ( "testing" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/crypto/tmhash" - "github.com/Finschia/ostracon/mempool" - "github.com/Finschia/ostracon/rpc/client/mock" - ctypes "github.com/Finschia/ostracon/rpc/core/types" - octypes "github.com/Finschia/ostracon/types" + "github.com/tendermint/tendermint/crypto/tmhash" + "github.com/tendermint/tendermint/mempool" + "github.com/tendermint/tendermint/rpc/client/mock" + ctypes "github.com/tendermint/tendermint/rpc/core/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client/flags" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" @@ -22,15 +21,15 @@ type MockClient struct { err error } -func (c MockClient) BroadcastTxCommit(ctx context.Context, tx octypes.Tx) (*ctypes.ResultBroadcastTxCommit, error) { +func (c MockClient) BroadcastTxCommit(ctx context.Context, tx tmtypes.Tx) (*ctypes.ResultBroadcastTxCommit, error) { return nil, c.err } -func (c MockClient) BroadcastTxAsync(ctx context.Context, tx octypes.Tx) (*ctypes.ResultBroadcastTx, error) { +func (c MockClient) BroadcastTxAsync(ctx context.Context, tx tmtypes.Tx) (*ctypes.ResultBroadcastTx, error) { return nil, c.err } -func (c MockClient) BroadcastTxSync(ctx context.Context, tx octypes.Tx) (*ctypes.ResultBroadcastTx, error) { +func (c MockClient) BroadcastTxSync(ctx context.Context, tx tmtypes.Tx) (*ctypes.ResultBroadcastTx, error) { return nil, c.err } @@ -45,7 +44,6 @@ func CreateContextWithErrorAndMode(err error, mode string) Context { func TestBroadcastError(t *testing.T) { errors := map[error]uint32{ mempool.ErrTxInCache: sdkerrors.ErrTxInMempoolCache.ABCICode(), - mempool.ErrTxInMap: sdkerrors.ErrTxInMempoolCache.ABCICode(), mempool.ErrTxTooLarge{}: sdkerrors.ErrTxTooLarge.ABCICode(), mempool.ErrMempoolIsFull{}: sdkerrors.ErrMempoolIsFull.ABCICode(), } diff --git a/client/cmd.go b/client/cmd.go index 3bd834bd3b..7347d308ae 100644 --- a/client/cmd.go +++ b/client/cmd.go @@ -7,8 +7,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - - "github.com/Finschia/ostracon/libs/cli" + "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/crypto/keyring" diff --git a/client/config/cmd.go b/client/config/cmd.go index 8a39ae13df..1aa00b44bd 100644 --- a/client/config/cmd.go +++ b/client/config/cmd.go @@ -6,8 +6,7 @@ import ( "path/filepath" "github.com/spf13/cobra" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -52,7 +51,7 @@ func runConfigCmd(cmd *cobra.Command, args []string) error { cmd.Println(conf.ChainID) case flags.FlagKeyringBackend: cmd.Println(conf.KeyringBackend) - case ostcli.OutputFlag: + case tmcli.OutputFlag: cmd.Println(conf.Output) case flags.FlagNode: cmd.Println(conf.Node) @@ -72,7 +71,7 @@ func runConfigCmd(cmd *cobra.Command, args []string) error { conf.SetChainID(value) case flags.FlagKeyringBackend: conf.SetKeyringBackend(value) - case ostcli.OutputFlag: + case tmcli.OutputFlag: conf.SetOutput(value) case flags.FlagNode: conf.SetNode(value) diff --git a/client/context.go b/client/context.go index 190f35ce67..bb4858e7fd 100644 --- a/client/context.go +++ b/client/context.go @@ -9,10 +9,9 @@ import ( "github.com/gogo/protobuf/proto" "github.com/pkg/errors" "github.com/spf13/viper" + rpcclient "github.com/tendermint/tendermint/rpc/client" "gopkg.in/yaml.v2" - rpcclient "github.com/Finschia/ostracon/rpc/client" - "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" "github.com/Finschia/finschia-sdk/crypto/keyring" diff --git a/client/docs/config.json b/client/docs/config.json index 725ebb71b3..1bf69f7c03 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -22,21 +22,6 @@ } } }, - { - "url": "./tmp-swagger-gen/lbm/base/ostracon/v1/query.swagger.json", - "operationIds": { - "rename": { - "Params": "OstraconBaseParams", - "GetLatestBlock": "GetLatestBlock2", - "GetLastBlock": "GetLastBlock2", - "GetBlockByHeight": "GetBlockByHeight2", - "GetNodeInfo": "GetNodeInfo2", - "GetSyncing": "GetSyncing2", - "GetLatestValidatorSet": "GetLatestValidatorSet2", - "GetValidatorSetByHeight": "GetValidatorSetByHeight2" - } - } - }, { "url": "./tmp-swagger-gen/cosmos/base/tendermint/v1beta1/query.swagger.json", "operationIds": { @@ -179,17 +164,6 @@ }, { "url": "./tmp-swagger-gen/cosmos/base/node/v1beta1/query.swagger.json" - }, - { - "url": "./tmp-swagger-gen/lbm/tx/v1beta1/service.swagger.json", - "dereference": { - "circular": "ignore" - }, - "operationIds": { - "rename": { - "GetBlockWithTxs": "GetBlockWithTxs2" - } - } } ] } diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index f717b5a69d..0a671c6747 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -2571,10 +2571,10 @@ paths: type: string tags: - Query - '/lbm/base/ostracon/v1/block/{hash}': + /cosmos/base/tendermint/v1beta1/blocks/latest: get: - summary: GetBlockByHash queries block for given hash. - operationId: GetBlockByHash + summary: GetLatestBlock returns the latest block. + operationId: GetLatestBlock responses: '200': description: A successful response. @@ -3135,455 +3135,9 @@ paths: description: >- Commit contains the evidence that a block was committed by a set of validators. - entropy: - title: '*** Ostracon Extended Fields ***' - type: object - properties: - round: - type: integer - format: int32 - proof: - type: string - format: byte description: >- - GetBlockByHashResponse is the response type for the - Query/GetBlockByHash RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: hash - in: path - required: true - type: string - format: byte - tags: - - Service - '/lbm/base/ostracon/v1/blockresults/{height}': - get: - summary: GetBlockResultsByHeight queries block results for given height. - operationId: GetBlockResultsByHeight - responses: - '200': - description: A successful response. - schema: - type: object - properties: - height: - type: string - format: int64 - txs_results: - type: array - items: - type: object - properties: - code: - type: integer - format: int64 - data: - type: string - format: byte - log: - type: string - info: - type: string - gas_wanted: - type: string - format: int64 - gas_used: - type: string - format: int64 - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, - associated with an event. - description: >- - Event allows application developers to attach - additional information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. - - Later, transactions may be queried using these events. - codespace: - type: string - res_begin_block: - type: object - properties: - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, - associated with an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. - - Later, transactions may be queried using these events. - res_end_block: - type: object - properties: - validator_updates: - type: array - items: - type: object - properties: - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - power: - type: string - format: int64 - title: ValidatorUpdate - consensus_param_updates: - type: object - properties: - block: - type: object - properties: - max_bytes: - type: string - format: int64 - title: 'Note: must be greater than 0' - max_gas: - type: string - format: int64 - title: 'Note: must be greater or equal to -1' - description: BlockParams contains limits on the block size. - evidence: - type: object - properties: - max_age_num_blocks: - type: string - format: int64 - description: >- - Max age of evidence, in blocks. - - - The basic formula for calculating this is: - MaxAgeDuration / {average block - - time}. - max_age_duration: - type: string - description: >- - Max age of evidence, in time. - - - It should correspond with an app's "unbonding - period" or other similar - - mechanism for handling [Nothing-At-Stake - - attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - max_bytes: - type: string - format: int64 - title: >- - This sets the maximum size of total evidence in - bytes that can be committed in a single block. - - and should fall comfortably under the max block - bytes. - - Default is 1048576 or 1MB - description: >- - EvidenceParams determine how we handle evidence of - malfeasance. - validator: - type: object - properties: - pub_key_types: - type: array - items: - type: string - description: >- - ValidatorParams restrict the public key types - validators can use. - - NOTE: uses ABCI pubkey naming, not Amino names. - version: - type: object - properties: - app_version: - type: string - format: uint64 - description: VersionParams contains the ABCI application version. - title: |- - ConsensusParams contains all consensus-relevant parameters - that can be adjusted by the abci app - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, - associated with an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. - - Later, transactions may be queried using these events. - description: >- - GetBlockResultsByHeightResponse is the response type for the - Query/GetBlockResultsByHeight RPC method. + GetLatestBlockResponse is the response type for the + Query/GetLatestBlock RPC method. default: description: An unexpected error response schema: @@ -3773,18 +3327,12 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: height - in: path - required: true - type: string - format: int64 tags: - Service - /lbm/base/ostracon/v1/blocks/latest: + '/cosmos/base/tendermint/v1beta1/blocks/{height}': get: - summary: GetLatestBlock returns the latest block. - operationId: GetLatestBlock2 + summary: GetBlockByHeight queries block for given height. + operationId: GetBlockByHeight responses: '200': description: A successful response. @@ -4345,19 +3893,9 @@ paths: description: >- Commit contains the evidence that a block was committed by a set of validators. - entropy: - title: '*** Ostracon Extended Fields ***' - type: object - properties: - round: - type: integer - format: int32 - proof: - type: string - format: byte description: >- - GetLatestBlockResponse is the response type for the - Query/GetLatestBlock RPC method. + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. default: description: An unexpected error response schema: @@ -4547,630 +4085,141 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: height + in: path + required: true + type: string + format: int64 tags: - Service - '/lbm/base/ostracon/v1/blocks/{height}': + /cosmos/base/tendermint/v1beta1/node_info: get: - summary: GetBlockByHeight queries block for given height. - operationId: GetBlockByHeight2 + summary: GetNodeInfo queries the current node info. + operationId: GetNodeInfo responses: '200': description: A successful response. schema: type: object properties: - block_id: + default_node_info: type: object properties: - hash: + protocol_version: + type: object + properties: + p2p: + type: string + format: uint64 + block: + type: string + format: uint64 + app: + type: string + format: uint64 + default_node_id: + type: string + listen_addr: + type: string + network: + type: string + version: + type: string + channels: type: string format: byte - part_set_header: + moniker: + type: string + other: type: object properties: - total: - type: integer - format: int64 - hash: + tx_index: type: string - format: byte - title: PartsetHeader - title: BlockID - block: + rpc_address: + type: string + application_version: type: object properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing - a block in the blockchain, + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: + type: array + items: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the request type for the Query/GetNodeInfo + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - including all blockchain data structures and the rules - of the application's + protocol buffer message. This string must contain at + least - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. + one "/" character. The last segment of the URL's path + must represent - NOTE: not all txs here are valid. We're just agreeing - on the order first. + the fully qualified name of the type (as in - This means that block.AppHash does not include these - txs. - title: >- - Data contains the set of transactions included in the - block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed - message in the consensus. + `path/google.protobuf.Duration`). The name should be in + a canonical form - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or - commit vote from validators for + (e.g., leading "." is not accepted). - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed - message in the consensus. - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or - commit vote from validators for + In practice, teams usually precompile into the binary + all types that they - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a - validator signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, + expect it to use in the context of Any. However, for + URLs which use the - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a - Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a - block was committed by a set of - validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a - set of validators attempting to mislead a light - client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was committed by - a set of validators. - entropy: - title: '*** Ostracon Extended Fields ***' - type: object - properties: - round: - type: integer - format: int32 - proof: - type: string - format: byte - description: >- - GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can optionally + set up a type server that maps type URLs to message definitions as follows: @@ -5315,291 +4364,12 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: height - in: path - required: true - type: string - format: int64 tags: - Service - /lbm/base/ostracon/v1/node_info: - get: - summary: GetNodeInfo queries the current node info. - operationId: GetNodeInfo2 - responses: - '200': - description: A successful response. - schema: - type: object - properties: - default_node_info: - type: object - properties: - protocol_version: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: - type: string - format: byte - moniker: - type: string - other: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - application_version: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - lbm_sdk_version: - type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. - description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo - RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - tags: - - Service - /lbm/base/ostracon/v1/syncing: + /cosmos/base/tendermint/v1beta1/syncing: get: summary: GetSyncing queries node syncing. - operationId: GetSyncing2 + operationId: GetSyncing responses: '200': description: A successful response. @@ -5803,10 +4573,10 @@ paths: } tags: - Service - /lbm/base/ostracon/v1/validatorsets/latest: + /cosmos/base/tendermint/v1beta1/validatorsets/latest: get: summary: GetLatestValidatorSet queries latest validator-set. - operationId: GetLatestValidatorSet2 + operationId: GetLatestValidatorSet responses: '200': description: A successful response. @@ -6278,10 +5048,10 @@ paths: format: boolean tags: - Service - '/lbm/base/ostracon/v1/validatorsets/{height}': + '/cosmos/base/tendermint/v1beta1/validatorsets/{height}': get: summary: GetValidatorSetByHeight queries validator-set at a given height. - operationId: GetValidatorSetByHeight2 + operationId: GetValidatorSetByHeight responses: '200': description: A successful response. @@ -6758,573 +5528,189 @@ paths: format: boolean tags: - Service - /cosmos/base/tendermint/v1beta1/blocks/latest: + /cosmos/distribution/v1beta1/community_pool: get: - summary: GetLatestBlock returns the latest block. - operationId: GetLatestBlock + summary: CommunityPool queries the community pool coins. + operationId: CommunityPool responses: '200': description: A successful response. schema: type: object properties: - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing - a block in the blockchain, + pool: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - including all blockchain data structures and the rules - of the application's - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: pool defines community pool's coins. + description: >- + QueryCommunityPoolResponse is the response type for the + Query/CommunityPool + + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': + get: + summary: |- + DelegationTotalRewards queries the total rewards accrued by a each + validator. + operationId: DelegationTotalRewards + responses: + '200': + description: A successful response. + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + validator_address: + type: string + reward: + type: array + items: type: object properties: - hash: + denom: + type: string + amount: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte description: >- - Txs that will be applied by state @ block.Height+1. + DecCoin defines a token with a denomination and a + decimal amount. - NOTE: not all txs here are valid. We're just agreeing - on the order first. - This means that block.AppHash does not include these - txs. - title: >- - Data contains the set of transactions included in the - block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed - message in the consensus. + NOTE: The amount field is an Dec which implements the + custom method - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or - commit vote from validators for + signatures required by gogoproto. + description: |- + DelegationDelegatorReward represents the properties + of a delegator's delegation reward. + description: rewards defines all the rewards accrued by a delegator. + total: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed - message in the consensus. - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or - commit vote from validators for + NOTE: The amount field is an Dec which implements the custom + method - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a - validator signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, + signatures required by gogoproto. + description: total defines the sum of all the rewards. + description: |- + QueryDelegationTotalRewardsResponse is the response type for the + Query/DelegationTotalRewards RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': + get: + summary: DelegationRewards queries the total rewards accrued by a delegation. + operationId: DelegationRewards + responses: + '200': + description: A successful response. + schema: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. - including all blockchain data structures - and the rules of the application's - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a - Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a - block was committed by a set of - validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a - set of validators attempting to mislead a light - client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was committed by - a set of validators. - description: >- - GetLatestBlockResponse is the response type for the - Query/GetLatestBlock RPC method. + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: rewards defines the rewards accrued by a delegation. + description: |- + QueryDelegationRewardsResponse is the response type for the + Query/DelegationRewards RPC method. default: description: An unexpected error response schema: @@ -7344,745 +5730,357 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + parameters: + - name: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + - name: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string tags: - - Service - '/cosmos/base/tendermint/v1beta1/blocks/{height}': + - Query + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': get: - summary: GetBlockByHeight queries block for given height. - operationId: GetBlockByHeight + summary: DelegatorValidators queries the validators of a delegator. + operationId: DelegatorValidators responses: '200': description: A successful response. schema: type: object properties: - block_id: + validators: + type: array + items: + type: string + description: >- + validators defines the validators a delegator is delegating + for. + description: |- + QueryDelegatorValidatorsResponse is the response type for the + Query/DelegatorValidators RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': + get: + summary: DelegatorWithdrawAddress queries withdraw address of a delegator. + operationId: DelegatorWithdrawAddress + responses: + '200': + description: A successful response. + schema: + type: object + properties: + withdraw_address: + type: string + description: withdraw_address defines the delegator address to query for. + description: |- + QueryDelegatorWithdrawAddressResponse is the response type for the + Query/DelegatorWithdrawAddress RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: delegator_address + description: delegator_address defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + /cosmos/distribution/v1beta1/params: + get: + summary: Params queries params of the distribution module. + operationId: DistributionParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. type: object properties: - hash: + community_tax: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing - a block in the blockchain, + base_proposer_reward: + type: string + bonus_proposer_reward: + type: string + withdraw_addr_enabled: + type: boolean + format: boolean + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': + get: + summary: ValidatorCommission queries accumulated commission for a validator. + operationId: ValidatorCommission + responses: + '200': + description: A successful response. + schema: + type: object + properties: + commission: + description: commission defines the commision the validator received. + type: object + properties: + commission: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a + decimal amount. - including all blockchain data structures and the rules - of the application's - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: + NOTE: The amount field is an Dec which implements the + custom method + + signatures required by gogoproto. + title: |- + QueryValidatorCommissionResponse is the response type for the + Query/ValidatorCommission RPC method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': + get: + summary: ValidatorOutstandingRewards queries rewards of a validator address. + operationId: ValidatorOutstandingRewards + responses: + '200': + description: A successful response. + schema: + type: object + properties: + rewards: + type: object + properties: + rewards: + type: array + items: + type: object + properties: + denom: type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a + decimal amount. - NOTE: not all txs here are valid. We're just agreeing - on the order first. - This means that block.AppHash does not include these - txs. - title: >- - Data contains the set of transactions included in the - block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed - message in the consensus. + NOTE: The amount field is an Dec which implements the + custom method - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or - commit vote from validators for + signatures required by gogoproto. + description: >- + ValidatorOutstandingRewards represents outstanding + (un-withdrawn) rewards - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed - message in the consensus. + for a validator inexpensive to track, allows simple sanity + checks. + description: >- + QueryValidatorOutstandingRewardsResponse is the response type for + the - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or - commit vote from validators for + Query/ValidatorOutstandingRewards RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + tags: + - Query + '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': + get: + summary: ValidatorSlashes queries slash events of a validator. + operationId: ValidatorSlashes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + slashes: + type: array + items: + type: object + properties: + validator_period: + type: string + format: uint64 + fraction: + type: string + description: >- + ValidatorSlashEvent represents a validator slash event. - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a - validator signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, + Height is implicit within the store key. - including all blockchain data structures - and the rules of the application's + This is needed to calculate appropriate amount of staking + tokens - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a - Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a - block was committed by a set of - validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a - set of validators attempting to mislead a light - client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was committed by - a set of validators. - description: >- - GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. + for delegations which are withdrawn after a slash has + occurred. + description: slashes defines the slashes the validator received. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryValidatorSlashesResponse is the response type for the + Query/ValidatorSlashes RPC method. default: description: An unexpected error response schema: @@ -8096,6 +6094,108 @@ paths: message: type: string details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: validator_address + description: validator_address defines the validator address to query for. + in: path + required: true + type: string + - name: starting_height + description: >- + starting_height defines the optional starting height to query the + slashes. + in: query + required: false + type: string + format: uint64 + - name: ending_height + description: >- + starting_height defines the optional ending height to query the + slashes. + in: query + required: false + type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/evidence/v1beta1/evidence: + get: + summary: AllEvidence queries all evidence. + operationId: AllEvidence + responses: + '200': + description: A successful response. + schema: + type: object + properties: + evidence: type: array items: type: object @@ -8272,96 +6372,30 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: height - in: path - required: true - type: string - format: int64 - tags: - - Service - /cosmos/base/tendermint/v1beta1/node_info: - get: - summary: GetNodeInfo queries the current node info. - operationId: GetNodeInfo - responses: - '200': - description: A successful response. - schema: - type: object - properties: - default_node_info: + description: evidence returns all evidences. + pagination: + description: pagination defines the pagination in the response. type: object properties: - protocol_version: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: + next_key: type: string format: byte - moniker: - type: string - other: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - application_version: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - cosmos_sdk_version: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo - RPC method. + QueryAllEvidenceResponse is the response type for the + Query/AllEvidence RPC + + method. default: description: An unexpected error response schema: @@ -8551,63 +6585,290 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - tags: - - Service - /cosmos/base/tendermint/v1beta1/syncing: - get: - summary: GetSyncing queries node syncing. - operationId: GetSyncing - responses: - '200': - description: A successful response. - schema: - type: object - properties: - syncing: - type: boolean - format: boolean - description: >- - GetSyncingResponse is the response type for the Query/GetSyncing - RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - protocol buffer message. This string must contain at - least + It is less efficient than using key. Only one of offset or key + should - one "/" character. The last segment of the URL's path - must represent + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - the fully qualified name of the type (as in + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include - `path/google.protobuf.Duration`). The name should be in - a canonical form + a count of the total number of items available for pagination in + UIs. - (e.g., leading "." is not accepted). + count_total is only respected when offset is used. It is ignored + when key + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. - In practice, teams usually precompile into the binary - all types that they + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': + get: + summary: Evidence queries evidence based on evidence hash. + operationId: Evidence + responses: + '200': + description: A successful response. + schema: + type: object + properties: + evidence: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryEvidenceResponse is the response type for the Query/Evidence + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they expect it to use in the context of Any. However, for URLs which use the @@ -8758,233 +7019,87 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: evidence_hash + description: evidence_hash defines the hash of the requested evidence. + in: path + required: true + type: string + format: byte tags: - - Service - /cosmos/base/tendermint/v1beta1/validatorsets/latest: + - Query + '/cosmos/gov/v1beta1/params/{params_type}': get: - summary: GetLatestValidatorSet queries latest validator-set. - operationId: GetLatestValidatorSet + summary: Params queries all parameters of the gov module. + operationId: GovParams responses: '200': description: A successful response. schema: type: object properties: - block_height: - type: string - format: int64 - validators: - type: array - items: - type: object - properties: - address: - type: string - pub_key: + voting_params: + description: voting_params defines the parameters related to voting. + type: object + properties: + voting_period: + type: string + description: Length of the voting period. + deposit_params: + description: deposit_params defines the parameters related to deposit. + type: object + properties: + min_deposit: + type: array + items: type: object properties: - type_url: + denom: type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: + amount: type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field + Coin defines a token with a denomination and an amount. - `value` which holds the custom JSON in addition to the - `@type` - field. Example (for message - [google.protobuf.Duration][]): + NOTE: The amount field is an Int which implements the + custom method - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - pagination: - description: pagination defines an pagination for the response. + signatures required by gogoproto. + description: Minimum deposit for a proposal to enter voting period. + max_deposit_period: + type: string + description: >- + Maximum period for Atom holders to deposit on a proposal. + Initial value: 2 + months. + tally_params: + description: tally_params defines the parameters related to tally. type: object properties: - next_key: + quorum: type: string format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + description: >- + Minimum percentage of total stake needed to vote for a + result to be + considered valid. + threshold: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + format: byte + description: >- + Minimum proportion of Yes votes for proposal to pass. + Default value: 0.5. + veto_threshold: + type: string + format: byte + description: >- + Minimum value of Veto votes to Total votes ratio for + proposal to be + vetoed. Default value: 1/3. description: >- - GetLatestValidatorSetResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. + QueryParamsResponse is the response type for the Query/Params RPC + method. default: description: An unexpected error response schema: @@ -9175,87 +7290,36 @@ paths: "value": "1.212s" } parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset + - name: params_type description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should + params_type defines which parameters to query for, can be one of + "voting", - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false + "tallying" or "deposit". + in: path + required: true type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - - Service - '/cosmos/base/tendermint/v1beta1/validatorsets/{height}': + - Query + /cosmos/gov/v1beta1/proposals: get: - summary: GetValidatorSetByHeight queries validator-set at a given height. - operationId: GetValidatorSetByHeight + summary: Proposals queries all proposals based on given status. + operationId: Proposals responses: '200': description: A successful response. schema: type: object properties: - block_height: - type: string - format: int64 - validators: + proposals: type: array items: type: object properties: - address: + proposal_id: type: string - pub_key: + format: uint64 + content: type: object properties: type_url: @@ -9432,15 +7496,80 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - voting_power: + status: type: string - format: int64 - proposer_priority: + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: >- + ProposalStatus enumerates the valid statuses of a + proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. + submit_time: type: string - format: int64 - description: Validator is the type for the validator-set. + format: date-time + deposit_end_time: + type: string + format: date-time + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: >- + Proposal defines the core field members of a governance + proposal. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -9458,8 +7587,10 @@ paths: was set, its value is undefined otherwise description: >- - GetValidatorSetByHeightResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. + QueryProposalsResponse is the response type for the + Query/Proposals RPC + + method. default: description: An unexpected error response schema: @@ -9650,11 +7781,42 @@ paths: "value": "1.212s" } parameters: - - name: height - in: path - required: true + - name: proposal_status + description: |- + proposal_status defines the status of the proposals. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + in: query + required: false + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + - name: voter + description: voter defines the voter address for the proposals. + in: query + required: false + type: string + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: query + required: false type: string - format: int64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -9714,40 +7876,271 @@ paths: type: boolean format: boolean tags: - - Service - /cosmos/distribution/v1beta1/community_pool: + - Query + '/cosmos/gov/v1beta1/proposals/{proposal_id}': get: - summary: CommunityPool queries the community pool coins. - operationId: CommunityPool + summary: Proposal queries proposal details based on ProposalID. + operationId: Proposal responses: '200': description: A successful response. schema: type: object properties: - pool: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + proposal: + type: object + properties: + proposal_id: + type: string + format: uint64 + content: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + protocol buffer message. This string must contain at + least - NOTE: The amount field is an Dec which implements the custom - method + one "/" character. The last segment of the URL's path + must represent - signatures required by gogoproto. - description: pool defines community pool's coins. - description: >- - QueryCommunityPoolResponse is the response type for the - Query/CommunityPool + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + status: + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_DEPOSIT_PERIOD + - PROPOSAL_STATUS_VOTING_PERIOD + - PROPOSAL_STATUS_PASSED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_FAILED + default: PROPOSAL_STATUS_UNSPECIFIED + description: >- + ProposalStatus enumerates the valid statuses of a + proposal. + + - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. + - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit + period. + - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting + period. + - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has + passed. + - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has + been rejected. + - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has + failed. + final_tally_result: + type: object + properties: + 'yes': + type: string + abstain: + type: string + 'no': + type: string + no_with_veto: + type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. + submit_time: + type: string + format: date-time + deposit_end_time: + type: string + format: date-time + total_deposit: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + voting_start_time: + type: string + format: date-time + voting_end_time: + type: string + format: date-time + description: >- + Proposal defines the core field members of a governance + proposal. + description: >- + QueryProposalResponse is the response type for the Query/Proposal RPC method. default: description: An unexpected error response @@ -9768,136 +8161,249 @@ paths: properties: type_url: type: string - value: - type: string - format: byte - tags: - - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': - get: - summary: |- - DelegationTotalRewards queries the total rewards accrued by a each - validator. - operationId: DelegationTotalRewards - responses: - '200': - description: A successful response. - schema: - type: object - properties: - rewards: - type: array - items: - type: object - properties: - validator_address: - type: string - reward: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a - decimal amount. + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + protocol buffer message. This string must contain at + least - NOTE: The amount field is an Dec which implements the - custom method + one "/" character. The last segment of the URL's path + must represent - signatures required by gogoproto. - description: |- - DelegationDelegatorReward represents the properties - of a delegator's delegation reward. - description: rewards defines all the rewards accrued by a delegator. - total: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in + a canonical form - NOTE: The amount field is an Dec which implements the custom - method + (e.g., leading "." is not accepted). - signatures required by gogoproto. - description: total defines the sum of all the rewards. - description: |- - QueryDelegationTotalRewardsResponse is the response type for the - Query/DelegationTotalRewards RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - name: delegator_address - description: delegator_address defines the delegator address to query for. + - name: proposal_id + description: proposal_id defines the unique id of the proposal. in: path required: true type: string + format: uint64 tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': + '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': get: - summary: DelegationRewards queries the total rewards accrued by a delegation. - operationId: DelegationRewards + summary: Deposits queries all deposits of a single proposal. + operationId: Deposits responses: '200': description: A successful response. schema: type: object properties: - rewards: + deposits: type: array items: type: object properties: - denom: + proposal_id: type: string - amount: + format: uint64 + depositor: type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an + amount. - NOTE: The amount field is an Dec which implements the custom - method + NOTE: The amount field is an Int which implements the + custom method - signatures required by gogoproto. - description: rewards defines the rewards accrued by a delegation. - description: |- - QueryDelegationRewardsResponse is the response type for the - Query/DelegationRewards RPC method. + signatures required by gogoproto. + description: >- + Deposit defines an amount deposited by an account address to + an active + + proposal. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDepositsResponse is the response type for the Query/Deposits + RPC method. default: description: An unexpected error response schema: @@ -9917,247 +8423,264 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } parameters: - - name: delegator_address - description: delegator_address defines the delegator address to query for. + - name: proposal_id + description: proposal_id defines the unique id of the proposal. in: path required: true type: string - - name: validator_address - description: validator_address defines the validator address to query for. - in: path - required: true + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': + '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': get: - summary: DelegatorValidators queries the validators of a delegator. - operationId: DelegatorValidators + summary: >- + Deposit queries single deposit information based proposalID, + depositAddr. + operationId: Deposit responses: '200': description: A successful response. schema: type: object properties: - validators: - type: array - items: - type: string - description: >- - validators defines the validators a delegator is delegating - for. - description: |- - QueryDelegatorValidatorsResponse is the response type for the - Query/DelegatorValidators RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: delegator_address - description: delegator_address defines the delegator address to query for. - in: path - required: true - type: string - tags: - - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': - get: - summary: DelegatorWithdrawAddress queries withdraw address of a delegator. - operationId: DelegatorWithdrawAddress - responses: - '200': - description: A successful response. - schema: - type: object - properties: - withdraw_address: - type: string - description: withdraw_address defines the delegator address to query for. - description: |- - QueryDelegatorWithdrawAddressResponse is the response type for the - Query/DelegatorWithdrawAddress RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: delegator_address - description: delegator_address defines the delegator address to query for. - in: path - required: true - type: string - tags: - - Query - /cosmos/distribution/v1beta1/params: - get: - summary: Params queries params of the distribution module. - operationId: DistributionParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - description: params defines the parameters of the module. + deposit: type: object properties: - community_tax: - type: string - base_proposer_reward: + proposal_id: type: string - bonus_proposer_reward: + format: uint64 + depositor: type: string - withdraw_addr_enabled: - type: boolean - format: boolean - description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - tags: - - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': - get: - summary: ValidatorCommission queries accumulated commission for a validator. - operationId: ValidatorCommission - responses: - '200': - description: A successful response. - schema: - type: object - properties: - commission: - description: commission defines the commision the validator received. - type: object - properties: - commission: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - DecCoin defines a token with a denomination and a - decimal amount. - - - NOTE: The amount field is an Dec which implements the - custom method - - signatures required by gogoproto. - title: |- - QueryValidatorCommissionResponse is the response type for the - Query/ValidatorCommission RPC method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: validator_address - description: validator_address defines the validator address to query for. - in: path - required: true - type: string - tags: - - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': - get: - summary: ValidatorOutstandingRewards queries rewards of a validator address. - operationId: ValidatorOutstandingRewards - responses: - '200': - description: A successful response. - schema: - type: object - properties: - rewards: - type: object - properties: - rewards: + amount: type: array items: type: object @@ -10167,107 +8690,21 @@ paths: amount: type: string description: >- - DecCoin defines a token with a denomination and a - decimal amount. + Coin defines a token with a denomination and an amount. - NOTE: The amount field is an Dec which implements the + NOTE: The amount field is an Int which implements the custom method signatures required by gogoproto. description: >- - ValidatorOutstandingRewards represents outstanding - (un-withdrawn) rewards + Deposit defines an amount deposited by an account address to + an active - for a validator inexpensive to track, allows simple sanity - checks. + proposal. description: >- - QueryValidatorOutstandingRewardsResponse is the response type for - the - - Query/ValidatorOutstandingRewards RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: validator_address - description: validator_address defines the validator address to query for. - in: path - required: true - type: string - tags: - - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': - get: - summary: ValidatorSlashes queries slash events of a validator. - operationId: ValidatorSlashes - responses: - '200': - description: A successful response. - schema: - type: object - properties: - slashes: - type: array - items: - type: object - properties: - validator_period: - type: string - format: uint64 - fraction: - type: string - description: >- - ValidatorSlashEvent represents a validator slash event. - - Height is implicit within the store key. - - This is needed to calculate appropriate amount of staking - tokens - - for delegations which are withdrawn after a slash has - occurred. - description: slashes defines the slashes the validator received. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: |- - QueryValidatorSlashesResponse is the response type for the - Query/ValidatorSlashes RPC method. + QueryDepositResponse is the response type for the Query/Deposit + RPC method. default: description: An unexpected error response schema: @@ -10281,108 +8718,6 @@ paths: message: type: string details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: validator_address - description: validator_address defines the validator address to query for. - in: path - required: true - type: string - - name: starting_height - description: >- - starting_height defines the optional starting height to query the - slashes. - in: query - required: false - type: string - format: uint64 - - name: ending_height - description: >- - starting_height defines the optional ending height to query the - slashes. - in: query - required: false - type: string - format: uint64 - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean - tags: - - Query - /cosmos/evidence/v1beta1/evidence: - get: - summary: AllEvidence queries all evidence. - operationId: AllEvidence - responses: - '200': - description: A successful response. - schema: - type: object - properties: - evidence: type: array items: type: object @@ -10559,30 +8894,47 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - description: evidence returns all evidences. - pagination: - description: pagination defines the pagination in the response. + parameters: + - name: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: depositor + description: depositor defines the deposit addresses from the proposals. + in: path + required: true + type: string + tags: + - Query + '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': + get: + summary: TallyResult queries the tally of a proposal vote. + operationId: TallyResult + responses: + '200': + description: A successful response. + schema: + type: object + properties: + tally: type: object properties: - next_key: + 'yes': type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + abstain: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + 'no': + type: string + no_with_veto: + type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. description: >- - QueryAllEvidenceResponse is the response type for the - Query/AllEvidence RPC - - method. + QueryTallyResultResponse is the response type for the Query/Tally + RPC method. default: description: An unexpected error response schema: @@ -10773,250 +9125,111 @@ paths: "value": "1.212s" } parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false + - name: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + format: uint64 + tags: + - Query + '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': + get: + summary: Votes queries votes of a given proposal. + operationId: Votes + responses: + '200': + description: A successful response. + schema: + type: object + properties: + votes: + type: array + items: + type: object + properties: + proposal_id: + type: string + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field + is set in queries - It is less efficient than using key. Only one of offset or key - should + if and only if `len(options) == 1` and that option has + weight 1. In all - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. + other cases, this field will default to + VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: + type: array + items: + type: object + properties: + option: + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a + given governance proposal. - count_total is only respected when offset is used. It is ignored - when key + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: + type: string + description: >- + WeightedVoteOption defines a unit of vote for vote + split. - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: >- + Vote defines a vote on a governance proposal. - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean - tags: - - Query - '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': - get: - summary: Evidence queries evidence based on evidence hash. - operationId: Evidence - responses: - '200': - description: A successful response. - schema: - type: object - properties: - evidence: + A Vote consists of a proposal ID, the voter, and the vote + option. + description: votes defined the queried votes. + pagination: + description: pagination defines the pagination in the response. type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: + next_key: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } + was set, its value is undefined otherwise description: >- - QueryEvidenceResponse is the response type for the Query/Evidence - RPC method. + QueryVotesResponse is the response type for the Query/Votes RPC + method. default: description: An unexpected error response schema: @@ -11207,85 +9420,147 @@ paths: "value": "1.212s" } parameters: - - name: evidence_hash - description: evidence_hash defines the hash of the requested evidence. + - name: proposal_id + description: proposal_id defines the unique id of the proposal. in: path required: true type: string + format: uint64 + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - '/cosmos/gov/v1beta1/params/{params_type}': + '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': get: - summary: Params queries all parameters of the gov module. - operationId: GovParams + summary: 'Vote queries voted information based on proposalID, voterAddr.' + operationId: Vote responses: '200': description: A successful response. schema: type: object properties: - voting_params: - description: voting_params defines the parameters related to voting. + vote: type: object properties: - voting_period: + proposal_id: type: string - description: Length of the voting period. - deposit_params: - description: deposit_params defines the parameters related to deposit. - type: object - properties: - min_deposit: + format: uint64 + voter: + type: string + option: + description: >- + Deprecated: Prefer to use `options` instead. This field is + set in queries + + if and only if `len(options) == 1` and that option has + weight 1. In all + + other cases, this field will default to + VOTE_OPTION_UNSPECIFIED. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + options: type: array items: type: object properties: - denom: + option: type: string - amount: + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED + description: >- + VoteOption enumerates the valid vote options for a + given governance proposal. + + - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. + - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. + - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. + - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. + - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. + weight: type: string description: >- - Coin defines a token with a denomination and an amount. + WeightedVoteOption defines a unit of vote for vote + split. - NOTE: The amount field is an Int which implements the - custom method + Since: cosmos-sdk 0.43 + title: 'Since: cosmos-sdk 0.43' + description: >- + Vote defines a vote on a governance proposal. - signatures required by gogoproto. - description: Minimum deposit for a proposal to enter voting period. - max_deposit_period: - type: string - description: >- - Maximum period for Atom holders to deposit on a proposal. - Initial value: 2 - months. - tally_params: - description: tally_params defines the parameters related to tally. - type: object - properties: - quorum: - type: string - format: byte - description: >- - Minimum percentage of total stake needed to vote for a - result to be - considered valid. - threshold: - type: string - format: byte - description: >- - Minimum proportion of Yes votes for proposal to pass. - Default value: 0.5. - veto_threshold: - type: string - format: byte - description: >- - Minimum value of Veto votes to Total votes ratio for - proposal to be - vetoed. Default value: 1/3. + A Vote consists of a proposal ID, the voter, and the vote + option. description: >- - QueryParamsResponse is the response type for the Query/Params RPC + QueryVoteResponse is the response type for the Query/Vote RPC method. default: description: An unexpected error response @@ -11477,286 +9752,347 @@ paths: "value": "1.212s" } parameters: - - name: params_type - description: >- - params_type defines which parameters to query for, can be one of - "voting", - - "tallying" or "deposit". + - name: proposal_id + description: proposal_id defines the unique id of the proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter defines the oter address for the proposals. in: path required: true type: string tags: - Query - /cosmos/gov/v1beta1/proposals: + /cosmos/mint/v1beta1/annual_provisions: get: - summary: Proposals queries all proposals based on given status. - operationId: Proposals + summary: AnnualProvisions current minting annual provisions value. + operationId: AnnualProvisions responses: '200': description: A successful response. schema: type: object properties: - proposals: + annual_provisions: + type: string + format: byte + description: >- + annual_provisions is the current minting annual provisions + value. + description: |- + QueryAnnualProvisionsResponse is the response type for the + Query/AnnualProvisions RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - proposal_id: + type_url: type: string - format: uint64 - content: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: + value: type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: >- - ProposalStatus enumerates the valid statuses of a - proposal. + format: byte + tags: + - Query + /cosmos/mint/v1beta1/inflation: + get: + summary: Inflation returns the current minting inflation value. + operationId: Inflation + responses: + '200': + description: A successful response. + schema: + type: object + properties: + inflation: + type: string + format: byte + description: inflation is the current minting inflation value. + description: >- + QueryInflationResponse is the response type for the + Query/Inflation RPC - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. - submit_time: + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: type: string - format: date-time - deposit_end_time: + value: type: string - format: date-time - total_deposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an - amount. - + format: byte + tags: + - Query + /cosmos/mint/v1beta1/params: + get: + summary: Params returns the total set of minting parameters. + operationId: MintParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + mint_denom: + type: string + title: type of coin to mint + inflation_rate_change: + type: string + title: maximum annual change in inflation rate + inflation_max: + type: string + title: maximum inflation rate + inflation_min: + type: string + title: minimum inflation rate + goal_bonded: + type: string + title: goal of percent bonded atoms + blocks_per_year: + type: string + format: uint64 + title: expected blocks per year + description: >- + QueryParamsResponse is the response type for the Query/Params RPC + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/params/v1beta1/params: + get: + summary: |- + Params queries a specific parameter of a module, given its subspace and + key. + operationId: Params + responses: + '200': + description: A successful response. + schema: + type: object + properties: + param: + description: param defines the queried parameter. + type: object + properties: + subspace: + type: string + key: + type: string + value: + type: string + description: >- + QueryParamsResponse is response type for the Query/Params RPC + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: subspace + description: subspace defines the module to query the parameter for. + in: query + required: false + type: string + - name: key + description: key defines the key of the parameter in the subspace. + in: query + required: false + type: string + tags: + - Query + /cosmos/slashing/v1beta1/params: + get: + summary: Params queries the parameters of slashing module + operationId: SlashingParams + responses: + '200': + description: A successful response. + schema: + type: object + properties: + params: + type: object + properties: + signed_blocks_window: + type: string + format: int64 + min_signed_per_window: + type: string + format: byte + downtime_jail_duration: + type: string + slash_fraction_double_sign: + type: string + format: byte + slash_fraction_downtime: + type: string + format: byte + description: >- + Params represents the parameters used for by the slashing + module. + title: >- + QueryParamsResponse is the response type for the Query/Params RPC + method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + tags: + - Query + /cosmos/slashing/v1beta1/signing_infos: + get: + summary: SigningInfos queries signing info of all validators + operationId: SigningInfos + responses: + '200': + description: A successful response. + schema: + type: object + properties: + info: + type: array + items: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: >- + Height at which validator was first a candidate OR was + unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a + bonded - NOTE: The amount field is an Int which implements the - custom method + in a block and may have signed a precommit or not. This + in conjunction with the - signatures required by gogoproto. - voting_start_time: + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: type: string format: date-time - voting_end_time: + description: >- + Timestamp until which the validator is jailed due to + liveness downtime. + tombstoned: + type: boolean + format: boolean + description: >- + Whether or not a validator has been tombstoned (killed + out of validator set). It is set + + once the validator commits an equivocation or for any + other configured misbehiavor. + missed_blocks_counter: type: string - format: date-time + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. description: >- - Proposal defines the core field members of a governance - proposal. + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: info is the signing info of all validators pagination: - description: pagination defines the pagination in the response. type: object properties: next_key: @@ -11773,11 +10109,21 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- - QueryProposalsResponse is the response type for the - Query/Proposals RPC + description: >- + PageResponse is to be embedded in gRPC response messages where + the - method. + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + title: >- + QuerySigningInfosResponse is the response type for the + Query/SigningInfos RPC + + method default: description: An unexpected error response schema: @@ -11797,8 +10143,276 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of + value: + type: string + format: byte + parameters: + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': + get: + summary: SigningInfo queries the signing info of given cons address + operationId: SigningInfo + responses: + '200': + description: A successful response. + schema: + type: object + properties: + val_signing_info: + type: object + properties: + address: + type: string + start_height: + type: string + format: int64 + title: >- + Height at which validator was first a candidate OR was + unjailed + index_offset: + type: string + format: int64 + description: >- + Index which is incremented each time the validator was a + bonded + + in a block and may have signed a precommit or not. This in + conjunction with the + + `SignedBlocksWindow` param determines the index in the + `MissedBlocksBitArray`. + jailed_until: + type: string + format: date-time + description: >- + Timestamp until which the validator is jailed due to + liveness downtime. + tombstoned: + type: boolean + format: boolean + description: >- + Whether or not a validator has been tombstoned (killed out + of validator set). It is set + + once the validator commits an equivocation or for any + other configured misbehiavor. + missed_blocks_counter: + type: string + format: int64 + description: >- + A counter kept to avoid unnecessary array reads. + + Note that `Sum(MissedBlocksBitArray)` always equals + `MissedBlocksCounter`. + description: >- + ValidatorSigningInfo defines a validator's signing info for + monitoring their + + liveness activity. + title: >- + val_signing_info is the signing info of requested val cons + address + title: >- + QuerySigningInfoResponse is the response type for the + Query/SigningInfo RPC + + method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: cons_address + description: cons_address is the address to query signing info of + in: path + required: true + type: string + tags: + - Query + '/cosmos/staking/v1beta1/delegations/{delegator_addr}': + get: + summary: >- + DelegatorDelegations queries all delegations of a given delegator + address. + operationId: DelegatorDelegations + responses: + '200': + description: A successful response. + schema: + type: object + properties: + delegation_responses: + type: array + items: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of + the delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of + the validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an + account. It is + + owned by one delegator, and is associated with the + voting power of one + + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that + it contains a + + balance in addition to shares which is more suitable for + client responses. + description: >- + delegation_responses defines all the delegations' info of a + delegator. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryDelegatorDelegationsResponse is response type for the + Query/DelegatorDelegations RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the serialized protocol buffer message. This string must contain at @@ -11968,41 +10582,10 @@ paths: "value": "1.212s" } parameters: - - name: proposal_status - description: |- - proposal_status defines the status of the proposals. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - in: query - required: false - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - - name: voter - description: voter defines the voter address for the proposals. - in: query - required: false - type: string - - name: depositor - description: depositor defines the deposit addresses from the proposals. - in: query - required: false + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true type: string - name: pagination.key description: |- @@ -12064,319 +10647,200 @@ paths: format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}': + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': get: - summary: Proposal queries proposal details based on ProposalID. - operationId: Proposal + summary: Redelegations queries redelegations of given address. + operationId: Redelegations responses: '200': description: A successful response. schema: type: object properties: - proposal: + redelegation_responses: + type: array + items: + type: object + properties: + redelegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of + the delegator. + validator_src_address: + type: string + description: >- + validator_src_address is the validator redelegation + source operator address. + validator_dst_address: + type: string + description: >- + validator_dst_address is the validator redelegation + destination operator address. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for + redelegation completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance + when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of + destination-validator shares created by + redelegation. + description: >- + RedelegationEntry defines a redelegation object + with relevant metadata. + description: entries are the redelegation entries. + description: >- + Redelegation contains the list of a particular + delegator's redelegating bonds + + from a particular source validator to a particular + destination validator. + entries: + type: array + items: + type: object + properties: + redelegation_entry: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height defines the height which the + redelegation took place. + completion_time: + type: string + format: date-time + description: >- + completion_time defines the unix time for + redelegation completion. + initial_balance: + type: string + description: >- + initial_balance defines the initial balance + when redelegation started. + shares_dst: + type: string + description: >- + shares_dst is the amount of + destination-validator shares created by + redelegation. + description: >- + RedelegationEntry defines a redelegation object + with relevant metadata. + balance: + type: string + description: >- + RedelegationEntryResponse is equivalent to a + RedelegationEntry except that it + + contains a balance in addition to shares which is more + suitable for client + + responses. + description: >- + RedelegationResponse is equivalent to a Redelegation except + that its entries + + contain a balance in addition to shares which is more + suitable for client + + responses. + pagination: + description: pagination defines the pagination in the response. type: object properties: - proposal_id: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string format: uint64 - content: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized + title: >- + total is total number of results available if + PageRequest.count_total - protocol buffer message. This string must contain at - least + was set, its value is undefined otherwise + description: >- + QueryRedelegationsResponse is response type for the + Query/Redelegations RPC - one "/" character. The last segment of the URL's path - must represent + method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - the fully qualified name of the type (as in + protocol buffer message. This string must contain at + least - `path/google.protobuf.Duration`). The name should be - in a canonical form + one "/" character. The last segment of the URL's path + must represent - (e.g., leading "." is not accepted). + the fully qualified name of the type (as in + `path/google.protobuf.Duration`). The name should be in + a canonical form - In practice, teams usually precompile into the binary - all types that they + (e.g., leading "." is not accepted). - expect it to use in the context of Any. However, for - URLs which use the - scheme `http`, `https`, or no scheme, one can - optionally set up a type + In practice, teams usually precompile into the binary + all types that they - server that maps type URLs to message definitions as - follows: + expect it to use in the context of Any. However, for + URLs which use the + scheme `http`, `https`, or no scheme, one can optionally + set up a type - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - status: - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_DEPOSIT_PERIOD - - PROPOSAL_STATUS_VOTING_PERIOD - - PROPOSAL_STATUS_PASSED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_FAILED - default: PROPOSAL_STATUS_UNSPECIFIED - description: >- - ProposalStatus enumerates the valid statuses of a - proposal. - - - PROPOSAL_STATUS_UNSPECIFIED: PROPOSAL_STATUS_UNSPECIFIED defines the default propopsal status. - - PROPOSAL_STATUS_DEPOSIT_PERIOD: PROPOSAL_STATUS_DEPOSIT_PERIOD defines a proposal status during the deposit - period. - - PROPOSAL_STATUS_VOTING_PERIOD: PROPOSAL_STATUS_VOTING_PERIOD defines a proposal status during the voting - period. - - PROPOSAL_STATUS_PASSED: PROPOSAL_STATUS_PASSED defines a proposal status of a proposal that has - passed. - - PROPOSAL_STATUS_REJECTED: PROPOSAL_STATUS_REJECTED defines a proposal status of a proposal that has - been rejected. - - PROPOSAL_STATUS_FAILED: PROPOSAL_STATUS_FAILED defines a proposal status of a proposal that has - failed. - final_tally_result: - type: object - properties: - 'yes': - type: string - abstain: - type: string - 'no': - type: string - no_with_veto: - type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. - submit_time: - type: string - format: date-time - deposit_end_time: - type: string - format: date-time - total_deposit: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the - custom method - - signatures required by gogoproto. - voting_start_time: - type: string - format: date-time - voting_end_time: - type: string - format: date-time - description: >- - Proposal defines the core field members of a governance - proposal. - description: >- - QueryProposalResponse is the response type for the Query/Proposal - RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: * If no scheme is provided, `https` is assumed. @@ -12519,57 +10983,146 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id defines the unique id of the proposal. + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. in: path required: true type: string + - name: src_validator_addr + description: src_validator_addr defines the validator address to redelegate from. + in: query + required: false + type: string + - name: dst_validator_addr + description: dst_validator_addr defines the validator address to redelegate to. + in: query + required: false + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': get: - summary: Deposits queries all deposits of a single proposal. - operationId: Deposits + summary: >- + DelegatorUnbondingDelegations queries all unbonding delegations of a + given + + delegator address. + operationId: DelegatorUnbondingDelegations responses: '200': description: A successful response. schema: type: object properties: - deposits: + unbonding_responses: type: array items: type: object properties: - proposal_id: + delegator_address: type: string - format: uint64 - depositor: + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: type: string - amount: + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: type: array items: type: object properties: - denom: + creation_height: type: string - amount: + format: int64 + description: >- + creation_height is the height which the unbonding + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time is the unix time for unbonding + completion. + initial_balance: type: string + description: >- + initial_balance defines the tokens initially + scheduled to receive at completion. + balance: + type: string + description: >- + balance defines the tokens to receive at + completion. description: >- - Coin defines a token with a denomination and an - amount. - - - NOTE: The amount field is an Int which implements the - custom method - - signatures required by gogoproto. + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the unbonding delegation entries. description: >- - Deposit defines an amount deposited by an account address to - an active + UnbondingDelegation stores all of a single delegator's + unbonding bonds - proposal. + for a single validator in an time-ordered list. pagination: description: pagination defines the pagination in the response. type: object @@ -12589,8 +11142,10 @@ paths: was set, its value is undefined otherwise description: >- - QueryDepositsResponse is the response type for the Query/Deposits - RPC method. + QueryUnbondingDelegatorDelegationsResponse is response type for + the + + Query/UnbondingDelegatorDelegations RPC method. default: description: An unexpected error response schema: @@ -12781,12 +11336,11 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id defines the unique id of the proposal. + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. in: path required: true type: string - format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -12847,281 +11401,353 @@ paths: format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': get: - summary: >- - Deposit queries single deposit information based proposalID, - depositAddr. - operationId: Deposit + summary: |- + DelegatorValidators queries all validators info for given delegator + address. + operationId: StakingDelegatorValidators responses: '200': description: A successful response. schema: type: object properties: - deposit: - type: object - properties: - proposal_id: - type: string - format: uint64 - depositor: - type: string - amount: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the - custom method - - signatures required by gogoproto. - description: >- - Deposit defines an amount deposited by an account address to - an active - - proposal. - description: >- - QueryDepositResponse is the response type for the Query/Deposit - RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: + validators: type: array items: type: object properties: - type_url: + operator_address: type: string description: >- - A URL/resource name that uniquely identifies the type of - the serialized + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's + path must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be + in a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the + binary all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can + optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available + in the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty + scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values - in the form + Protobuf library provides support to pack/unpack Any + values in the form - of utility functions or additional generated methods of the - Any type. + of utility functions or additional generated methods of + the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the + regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, + with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom - JSON + If the embedded message type is well-known and has a + custom JSON - representation, that representation will be embedded adding - a field + representation, that representation will be embedded + adding a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message + [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: proposal_id - description: proposal_id defines the unique id of the proposal. - in: path - required: true - type: string - format: uint64 - - name: depositor - description: depositor defines the deposit addresses from the proposals. - in: path - required: true - type: string - tags: - - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': - get: - summary: TallyResult queries the tally of a proposal vote. - operationId: TallyResult - responses: - '200': - description: A successful response. - schema: - type: object - properties: - tally: + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed + from bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at + which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for + the validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission + rates to be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to + delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate + which validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. + description: >- + Validator defines a validator, together with the total + amount of the + + Validator's bond shares and their exchange rate to coins. + Slashing results in + + a decrease in the exchange rate, allowing correct + calculation of future + + undelegations without iterating over delegators. When coins + are delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated + divided by the current + + exchange rate. Voting power can be calculated as total + bonded shares + + multiplied by exchange rate. + description: validators defines the the validators' info of a delegator. + pagination: + description: pagination defines the pagination in the response. type: object properties: - 'yes': - type: string - abstain: - type: string - 'no': + next_key: type: string - no_with_veto: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - description: >- - TallyResult defines a standard tally for a governance - proposal. - description: >- - QueryTallyResultResponse is the response type for the Query/Tally - RPC method. + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: |- + QueryDelegatorValidatorsResponse is response type for the + Query/DelegatorValidators RPC method. default: description: An unexpected error response schema: @@ -13312,111 +11938,394 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id defines the unique id of the proposal. + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. in: path required: true type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': + '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': get: - summary: Votes queries votes of a given proposal. - operationId: Votes + summary: |- + DelegatorValidator queries validator info for given delegator validator + pair. + operationId: DelegatorValidator responses: '200': description: A successful response. schema: type: object properties: - votes: - type: array - items: - type: object - properties: - proposal_id: - type: string - format: uint64 - voter: - type: string - option: - description: >- - Deprecated: Prefer to use `options` instead. This field - is set in queries + validator: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - if and only if `len(options) == 1` and that option has - weight 1. In all + protocol buffer message. This string must contain at + least - other cases, this field will default to - VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: - type: array - items: - type: object - properties: - option: - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - description: >- - VoteOption enumerates the valid vote options for a - given governance proposal. + one "/" character. The last segment of the URL's path + must represent - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte description: >- - WeightedVoteOption defines a unit of vote for vote - split. + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + URL that describes the type of the serialized message. - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' - description: >- - Vote defines a vote on a governance proposal. - A Vote consists of a proposal ID, the voter, and the vote - option. - description: votes defined the queried votes. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from + bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at + which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates + to be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to delegators, + as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. + description: >- + Validator defines a validator, together with the total amount + of the - was set, its value is undefined otherwise - description: >- - QueryVotesResponse is the response type for the Query/Votes RPC - method. + Validator's bond shares and their exchange rate to coins. + Slashing results in + + a decrease in the exchange rate, allowing correct calculation + of future + + undelegations without iterating over delegators. When coins + are delegated to + + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated divided + by the current + + exchange rate. Voting power can be calculated as total bonded + shares + + multiplied by exchange rate. + description: |- + QueryDelegatorValidatorResponse response type for the + Query/DelegatorValidator RPC method. default: description: An unexpected error response schema: @@ -13607,147 +12516,428 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id defines the unique id of the proposal. + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. in: path required: true type: string - format: uint64 - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false + - name: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': + '/cosmos/staking/v1beta1/historical_info/{height}': get: - summary: 'Vote queries voted information based on proposalID, voterAddr.' - operationId: Vote + summary: HistoricalInfo queries the historical info for given height. + operationId: HistoricalInfo responses: '200': description: A successful response. schema: type: object properties: - vote: + hist: + description: hist defines the historical info at the given height. type: object properties: - proposal_id: - type: string - format: uint64 - voter: - type: string - option: - description: >- - Deprecated: Prefer to use `options` instead. This field is - set in queries + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing + a block in the blockchain, - if and only if `len(options) == 1` and that option has - weight 1. In all + including all blockchain data structures and the rules + of the application's - other cases, this field will default to - VOTE_OPTION_UNSPECIFIED. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - options: + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + title: prev block info + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + valset: type: array items: type: object properties: - option: + operator_address: type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED description: >- - VoteOption enumerates the valid vote options for a - given governance proposal. + operator_address defines the address of the + validator's operator; bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - - VOTE_OPTION_UNSPECIFIED: VOTE_OPTION_UNSPECIFIED defines a no-op vote option. - - VOTE_OPTION_YES: VOTE_OPTION_YES defines a yes vote option. - - VOTE_OPTION_ABSTAIN: VOTE_OPTION_ABSTAIN defines an abstain vote option. - - VOTE_OPTION_NO: VOTE_OPTION_NO defines a no vote option. - - VOTE_OPTION_NO_WITH_VETO: VOTE_OPTION_NO_WITH_VETO defines a no with veto vote option. - weight: - type: string + protocol buffer message. This string must + contain at least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name + should be in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, + for URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message + definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup + results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently + available in the official + + protobuf release, and it is not used for type + URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of + the above specified type. + description: >- + `Any` contains an arbitrary serialized protocol + buffer message along with a + + URL that describes the type of the serialized + message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods + of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will + by default use + + 'type.googleapis.com/full.type.name' as the type URL + and the unpack + + methods only use the fully qualified type name after + the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" + will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded + message, with an + + additional field `@type` which contains the type + URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to + the `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed + from bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature + (ex. UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height + at which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time + for the validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission + rates to be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to + delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate + which validator can ever charge, as a + fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate + was changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. description: >- - WeightedVoteOption defines a unit of vote for vote - split. + Validator defines a validator, together with the total + amount of the + Validator's bond shares and their exchange rate to + coins. Slashing results in - Since: cosmos-sdk 0.43 - title: 'Since: cosmos-sdk 0.43' - description: >- - Vote defines a vote on a governance proposal. + a decrease in the exchange rate, allowing correct + calculation of future - A Vote consists of a proposal ID, the voter, and the vote - option. + undelegations without iterating over delegators. When + coins are delegated to + + this validator, the validator is credited with a + delegation whose number of + + bond shares is based on the amount of coins delegated + divided by the current + + exchange rate. Voting power can be calculated as total + bonded shares + + multiplied by exchange rate. description: >- - QueryVoteResponse is the response type for the Query/Vote RPC + QueryHistoricalInfoResponse is response type for the + Query/HistoricalInfo RPC + method. default: description: An unexpected error response @@ -13939,109 +13129,18 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id defines the unique id of the proposal. - in: path - required: true - type: string - format: uint64 - - name: voter - description: voter defines the oter address for the proposals. + - name: height + description: height defines at which height to query the historical info. in: path required: true type: string + format: int64 tags: - Query - /cosmos/mint/v1beta1/annual_provisions: - get: - summary: AnnualProvisions current minting annual provisions value. - operationId: AnnualProvisions - responses: - '200': - description: A successful response. - schema: - type: object - properties: - annual_provisions: - type: string - format: byte - description: >- - annual_provisions is the current minting annual provisions - value. - description: |- - QueryAnnualProvisionsResponse is the response type for the - Query/AnnualProvisions RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - tags: - - Query - /cosmos/mint/v1beta1/inflation: - get: - summary: Inflation returns the current minting inflation value. - operationId: Inflation - responses: - '200': - description: A successful response. - schema: - type: object - properties: - inflation: - type: string - format: byte - description: inflation is the current minting inflation value. - description: >- - QueryInflationResponse is the response type for the - Query/Inflation RPC - - method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - tags: - - Query - /cosmos/mint/v1beta1/params: + /cosmos/staking/v1beta1/params: get: - summary: Params returns the total set of minting parameters. - operationId: MintParams + summary: Parameters queries the staking parameters. + operationId: StakingParams responses: '200': description: A successful response. @@ -14049,30 +13148,33 @@ paths: type: object properties: params: - description: params defines the parameters of the module. + description: params holds all the parameters of this module. type: object properties: - mint_denom: - type: string - title: type of coin to mint - inflation_rate_change: - type: string - title: maximum annual change in inflation rate - inflation_max: - type: string - title: maximum inflation rate - inflation_min: - type: string - title: minimum inflation rate - goal_bonded: + unbonding_time: type: string - title: goal of percent bonded atoms - blocks_per_year: + description: unbonding_time is the time duration of unbonding. + max_validators: + type: integer + format: int64 + description: max_validators is the maximum number of validators. + max_entries: + type: integer + format: int64 + description: >- + max_entries is the max entries for either unbonding + delegation or redelegation (per pair/trio). + historical_entries: + type: integer + format: int64 + description: >- + historical_entries is the number of historical entries to + persist. + bond_denom: type: string - format: uint64 - title: expected blocks per year + description: bond_denom defines the bondable coin denomination. description: >- - QueryParamsResponse is the response type for the Query/Params RPC + QueryParamsResponse is response type for the Query/Params RPC method. default: description: An unexpected error response @@ -14093,104 +13195,197 @@ paths: properties: type_url: type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in + a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } tags: - Query - /cosmos/params/v1beta1/params: - get: - summary: |- - Params queries a specific parameter of a module, given its subspace and - key. - operationId: Params - responses: - '200': - description: A successful response. - schema: - type: object - properties: - param: - description: param defines the queried parameter. - type: object - properties: - subspace: - type: string - key: - type: string - value: - type: string - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: subspace - description: subspace defines the module to query the parameter for. - in: query - required: false - type: string - - name: key - description: key defines the key of the parameter in the subspace. - in: query - required: false - type: string - tags: - - Query - /cosmos/slashing/v1beta1/params: + /cosmos/staking/v1beta1/pool: get: - summary: Params queries the parameters of slashing module - operationId: SlashingParams + summary: Pool queries the pool info. + operationId: Pool responses: '200': description: A successful response. schema: type: object properties: - params: + pool: + description: pool defines the pool info. type: object properties: - signed_blocks_window: - type: string - format: int64 - min_signed_per_window: - type: string - format: byte - downtime_jail_duration: - type: string - slash_fraction_double_sign: + not_bonded_tokens: type: string - format: byte - slash_fraction_downtime: + bonded_tokens: type: string - format: byte - description: >- - Params represents the parameters used for by the slashing - module. - title: >- - QueryParamsResponse is the response type for the Query/Params RPC - method + description: QueryPoolResponse is response type for the Query/Pool RPC method. default: description: An unexpected error response schema: @@ -14210,354 +13405,502 @@ paths: properties: type_url: type: string - value: - type: string - format: byte - tags: - - Query - /cosmos/slashing/v1beta1/signing_infos: - get: - summary: SigningInfos queries signing info of all validators - operationId: SigningInfos - responses: - '200': - description: A successful response. - schema: - type: object - properties: - info: - type: array - items: - type: object - properties: - address: - type: string - start_height: - type: string - format: int64 - title: >- - Height at which validator was first a candidate OR was - unjailed - index_offset: - type: string - format: int64 description: >- - Index which is incremented each time the validator was a - bonded + A URL/resource name that uniquely identifies the type of + the serialized - in a block and may have signed a precommit or not. This - in conjunction with the + protocol buffer message. This string must contain at + least - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailed_until: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to - liveness downtime. - tombstoned: - type: boolean - format: boolean - description: >- - Whether or not a validator has been tombstoned (killed - out of validator set). It is set + one "/" character. The last segment of the URL's path + must represent - once the validator commits an equivocation or for any - other configured misbehiavor. - missed_blocks_counter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. + the fully qualified name of the type (as in - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their + `path/google.protobuf.Duration`). The name should be in + a canonical form - liveness activity. - title: info is the signing info of all validators - pagination: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + (e.g., leading "." is not accepted). - was set, its value is undefined otherwise - description: >- - PageResponse is to be embedded in gRPC response messages where - the - corresponding request message has used PageRequest. + In practice, teams usually precompile into the binary + all types that they - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - title: >- - QuerySigningInfosResponse is the response type for the - Query/SigningInfos RPC + expect it to use in the context of Any. However, for + URLs which use the - method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. value: type: string format: byte - parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - It is less efficient than using key. Only one of offset or key - should + URL that describes the type of the serialized message. - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + Protobuf library provides support to pack/unpack Any values + in the form - a count of the total number of items available for pagination in - UIs. + of utility functions or additional generated methods of the + Any type. - count_total is only respected when offset is used. It is ignored - when key - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + Example 1: Pack and unpack a message in C++. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding + a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } tags: - Query - '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': + /cosmos/staking/v1beta1/validators: get: - summary: SigningInfo queries the signing info of given cons address - operationId: SigningInfo + summary: Validators queries all validators that match the given status. + operationId: Validators responses: '200': description: A successful response. schema: type: object properties: - val_signing_info: - type: object - properties: - address: - type: string - start_height: - type: string - format: int64 - title: >- - Height at which validator was first a candidate OR was - unjailed - index_offset: - type: string - format: int64 - description: >- - Index which is incremented each time the validator was a - bonded - - in a block and may have signed a precommit or not. This in - conjunction with the - - `SignedBlocksWindow` param determines the index in the - `MissedBlocksBitArray`. - jailed_until: - type: string - format: date-time - description: >- - Timestamp until which the validator is jailed due to - liveness downtime. - tombstoned: - type: boolean - format: boolean - description: >- - Whether or not a validator has been tombstoned (killed out - of validator set). It is set - - once the validator commits an equivocation or for any - other configured misbehiavor. - missed_blocks_counter: - type: string - format: int64 - description: >- - A counter kept to avoid unnecessary array reads. - - Note that `Sum(MissedBlocksBitArray)` always equals - `MissedBlocksCounter`. - description: >- - ValidatorSigningInfo defines a validator's signing info for - monitoring their - - liveness activity. - title: >- - val_signing_info is the signing info of requested val cons - address - title: >- - QuerySigningInfoResponse is the response type for the - Query/SigningInfo RPC - - method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: + validators: type: array items: type: object properties: - type_url: - type: string - value: + operator_address: type: string - format: byte - parameters: - - name: cons_address - description: cons_address is the address to query signing info of - in: path - required: true - type: string - tags: - - Query - '/cosmos/staking/v1beta1/delegations/{delegator_addr}': - get: - summary: >- - DelegatorDelegations queries all delegations of a given delegator - address. - operationId: DelegatorDelegations - responses: - '200': - description: A successful response. - schema: - type: object - properties: - delegation_responses: - type: array - items: - type: object - properties: - delegation: + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: type: object properties: - delegator_address: + type_url: type: string description: >- - delegator_address is the bech32-encoded address of - the delegator. - validator_address: + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: type: string + format: byte description: >- - validator_address is the bech32-encoded address of - the validator. - shares: - type: string - description: shares define the delegation shares received. + Must be a valid serialized protocol buffer of the + above specified type. description: >- - Delegation represents the bond with tokens held by an - account. It is + `Any` contains an arbitrary serialized protocol buffer + message along with a - owned by one delegator, and is associated with the - voting power of one + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed + from bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the validator. - balance: type: object properties: - denom: + moniker: type: string - amount: + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 description: >- - Coin defines a token with a denomination and an amount. + unbonding_height defines, if unbonding, the height at + which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for + the validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission + rates to be used for creating a validator. + type: object + properties: + rate: + type: string + description: >- + rate is the commission rate charged to + delegators, as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate + which validator can ever charge, as a fraction. + max_change_rate: + type: string + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. + update_time: + type: string + format: date-time + description: >- + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. + description: >- + Validator defines a validator, together with the total + amount of the + Validator's bond shares and their exchange rate to coins. + Slashing results in - NOTE: The amount field is an Int which implements the - custom method + a decrease in the exchange rate, allowing correct + calculation of future - signatures required by gogoproto. - description: >- - DelegationResponse is equivalent to Delegation except that - it contains a + undelegations without iterating over delegators. When coins + are delegated to - balance in addition to shares which is more suitable for - client responses. - description: >- - delegation_responses defines all the delegations' info of a - delegator. + this validator, the validator is credited with a delegation + whose number of + + bond shares is based on the amount of coins delegated + divided by the current + + exchange rate. Voting power can be calculated as total + bonded shares + + multiplied by exchange rate. + description: validators contains all the queried validators. pagination: description: pagination defines the pagination in the response. type: object @@ -14576,9 +13919,9 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: |- - QueryDelegatorDelegationsResponse is response type for the - Query/DelegatorDelegations RPC method. + title: >- + QueryValidatorsResponse is response type for the Query/Validators + RPC method default: description: An unexpected error response schema: @@ -14769,10 +14112,10 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. - in: path - required: true + - name: status + description: status enables to query for validators matching a given status. + in: query + required: false type: string - name: pagination.key description: |- @@ -14834,152 +14177,327 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': + '/cosmos/staking/v1beta1/validators/{validator_addr}': get: - summary: Redelegations queries redelegations of given address. - operationId: Redelegations + summary: Validator queries validator info for given validator address. + operationId: Validator responses: '200': description: A successful response. schema: type: object properties: - redelegation_responses: - type: array - items: - type: object - properties: - redelegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of - the delegator. - validator_src_address: - type: string - description: >- - validator_src_address is the validator redelegation - source operator address. - validator_dst_address: - type: string - description: >- - validator_dst_address is the validator redelegation - destination operator address. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for - redelegation completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance - when redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of - destination-validator shares created by - redelegation. - description: >- - RedelegationEntry defines a redelegation object - with relevant metadata. - description: entries are the redelegation entries. - description: >- - Redelegation contains the list of a particular - delegator's redelegating bonds + validator: + type: object + properties: + operator_address: + type: string + description: >- + operator_address defines the address of the validator's + operator; bech encoded in JSON. + consensus_pubkey: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - from a particular source validator to a particular - destination validator. - entries: - type: array - items: + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + jailed: + type: boolean + format: boolean + description: >- + jailed defined whether the validator has been jailed from + bonded status or not. + status: + description: >- + status is the validator status + (bonded/unbonding/unbonded). + type: string + enum: + - BOND_STATUS_UNSPECIFIED + - BOND_STATUS_UNBONDED + - BOND_STATUS_UNBONDING + - BOND_STATUS_BONDED + default: BOND_STATUS_UNSPECIFIED + tokens: + type: string + description: >- + tokens define the delegated tokens (incl. + self-delegation). + delegator_shares: + type: string + description: >- + delegator_shares defines total shares issued to a + validator's delegators. + description: + description: >- + description defines the description terms for the + validator. + type: object + properties: + moniker: + type: string + description: >- + moniker defines a human-readable name for the + validator. + identity: + type: string + description: >- + identity defines an optional identity signature (ex. + UPort or Keybase). + website: + type: string + description: website defines an optional website link. + security_contact: + type: string + description: >- + security_contact defines an optional email for + security contact. + details: + type: string + description: details define other optional details. + unbonding_height: + type: string + format: int64 + description: >- + unbonding_height defines, if unbonding, the height at + which this validator has begun unbonding. + unbonding_time: + type: string + format: date-time + description: >- + unbonding_time defines, if unbonding, the min time for the + validator to complete unbonding. + commission: + description: commission defines the commission parameters. + type: object + properties: + commission_rates: + description: >- + commission_rates defines the initial commission rates + to be used for creating a validator. type: object properties: - redelegation_entry: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height defines the height which the - redelegation took place. - completion_time: - type: string - format: date-time - description: >- - completion_time defines the unix time for - redelegation completion. - initial_balance: - type: string - description: >- - initial_balance defines the initial balance - when redelegation started. - shares_dst: - type: string - description: >- - shares_dst is the amount of - destination-validator shares created by - redelegation. + rate: + type: string description: >- - RedelegationEntry defines a redelegation object - with relevant metadata. - balance: + rate is the commission rate charged to delegators, + as a fraction. + max_rate: + type: string + description: >- + max_rate defines the maximum commission rate which + validator can ever charge, as a fraction. + max_change_rate: type: string + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. + update_time: + type: string + format: date-time description: >- - RedelegationEntryResponse is equivalent to a - RedelegationEntry except that it + update_time is the last time the commission rate was + changed. + min_self_delegation: + type: string + description: >- + min_self_delegation is the validator's self declared + minimum self delegation. + description: >- + Validator defines a validator, together with the total amount + of the - contains a balance in addition to shares which is more - suitable for client + Validator's bond shares and their exchange rate to coins. + Slashing results in - responses. - description: >- - RedelegationResponse is equivalent to a Redelegation except - that its entries + a decrease in the exchange rate, allowing correct calculation + of future - contain a balance in addition to shares which is more - suitable for client + undelegations without iterating over delegators. When coins + are delegated to - responses. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + this validator, the validator is credited with a delegation + whose number of - was set, its value is undefined otherwise - description: >- - QueryRedelegationsResponse is response type for the - Query/Redelegations RPC + bond shares is based on the amount of coins delegated divided + by the current - method. + exchange rate. Voting power can be calculated as total bonded + shares + + multiplied by exchange rate. + title: >- + QueryValidatorResponse is response type for the Query/Validator + RPC method default: description: An unexpected error response schema: @@ -15170,146 +14688,73 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. + - name: validator_addr + description: validator_addr defines the validator address to query for. in: path required: true type: string - - name: src_validator_addr - description: src_validator_addr defines the validator address to redelegate from. - in: query - required: false - type: string - - name: dst_validator_addr - description: dst_validator_addr defines the validator address to redelegate to. - in: query - required: false - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': + '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': get: - summary: >- - DelegatorUnbondingDelegations queries all unbonding delegations of a - given - - delegator address. - operationId: DelegatorUnbondingDelegations + summary: ValidatorDelegations queries delegate info for given validator. + operationId: ValidatorDelegations responses: '200': description: A successful response. schema: type: object properties: - unbonding_responses: + delegation_responses: type: array items: type: object properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string + delegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of + the delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of + the validator. + shares: + type: string + description: shares define the delegation shares received. description: >- - validator_address is the bech32-encoded address of the + Delegation represents the bond with tokens held by an + account. It is + + owned by one delegator, and is associated with the + voting power of one + validator. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding - took place. - completion_time: - type: string - format: date-time - description: >- - completion_time is the unix time for unbonding - completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially - scheduled to receive at completion. - balance: - type: string - description: >- - balance defines the tokens to receive at - completion. - description: >- - UnbondingDelegationEntry defines an unbonding object - with relevant metadata. - description: entries are the unbonding delegation entries. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. + + + NOTE: The amount field is an Int which implements the + custom method + + signatures required by gogoproto. description: >- - UnbondingDelegation stores all of a single delegator's - unbonding bonds + DelegationResponse is equivalent to Delegation except that + it contains a - for a single validator in an time-ordered list. + balance in addition to shares which is more suitable for + client responses. pagination: description: pagination defines the pagination in the response. type: object @@ -15328,11 +14773,9 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- - QueryUnbondingDelegatorDelegationsResponse is response type for - the - - Query/UnbondingDelegatorDelegations RPC method. + title: |- + QueryValidatorDelegationsResponse is response type for the + Query/ValidatorDelegations RPC method default: description: An unexpected error response schema: @@ -15523,8 +14966,8 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. + - name: validator_addr + description: validator_addr defines the validator address to query for. in: path required: true type: string @@ -15588,353 +15031,67 @@ paths: format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': + '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': get: - summary: |- - DelegatorValidators queries all validators info for given delegator - address. - operationId: StakingDelegatorValidators + summary: Delegation queries delegate info for given validator delegator pair. + operationId: Delegation responses: '200': description: A successful response. schema: type: object properties: - validators: - type: array - items: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed - from bonded status or not. - status: - description: >- - status is the validator status - (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: >- - description defines the description terms for the - validator. - type: object - properties: - moniker: - type: string - description: >- - moniker defines a human-readable name for the - validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for - security contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at - which this validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for - the validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission - rates to be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to - delegators, as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate - which validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily - increase of the validator commission, as a - fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared - minimum self delegation. - description: >- - Validator defines a validator, together with the total - amount of the - - Validator's bond shares and their exchange rate to coins. - Slashing results in - - a decrease in the exchange rate, allowing correct - calculation of future + delegation_response: + type: object + properties: + delegation: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + shares: + type: string + description: shares define the delegation shares received. + description: >- + Delegation represents the bond with tokens held by an + account. It is - undelegations without iterating over delegators. When coins - are delegated to + owned by one delegator, and is associated with the voting + power of one - this validator, the validator is credited with a delegation - whose number of + validator. + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + Coin defines a token with a denomination and an amount. - bond shares is based on the amount of coins delegated - divided by the current - exchange rate. Voting power can be calculated as total - bonded shares + NOTE: The amount field is an Int which implements the + custom method - multiplied by exchange rate. - description: validators defines the the validators' info of a delegator. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + signatures required by gogoproto. + description: >- + DelegationResponse is equivalent to Delegation except that it + contains a - was set, its value is undefined otherwise - description: |- - QueryDelegatorValidatorsResponse is response type for the - Query/DelegatorValidators RPC method. + balance in addition to shares which is more suitable for + client responses. + description: >- + QueryDelegationResponse is response type for the Query/Delegation + RPC method. default: description: An unexpected error response schema: @@ -16125,394 +15282,370 @@ paths: "value": "1.212s" } parameters: + - name: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string - name: delegator_addr description: delegator_addr defines the delegator address to query for. in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': + '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': get: summary: |- - DelegatorValidator queries validator info for given delegator validator + UnbondingDelegation queries unbonding info for given validator delegator pair. - operationId: DelegatorValidator + operationId: UnbondingDelegation responses: '200': description: A successful response. schema: type: object properties: - validator: + unbond: type: object properties: - operator_address: + delegator_address: type: string description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: + type: object + properties: + creation_height: + type: string + format: int64 + description: >- + creation_height is the height which the unbonding + took place. + completion_time: + type: string + format: date-time + description: >- + completion_time is the unix time for unbonding + completion. + initial_balance: + type: string + description: >- + initial_balance defines the tokens initially + scheduled to receive at completion. + balance: + type: string + description: balance defines the tokens to receive at completion. + description: >- + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's + unbonding bonds - Note: this functionality is not currently available in - the official + for a single validator in an time-ordered list. + description: >- + QueryDelegationResponse is response type for the + Query/UnbondingDelegation - protobuf release, and it is not used for type URLs - beginning with + RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - type.googleapis.com. + protocol buffer message. This string must contain at + least + one "/" character. The last segment of the URL's path + must represent - Schemes other than `http`, `https` (or the empty - scheme) might be + the fully qualified name of the type (as in - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + `path/google.protobuf.Duration`). The name should be in + a canonical form - URL that describes the type of the serialized message. + (e.g., leading "." is not accepted). - Protobuf library provides support to pack/unpack Any - values in the form + In practice, teams usually precompile into the binary + all types that they - of utility functions or additional generated methods of - the Any type. + expect it to use in the context of Any. However, for + URLs which use the + scheme `http`, `https`, or no scheme, one can optionally + set up a type - Example 1: Pack and unpack a message in C++. + server that maps type URLs to message definitions as + follows: - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - Example 2: Pack and unpack a message in Java. + * If no scheme is provided, `https` is assumed. - Foo foo = ...; - Any any = Any.pack(foo); + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values + in the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + } - Example 3: Pack and unpack a message in Python. + Example 2: Pack and unpack a message in Java. - foo = Foo(...) - any = Any() - any.Pack(foo) + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and - the unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will - yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a - custom JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded - adding a field + representation, that representation will be embedded adding + a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from - bonded status or not. - status: - description: >- - status is the validator status - (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: >- - description defines the description terms for the - validator. - type: object - properties: - moniker: - type: string - description: >- - moniker defines a human-readable name for the - validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for - security contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at - which this validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates - to be used for creating a validator. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + parameters: + - name: validator_addr + description: validator_addr defines the validator address to query for. + in: path + required: true + type: string + - name: delegator_addr + description: delegator_addr defines the delegator address to query for. + in: path + required: true + type: string + tags: + - Query + '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': + get: + summary: >- + ValidatorUnbondingDelegations queries unbonding delegations of a + validator. + operationId: ValidatorUnbondingDelegations + responses: + '200': + description: A successful response. + schema: + type: object + properties: + unbonding_responses: + type: array + items: + type: object + properties: + delegator_address: + type: string + description: >- + delegator_address is the bech32-encoded address of the + delegator. + validator_address: + type: string + description: >- + validator_address is the bech32-encoded address of the + validator. + entries: + type: array + items: type: object properties: - rate: + creation_height: type: string + format: int64 description: >- - rate is the commission rate charged to delegators, - as a fraction. - max_rate: + creation_height is the height which the unbonding + took place. + completion_time: type: string + format: date-time description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: + completion_time is the unix time for unbonding + completion. + initial_balance: type: string description: >- - max_change_rate defines the maximum daily increase - of the validator commission, as a fraction. - update_time: - type: string - format: date-time + initial_balance defines the tokens initially + scheduled to receive at completion. + balance: + type: string + description: >- + balance defines the tokens to receive at + completion. description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared - minimum self delegation. - description: >- - Validator defines a validator, together with the total amount - of the - - Validator's bond shares and their exchange rate to coins. - Slashing results in - - a decrease in the exchange rate, allowing correct calculation - of future - - undelegations without iterating over delegators. When coins - are delegated to - - this validator, the validator is credited with a delegation - whose number of + UnbondingDelegationEntry defines an unbonding object + with relevant metadata. + description: entries are the unbonding delegation entries. + description: >- + UnbondingDelegation stores all of a single delegator's + unbonding bonds - bond shares is based on the amount of coins delegated divided - by the current + for a single validator in an time-ordered list. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - exchange rate. Voting power can be calculated as total bonded - shares + was set, its value is undefined otherwise + description: >- + QueryValidatorUnbondingDelegationsResponse is response type for + the - multiplied by exchange rate. - description: |- - QueryDelegatorValidatorResponse response type for the - Query/DelegatorValidator RPC method. + Query/ValidatorUnbondingDelegations RPC method. default: description: An unexpected error response schema: @@ -16703,429 +15836,153 @@ paths: "value": "1.212s" } parameters: - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. - in: path - required: true - type: string - name: validator_addr description: validator_addr defines the validator address to query for. in: path required: true type: string - tags: - - Query - '/cosmos/staking/v1beta1/historical_info/{height}': - get: - summary: HistoricalInfo queries the historical info for given height. - operationId: HistoricalInfo - responses: - '200': - description: A successful response. - schema: - type: object - properties: - hist: - description: hist defines the historical info at the given height. - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing - a block in the blockchain, - - including all blockchain data structures and the rules - of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - title: prev block info - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - valset: - type: array - items: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the - validator's operator; bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must - contain at least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name - should be in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, - for URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message - definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup - results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently - available in the official - - protobuf release, and it is not used for type - URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of - the above specified type. - description: >- - `Any` contains an arbitrary serialized protocol - buffer message along with a - - URL that describes the type of the serialized - message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods - of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will - by default use - - 'type.googleapis.com/full.type.name' as the type URL - and the unpack - - methods only use the fully qualified type name after - the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" - will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - representation of the deserialized, embedded - message, with an + It is less efficient than using key. Only one of offset or key + should - additional field `@type` which contains the type - URL. Example: + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + a count of the total number of items available for pagination in + UIs. - If the embedded message type is well-known and has a - custom JSON + count_total is only respected when offset is used. It is ignored + when key - representation, that representation will be embedded - adding a field + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. - `value` which holds the custom JSON in addition to - the `@type` - field. Example (for message - [google.protobuf.Duration][]): + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + /cosmos/tx/v1beta1/simulate: + post: + summary: Simulate simulates executing a transaction for estimating gas usage. + operationId: Simulate + responses: + '200': + description: A successful response. + schema: + type: object + properties: + gas_info: + description: gas_info is the information about gas used in the simulation. + type: object + properties: + gas_wanted: + type: string + format: uint64 + description: >- + GasWanted is the maximum units of work we allow this tx to + perform. + gas_used: + type: string + format: uint64 + description: GasUsed is the amount of gas actually consumed. + result: + description: result is the result of the simulation. + type: object + properties: + data: + type: string + format: byte + description: >- + Data is any data returned from message or handler + execution. It MUST be - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed - from bonded status or not. - status: - description: >- - status is the validator status - (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: >- - description defines the description terms for the - validator. - type: object - properties: - moniker: - type: string - description: >- - moniker defines a human-readable name for the - validator. - identity: - type: string - description: >- - identity defines an optional identity signature - (ex. UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for - security contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height - at which this validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time - for the validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission - rates to be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to - delegators, as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate - which validator can ever charge, as a - fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily - increase of the validator commission, as a - fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate - was changed. - min_self_delegation: + length prefixed in order to separate data from multiple + message executions. + log: + type: string + description: >- + Log contains the log information from message or handler + execution. + events: + type: array + items: + type: object + properties: + type: type: string - description: >- - min_self_delegation is the validator's self declared - minimum self delegation. + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + description: >- + EventAttribute is a single key-value pair, + associated with an event. description: >- - Validator defines a validator, together with the total - amount of the - - Validator's bond shares and their exchange rate to - coins. Slashing results in - - a decrease in the exchange rate, allowing correct - calculation of future - - undelegations without iterating over delegators. When - coins are delegated to - - this validator, the validator is credited with a - delegation whose number of - - bond shares is based on the amount of coins delegated - divided by the current + Event allows application developers to attach additional + information to - exchange rate. Voting power can be calculated as total - bonded shares + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. - multiplied by exchange rate. - description: >- - QueryHistoricalInfoResponse is response type for the - Query/HistoricalInfo RPC + Later, transactions may be queried using these events. + description: >- + Events contains a slice of Event objects that were emitted + during message - method. + or handler execution. + description: |- + SimulateResponse is the response type for the + Service.SimulateRPC method. default: description: An unexpected error response schema: @@ -17316,53 +16173,22 @@ paths: "value": "1.212s" } parameters: - - name: height - description: height defines at which height to query the historical info. - in: path + - name: body + in: body required: true - type: string - format: int64 + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' tags: - - Query - /cosmos/staking/v1beta1/params: + - Service + /cosmos/tx/v1beta1/txs: get: - summary: Parameters queries the staking parameters. - operationId: StakingParams + summary: GetTxsEvent fetches txs by event. + operationId: GetTxsEvent responses: '200': description: A successful response. schema: - type: object - properties: - params: - description: params holds all the parameters of this module. - type: object - properties: - unbonding_time: - type: string - description: unbonding_time is the time duration of unbonding. - max_validators: - type: integer - format: int64 - description: max_validators is the maximum number of validators. - max_entries: - type: integer - format: int64 - description: >- - max_entries is the max entries for either unbonding - delegation or redelegation (per pair/trio). - historical_entries: - type: integer - format: int64 - description: >- - historical_entries is the number of historical entries to - persist. - bond_denom: - type: string - description: bond_denom defines the bondable coin denomination. - description: >- - QueryParamsResponse is response type for the Query/Params RPC - method. + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' default: description: An unexpected error response schema: @@ -17552,27 +16378,423 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: events + description: events is the list of transaction event type. + in: query + required: false + type: array + items: + type: string + collectionFormat: multi + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + - name: order_by + description: |2- + - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. + - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order + - ORDER_BY_DESC: ORDER_BY_DESC defines descending order + in: query + required: false + type: string + enum: + - ORDER_BY_UNSPECIFIED + - ORDER_BY_ASC + - ORDER_BY_DESC + default: ORDER_BY_UNSPECIFIED tags: - - Query - /cosmos/staking/v1beta1/pool: - get: - summary: Pool queries the pool info. - operationId: Pool + - Service + post: + summary: BroadcastTx broadcast transaction. + operationId: BroadcastTx responses: '200': description: A successful response. schema: type: object properties: - pool: - description: pool defines the pool info. + tx_response: type: object properties: - not_bonded_tokens: + height: type: string - bonded_tokens: + format: int64 + title: The block height + txhash: type: string - description: QueryPoolResponse is response type for the Query/Pool RPC method. + description: The transaction hash. + codespace: + type: string + title: Namespace for the Code + code: + type: integer + format: int64 + description: Response code. + data: + type: string + description: 'Result bytes, if any.' + raw_log: + type: string + description: >- + The output of the application's logger (raw string). May + be + + non-deterministic. + logs: + type: array + items: + type: object + properties: + msg_index: + type: integer + format: int64 + log: + type: string + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + value: + type: string + description: >- + Attribute defines an attribute wrapper where + the key and value are + + strings instead of raw bytes. + description: >- + StringEvent defines en Event object wrapper where + all the attributes + + contain key/value pairs that are strings instead + of raw bytes. + description: >- + Events contains a slice of Event objects that were + emitted during some + + execution. + description: >- + ABCIMessageLog defines a structure containing an indexed + tx ABCI message log. + description: >- + The output of the application's logger (typed). May be + non-deterministic. + info: + type: string + description: Additional information. May be non-deterministic. + gas_wanted: + type: string + format: int64 + description: Amount of gas requested for transaction. + gas_used: + type: string + format: int64 + description: Amount of gas consumed by transaction. + tx: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + timestamp: + type: string + description: >- + Time of the previous block. For heights > 1, it's the + weighted median of + + the timestamps of the valid votes in the block.LastCommit. + For height == 1, + + it's genesis time. + events: + type: array + items: + type: object + properties: + type: + type: string + attributes: + type: array + items: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + description: >- + EventAttribute is a single key-value pair, + associated with an event. + description: >- + Event allows application developers to attach additional + information to + + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx + and ResponseDeliverTx. + + Later, transactions may be queried using these events. + description: >- + Events defines all the events emitted by processing a + transaction. Note, + + these events include those emitted by processing all the + messages and those + + emitted from the ante handler. Whereas Logs contains the + events, with + + additional metadata, emitted only by processing the + messages. + + + Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. + description: |- + BroadcastTxResponse is the response type for the + Service.BroadcastTx method. default: description: An unexpected error response schema: @@ -17762,355 +16984,54 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: body + in: body + required: true + schema: + type: object + properties: + tx_bytes: + type: string + format: byte + description: tx_bytes is the raw transaction. + mode: + type: string + enum: + - BROADCAST_MODE_UNSPECIFIED + - BROADCAST_MODE_BLOCK + - BROADCAST_MODE_SYNC + - BROADCAST_MODE_ASYNC + default: BROADCAST_MODE_UNSPECIFIED + description: >- + BroadcastMode specifies the broadcast mode for the + TxService.Broadcast RPC method. + + - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering + - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, + - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for + a CheckTx execution response only. + - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns + immediately. + description: >- + BroadcastTxRequest is the request type for the + Service.BroadcastTxRequest + + RPC method. tags: - - Query - /cosmos/staking/v1beta1/validators: + - Service + '/cosmos/tx/v1beta1/txs/block/{height}': get: - summary: Validators queries all validators that match the given status. - operationId: Validators + summary: GetBlockWithTxs fetches a block with decoded txs. + description: 'Since: cosmos-sdk 0.45.2' + operationId: GetBlockWithTxs responses: '200': description: A successful response. - schema: - type: object - properties: - validators: - type: array - items: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed - from bonded status or not. - status: - description: >- - status is the validator status - (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: >- - description defines the description terms for the - validator. - type: object - properties: - moniker: - type: string - description: >- - moniker defines a human-readable name for the - validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for - security contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at - which this validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for - the validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission - rates to be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to - delegators, as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate - which validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily - increase of the validator commission, as a - fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared - minimum self delegation. - description: >- - Validator defines a validator, together with the total - amount of the - - Validator's bond shares and their exchange rate to coins. - Slashing results in - - a decrease in the exchange rate, allowing correct - calculation of future - - undelegations without iterating over delegators. When coins - are delegated to - - this validator, the validator is credited with a delegation - whose number of - - bond shares is based on the amount of coins delegated - divided by the current - - exchange rate. Voting power can be calculated as total - bonded shares - - multiplied by exchange rate. - description: validators contains all the queried validators. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - title: >- - QueryValidatorsResponse is response type for the Query/Validators - RPC method - default: - description: An unexpected error response + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' + default: + description: An unexpected error response schema: type: object properties: @@ -18299,11 +17220,12 @@ paths: "value": "1.212s" } parameters: - - name: status - description: status enables to query for validators matching a given status. - in: query - required: false + - name: height + description: height is the height of the block to query. + in: path + required: true type: string + format: int64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -18363,434 +17285,122 @@ paths: type: boolean format: boolean tags: - - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}': + - Service + '/cosmos/tx/v1beta1/txs/{hash}': get: - summary: Validator queries validator info for given validator address. - operationId: Validator + summary: GetTx fetches a tx by hash. + operationId: GetTx responses: '200': description: A successful response. + schema: + $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' + default: + description: An unexpected error response schema: type: object properties: - validator: - type: object - properties: - operator_address: - type: string - description: >- - operator_address defines the address of the validator's - operator; bech encoded in JSON. - consensus_pubkey: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be - in a canonical form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the binary + all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can - optionally set up a type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty - scheme) might be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any - values in the form + Protobuf library provides support to pack/unpack Any values + in the form - of utility functions or additional generated methods of - the Any type. + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. + } - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - jailed: - type: boolean - format: boolean - description: >- - jailed defined whether the validator has been jailed from - bonded status or not. - status: - description: >- - status is the validator status - (bonded/unbonding/unbonded). - type: string - enum: - - BOND_STATUS_UNSPECIFIED - - BOND_STATUS_UNBONDED - - BOND_STATUS_UNBONDING - - BOND_STATUS_BONDED - default: BOND_STATUS_UNSPECIFIED - tokens: - type: string - description: >- - tokens define the delegated tokens (incl. - self-delegation). - delegator_shares: - type: string - description: >- - delegator_shares defines total shares issued to a - validator's delegators. - description: - description: >- - description defines the description terms for the - validator. - type: object - properties: - moniker: - type: string - description: >- - moniker defines a human-readable name for the - validator. - identity: - type: string - description: >- - identity defines an optional identity signature (ex. - UPort or Keybase). - website: - type: string - description: website defines an optional website link. - security_contact: - type: string - description: >- - security_contact defines an optional email for - security contact. - details: - type: string - description: details define other optional details. - unbonding_height: - type: string - format: int64 - description: >- - unbonding_height defines, if unbonding, the height at - which this validator has begun unbonding. - unbonding_time: - type: string - format: date-time - description: >- - unbonding_time defines, if unbonding, the min time for the - validator to complete unbonding. - commission: - description: commission defines the commission parameters. - type: object - properties: - commission_rates: - description: >- - commission_rates defines the initial commission rates - to be used for creating a validator. - type: object - properties: - rate: - type: string - description: >- - rate is the commission rate charged to delegators, - as a fraction. - max_rate: - type: string - description: >- - max_rate defines the maximum commission rate which - validator can ever charge, as a fraction. - max_change_rate: - type: string - description: >- - max_change_rate defines the maximum daily increase - of the validator commission, as a fraction. - update_time: - type: string - format: date-time - description: >- - update_time is the last time the commission rate was - changed. - min_self_delegation: - type: string - description: >- - min_self_delegation is the validator's self declared - minimum self delegation. - description: >- - Validator defines a validator, together with the total amount - of the - - Validator's bond shares and their exchange rate to coins. - Slashing results in - - a decrease in the exchange rate, allowing correct calculation - of future - - undelegations without iterating over delegators. When coins - are delegated to - - this validator, the validator is credited with a delegation - whose number of - - bond shares is based on the amount of coins delegated divided - by the current - - exchange rate. Voting power can be calculated as total bonded - shares - - multiplied by exchange rate. - title: >- - QueryValidatorResponse is response type for the Query/Validator - RPC method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. Foo foo = ...; Any any = Any.pack(foo); @@ -18875,94 +17485,32 @@ paths: "value": "1.212s" } parameters: - - name: validator_addr - description: validator_addr defines the validator address to query for. + - name: hash + description: 'hash is the tx hash to query, encoded as a hex string.' in: path required: true type: string tags: - - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': + - Service + '/cosmos/upgrade/v1beta1/applied_plan/{name}': get: - summary: ValidatorDelegations queries delegate info for given validator. - operationId: ValidatorDelegations + summary: AppliedPlan queries a previously applied upgrade plan by its name. + operationId: AppliedPlan responses: '200': description: A successful response. schema: type: object properties: - delegation_responses: - type: array - items: - type: object - properties: - delegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of - the delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of - the validator. - shares: - type: string - description: shares define the delegation shares received. - description: >- - Delegation represents the bond with tokens held by an - account. It is - - owned by one delegator, and is associated with the - voting power of one - - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. - - - NOTE: The amount field is an Int which implements the - custom method - - signatures required by gogoproto. - description: >- - DelegationResponse is equivalent to Delegation except that - it contains a - - balance in addition to shares which is more suitable for - client responses. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + height: + type: string + format: int64 + description: height is the block height at which the plan was applied. + description: >- + QueryAppliedPlanResponse is the response type for the + Query/AppliedPlan RPC - was set, its value is undefined otherwise - title: |- - QueryValidatorDelegationsResponse is response type for the - Query/ValidatorDelegations RPC method + method. default: description: An unexpected error response schema: @@ -19153,132 +17701,253 @@ paths: "value": "1.212s" } parameters: - - name: validator_addr - description: validator_addr defines the validator address to query for. + - name: name + description: name is the name of the applied plan to query for. in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': + /cosmos/upgrade/v1beta1/current_plan: get: - summary: Delegation queries delegate info for given validator delegator pair. - operationId: Delegation + summary: CurrentPlan queries the current upgrade plan. + operationId: CurrentPlan responses: '200': description: A successful response. schema: type: object properties: - delegation_response: + plan: + description: plan is the current upgrade plan. type: object properties: - delegation: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - shares: - type: string - description: shares define the delegation shares received. + name: + type: string description: >- - Delegation represents the bond with tokens held by an - account. It is + Sets the name for the upgrade. This name will be used by + the upgraded - owned by one delegator, and is associated with the voting - power of one + version of the software to apply any special "on-upgrade" + commands during - validator. - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - Coin defines a token with a denomination and an amount. + the first BeginBlock method after the upgrade is applied. + It is also used + to detect whether a software version can handle a given + upgrade. If no - NOTE: The amount field is an Int which implements the - custom method + upgrade handler with this name has been set in the + software, it will be - signatures required by gogoproto. - description: >- - DelegationResponse is equivalent to Delegation except that it - contains a + assumed that the software is out-of-date when the upgrade + Time or Height is - balance in addition to shares which is more suitable for - client responses. + reached and the software will exit. + time: + type: string + format: date-time + description: >- + Deprecated: Time based upgrades have been deprecated. Time + based upgrade logic + + has been removed from the SDK. + + If this field is not empty, an error will be thrown. + height: + type: string + format: int64 + description: |- + The height at which the upgrade must be performed. + Only used if Time is not set. + info: + type: string + title: >- + Any application specific upgrade info to be included + on-chain + + such as a git commit that validators could automatically + upgrade to + upgraded_client_state: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with + an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- - QueryDelegationResponse is response type for the Query/Delegation - RPC method. + QueryCurrentPlanResponse is the response type for the + Query/CurrentPlan RPC + + method. default: description: An unexpected error response schema: @@ -19468,83 +18137,46 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: validator_addr - description: validator_addr defines the validator address to query for. - in: path - required: true - type: string - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. - in: path - required: true - type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': + /cosmos/upgrade/v1beta1/module_versions: get: - summary: |- - UnbondingDelegation queries unbonding info for given validator delegator - pair. - operationId: UnbondingDelegation + summary: ModuleVersions queries the list of module versions from state. + description: 'Since: cosmos-sdk 0.43' + operationId: ModuleVersions responses: '200': description: A successful response. schema: type: object properties: - unbond: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding - took place. - completion_time: - type: string - format: date-time - description: >- - completion_time is the unix time for unbonding - completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially - scheduled to receive at completion. - balance: - type: string - description: balance defines the tokens to receive at completion. - description: >- - UnbondingDelegationEntry defines an unbonding object - with relevant metadata. - description: entries are the unbonding delegation entries. - description: >- - UnbondingDelegation stores all of a single delegator's - unbonding bonds + module_versions: + type: array + items: + type: object + properties: + name: + type: string + title: name of the app module + version: + type: string + format: uint64 + title: consensus version of the app module + description: |- + ModuleVersion specifies a module and its consensus version. - for a single validator in an time-ordered list. + Since: cosmos-sdk 0.43 + description: >- + module_versions is a list of module names with their consensus + versions. description: >- - QueryDelegationResponse is response type for the - Query/UnbondingDelegation + QueryModuleVersionsResponse is the response type for the + Query/ModuleVersions RPC method. + + + Since: cosmos-sdk 0.43 default: description: An unexpected error response schema: @@ -19735,104 +18367,46 @@ paths: "value": "1.212s" } parameters: - - name: validator_addr - description: validator_addr defines the validator address to query for. - in: path - required: true - type: string - - name: delegator_addr - description: delegator_addr defines the delegator address to query for. - in: path - required: true + - name: module_name + description: |- + module_name is a field to query a specific module + consensus version from state. Leaving this empty will + fetch the full list of module versions from state. + in: query + required: false type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': + '/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}': get: summary: >- - ValidatorUnbondingDelegations queries unbonding delegations of a - validator. - operationId: ValidatorUnbondingDelegations + UpgradedConsensusState queries the consensus state that will serve + + as a trusted kernel for the next version of this chain. It will only be + + stored at the last height of this chain. + + UpgradedConsensusState RPC not supported with legacy querier + + This rpc is deprecated now that IBC has its own replacement + + (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) + operationId: UpgradedConsensusState responses: '200': description: A successful response. schema: type: object properties: - unbonding_responses: - type: array - items: - type: object - properties: - delegator_address: - type: string - description: >- - delegator_address is the bech32-encoded address of the - delegator. - validator_address: - type: string - description: >- - validator_address is the bech32-encoded address of the - validator. - entries: - type: array - items: - type: object - properties: - creation_height: - type: string - format: int64 - description: >- - creation_height is the height which the unbonding - took place. - completion_time: - type: string - format: date-time - description: >- - completion_time is the unix time for unbonding - completion. - initial_balance: - type: string - description: >- - initial_balance defines the tokens initially - scheduled to receive at completion. - balance: - type: string - description: >- - balance defines the tokens to receive at - completion. - description: >- - UnbondingDelegationEntry defines an unbonding object - with relevant metadata. - description: entries are the unbonding delegation entries. - description: >- - UnbondingDelegation stores all of a single delegator's - unbonding bonds - - for a single validator in an time-ordered list. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + upgraded_consensus_state: + type: string + format: byte + title: 'Since: cosmos-sdk 0.43' description: >- - QueryValidatorUnbondingDelegationsResponse is response type for - the + QueryUpgradedConsensusStateResponse is the response type for the + Query/UpgradedConsensusState - Query/ValidatorUnbondingDelegations RPC method. + RPC method. default: description: An unexpected error response schema: @@ -20023,359 +18597,238 @@ paths: "value": "1.212s" } parameters: - - name: validator_addr - description: validator_addr defines the validator address to query for. + - name: last_height + description: |- + last height of the current chain must be sent in request + as this is the height under which next consensus state is stored in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean + format: int64 tags: - Query - /cosmos/tx/v1beta1/simulate: - post: - summary: Simulate simulates executing a transaction for estimating gas usage. - operationId: Simulate + /cosmos/authz/v1beta1/grants: + get: + summary: 'Returns list of `Authorization`, granted to the grantee by the granter.' + operationId: Grants responses: '200': description: A successful response. schema: type: object properties: - gas_info: - description: gas_info is the information about gas used in the simulation. - type: object - properties: - gas_wanted: - type: string - format: uint64 - description: >- - GasWanted is the maximum units of work we allow this tx to - perform. - gas_used: - type: string - format: uint64 - description: GasUsed is the amount of gas actually consumed. - result: - description: result is the result of the simulation. - type: object - properties: - data: - type: string - format: byte - description: >- - Data is any data returned from message or handler - execution. It MUST be - - length prefixed in order to separate data from multiple - message executions. - log: - type: string - description: >- - Log contains the log information from message or handler - execution. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, - associated with an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. - - Later, transactions may be queried using these events. - description: >- - Events contains a slice of Event objects that were emitted - during message - - or handler execution. - description: |- - SimulateResponse is the response type for the - Service.SimulateRPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: + grants: type: array items: type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + authorization: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's + path must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be + in a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the + binary all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can + optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available + in the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty + scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any values - in the form + Protobuf library provides support to pack/unpack Any + values in the form - of utility functions or additional generated methods of the - Any type. + of utility functions or additional generated methods of + the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the regular + The JSON representation of an `Any` value uses the + regular - representation of the deserialized, embedded message, with - an + representation of the deserialized, embedded message, + with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a custom - JSON + If the embedded message type is well-known and has a + custom JSON - representation, that representation will be embedded adding - a field + representation, that representation will be embedded + adding a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message [google.protobuf.Duration][]): + field. Example (for message + [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: body - in: body - required: true - schema: - $ref: '#/definitions/cosmos.tx.v1beta1.SimulateRequest' - tags: - - Service - /cosmos/tx/v1beta1/txs: - get: - summary: GetTxsEvent fetches txs by event. - operationId: GetTxsEvent - responses: - '200': - description: A successful response. - schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetTxsEventResponse' + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + description: |- + Grant gives permissions to execute + the provide method with expiration time. + description: >- + authorizations is a list of grants granted for grantee by + granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGrantsResponse is the response type for the + Query/Authorizations RPC method. default: description: An unexpected error response schema: @@ -20566,14 +19019,21 @@ paths: "value": "1.212s" } parameters: - - name: events - description: events is the list of transaction event type. + - name: granter in: query required: false - type: array - items: - type: string - collectionFormat: multi + type: string + - name: grantee + in: query + required: false + type: string + - name: msg_type_url + description: >- + Optional, msg_type_url, when set, will query only grants matching + given msg type. + in: query + required: false + type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -20632,356 +19092,236 @@ paths: required: false type: boolean format: boolean - - name: order_by - description: |2- - - ORDER_BY_UNSPECIFIED: ORDER_BY_UNSPECIFIED specifies an unknown sorting order. OrderBy defaults to ASC in this case. - - ORDER_BY_ASC: ORDER_BY_ASC defines ascending order - - ORDER_BY_DESC: ORDER_BY_DESC defines descending order - in: query - required: false - type: string - enum: - - ORDER_BY_UNSPECIFIED - - ORDER_BY_ASC - - ORDER_BY_DESC - default: ORDER_BY_UNSPECIFIED tags: - - Service - post: - summary: BroadcastTx broadcast transaction. - operationId: BroadcastTx + - Query + '/cosmos/authz/v1beta1/grants/grantee/{grantee}': + get: + summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. + description: 'Since: cosmos-sdk 0.45.2' + operationId: GranteeGrants responses: '200': description: A successful response. schema: type: object properties: - tx_response: - type: object - properties: - height: - type: string - format: int64 - title: The block height - txhash: - type: string - description: The transaction hash. - codespace: - type: string - title: Namespace for the Code - code: - type: integer - format: int64 - description: Response code. - data: - type: string - description: 'Result bytes, if any.' - raw_log: - type: string - description: >- - The output of the application's logger (raw string). May - be - - non-deterministic. - logs: - type: array - items: + grants: + type: array + items: + type: object + properties: + granter: + type: string + grantee: + type: string + authorization: type: object properties: - msg_index: - type: integer - format: int64 - log: + type_url: type: string - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - value: - type: string - description: >- - Attribute defines an attribute wrapper where - the key and value are - - strings instead of raw bytes. - description: >- - StringEvent defines en Event object wrapper where - all the attributes - - contain key/value pairs that are strings instead - of raw bytes. description: >- - Events contains a slice of Event objects that were - emitted during some + A URL/resource name that uniquely identifies the + type of the serialized - execution. - description: >- - ABCIMessageLog defines a structure containing an indexed - tx ABCI message log. - description: >- - The output of the application's logger (typed). May be - non-deterministic. - info: - type: string - description: Additional information. May be non-deterministic. - gas_wanted: - type: string - format: int64 - description: Amount of gas requested for transaction. - gas_used: - type: string - format: int64 - description: Amount of gas consumed by transaction. - tx: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized + protocol buffer message. This string must contain at + least - protocol buffer message. This string must contain at - least + one "/" character. The last segment of the URL's + path must represent - one "/" character. The last segment of the URL's path - must represent + the fully qualified name of the type (as in - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form + `path/google.protobuf.Duration`). The name should be + in a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the + binary all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can - optionally set up a type + scheme `http`, `https`, or no scheme, one can + optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available + in the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty - scheme) might be + Schemes other than `http`, `https` (or the empty + scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any - values in the form + Protobuf library provides support to pack/unpack Any + values in the form - of utility functions or additional generated methods of - the Any type. + of utility functions or additional generated methods of + the Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { + Foo foo = ...; + Any any; + any.PackFrom(foo); ... - } + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + foo = Foo(...) + any = Any() + any.Pack(foo) ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - ==== + The pack methods provided by protobuf library will by + default use - The JSON representation of an `Any` value uses the regular + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - representation of the deserialized, embedded message, with - an + methods only use the fully qualified type name after the + last '/' - additional field `@type` which contains the type URL. - Example: + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + name "y.z". - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - If the embedded message type is well-known and has a - custom JSON - representation, that representation will be embedded - adding a field + JSON - `value` which holds the custom JSON in addition to the - `@type` + ==== - field. Example (for message [google.protobuf.Duration][]): + The JSON representation of an `Any` value uses the + regular - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - timestamp: - type: string - description: >- - Time of the previous block. For heights > 1, it's the - weighted median of + representation of the deserialized, embedded message, + with an - the timestamps of the valid votes in the block.LastCommit. - For height == 1, + additional field `@type` which contains the type URL. + Example: - it's genesis time. - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, - associated with an event. - description: >- - Event allows application developers to attach additional - information to + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx - and ResponseDeliverTx. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Later, transactions may be queried using these events. - description: >- - Events defines all the events emitted by processing a - transaction. Note, + If the embedded message type is well-known and has a + custom JSON - these events include those emitted by processing all the - messages and those + representation, that representation will be embedded + adding a field - emitted from the ante handler. Whereas Logs contains the - events, with + `value` which holds the custom JSON in addition to the + `@type` - additional metadata, emitted only by processing the - messages. + field. Example (for message + [google.protobuf.Duration][]): + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + description: 'Since: cosmos-sdk 0.45.2' + title: >- + GrantAuthorization extends a grant with both the addresses + of the grantee and granter. - Since: cosmos-sdk 0.42.11, 0.44.5, 0.45 - description: >- - TxResponse defines a structure containing relevant tx data and - metadata. The + It is used in genesis.proto and query.proto + description: grants is a list of grants granted to the grantee. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - tags are stringified and the log is JSON decoded. - description: |- - BroadcastTxResponse is the response type for the - Service.BroadcastTx method. + was set, its value is undefined otherwise + description: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. default: description: An unexpected error response schema: @@ -21172,328 +19512,298 @@ paths: "value": "1.212s" } parameters: - - name: body - in: body + - name: grantee + in: path required: true - schema: - type: object - properties: - tx_bytes: - type: string - format: byte - description: tx_bytes is the raw transaction. - mode: - type: string - enum: - - BROADCAST_MODE_UNSPECIFIED - - BROADCAST_MODE_BLOCK - - BROADCAST_MODE_SYNC - - BROADCAST_MODE_ASYNC - default: BROADCAST_MODE_UNSPECIFIED - description: >- - BroadcastMode specifies the broadcast mode for the - TxService.Broadcast RPC method. + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - - BROADCAST_MODE_UNSPECIFIED: zero-value for mode ordering - - BROADCAST_MODE_BLOCK: DEPRECATED: use BROADCAST_MODE_SYNC instead, - - BROADCAST_MODE_SYNC: BROADCAST_MODE_SYNC defines a tx broadcasting mode where the client waits for - a CheckTx execution response only. - - BROADCAST_MODE_ASYNC: BROADCAST_MODE_ASYNC defines a tx broadcasting mode where the client returns - immediately. - description: >- - BroadcastTxRequest is the request type for the - Service.BroadcastTxRequest + It is less efficient than using key. Only one of offset or key + should - RPC method. - tags: - - Service - '/cosmos/tx/v1beta1/txs/block/{height}': - get: - summary: GetBlockWithTxs fetches a block with decoded txs. - description: >- - Since: cosmos-sdk 0.45.2 + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. - WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the - result converted from Ostracon block type + count_total is only respected when offset is used. It is ignored + when key - to tendermint block type without `entropy` is returned. + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. - Therefore, verification fails with the tendermint block validation - method. - For original information, please check `GetBlockWithTxs` in - `lbm/tx/v1beta1/service.proto`. - operationId: GetBlockWithTxs + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/cosmos/authz/v1beta1/grants/granter/{granter}': + get: + summary: 'GranterGrants returns list of `GrantAuthorization`, granted by granter.' + description: 'Since: cosmos-sdk 0.45.2' + operationId: GranterGrants responses: '200': description: A successful response. - schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetBlockWithTxsResponse' - default: - description: An unexpected error response schema: type: object properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: + grants: type: array items: type: object properties: - type_url: + granter: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + grantee: + type: string + authorization: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's path - must represent + one "/" character. The last segment of the URL's + path must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be in - a canonical form + `path/google.protobuf.Duration`). The name should be + in a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the binary - all types that they + In practice, teams usually precompile into the + binary all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can optionally - set up a type + scheme `http`, `https`, or no scheme, one can + optionally set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available in - the official + Note: this functionality is not currently available + in the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty scheme) - might be + Schemes other than `http`, `https` (or the empty + scheme) might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + URL that describes the type of the serialized message. - Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Protobuf library provides support to pack/unpack Any + values in the form - Example 3: Pack and unpack a message in Python. + of utility functions or additional generated methods of + the Any type. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - Example 4: Pack and unpack a message in Go + Example 1: Pack and unpack a message in C++. - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - The pack methods provided by protobuf library will by - default use + Example 2: Pack and unpack a message in Java. - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - methods only use the fully qualified type name after the - last '/' + Example 3: Pack and unpack a message in Python. - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - name "y.z". + Example 4: Pack and unpack a message in Go + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + The pack methods provided by protobuf library will by + default use - JSON + 'type.googleapis.com/full.type.name' as the type URL and + the unpack - ==== + methods only use the fully qualified type name after the + last '/' - The JSON representation of an `Any` value uses the regular + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - representation of the deserialized, embedded message, with - an + name "y.z". - additional field `@type` which contains the type URL. - Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + JSON - If the embedded message type is well-known and has a custom - JSON + ==== - representation, that representation will be embedded adding - a field + The JSON representation of an `Any` value uses the + regular - `value` which holds the custom JSON in addition to the - `@type` + representation of the deserialized, embedded message, + with an - field. Example (for message [google.protobuf.Duration][]): + additional field `@type` which contains the type URL. + Example: - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: height - description: height is the height of the block to query. - in: path - required: true - type: string - format: int64 - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - It is less efficient than using key. Only one of offset or key - should + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. + If the embedded message type is well-known and has a + custom JSON - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include + representation, that representation will be embedded + adding a field - a count of the total number of items available for pagination in - UIs. + `value` which holds the custom JSON in addition to the + `@type` - count_total is only respected when offset is used. It is ignored - when key + field. Example (for message + [google.protobuf.Duration][]): - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + expiration: + type: string + format: date-time + description: 'Since: cosmos-sdk 0.45.2' + title: >- + GrantAuthorization extends a grant with both the addresses + of the grantee and granter. + It is used in genesis.proto and query.proto + description: grants is a list of grants granted by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean - tags: - - Service - '/cosmos/tx/v1beta1/txs/{hash}': - get: - summary: GetTx fetches a tx by hash. - operationId: GetTx - responses: - '200': - description: A successful response. - schema: - $ref: '#/definitions/cosmos.tx.v1beta1.GetTxResponse' + was set, its value is undefined otherwise + description: >- + QueryGranterGrantsResponse is the response type for the + Query/GranterGrants RPC method. default: description: An unexpected error response schema: @@ -21684,32 +19994,120 @@ paths: "value": "1.212s" } parameters: - - name: hash - description: 'hash is the tx hash to query, encoded as a hex string.' + - name: granter in: path required: true type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - - Service - '/cosmos/upgrade/v1beta1/applied_plan/{name}': + - Query + /lbm/foundation/v1/censorships: get: - summary: AppliedPlan queries a previously applied upgrade plan by its name. - operationId: AppliedPlan + summary: Censorships queries the censorship informations. + operationId: Censorships responses: '200': description: A successful response. schema: type: object properties: - height: - type: string - format: int64 - description: height is the block height at which the plan was applied. - description: >- - QueryAppliedPlanResponse is the response type for the - Query/AppliedPlan RPC + censorships: + type: array + items: + type: object + properties: + msg_type_url: + type: string + authority: + type: string + enum: + - CENSORSHIP_AUTHORITY_UNSPECIFIED + - CENSORSHIP_AUTHORITY_GOVERNANCE + - CENSORSHIP_AUTHORITY_FOUNDATION + default: CENSORSHIP_AUTHORITY_UNSPECIFIED + description: |2- + - CENSORSHIP_AUTHORITY_UNSPECIFIED: CENSORSHIP_AUTHORITY_UNSPECIFIED defines an invalid authority. + - CENSORSHIP_AUTHORITY_GOVERNANCE: CENSORSHIP_AUTHORITY_GOVERNANCE defines x/gov authority. + - CENSORSHIP_AUTHORITY_FOUNDATION: CENSORSHIP_AUTHORITY_FOUNDATION defines x/foundation authority. + description: authorizations is a list of grants granted for grantee. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - method. + was set, its value is undefined otherwise + description: >- + QueryCensorshipsResponse is the response type for the + Query/Censorships RPC method. default: description: An unexpected error response schema: @@ -21900,74 +20298,98 @@ paths: "value": "1.212s" } parameters: - - name: name - description: name is the name of the applied plan to query for. - in: path - required: true + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - /cosmos/upgrade/v1beta1/current_plan: + /lbm/foundation/v1/foundation_info: get: - summary: CurrentPlan queries the current upgrade plan. - operationId: CurrentPlan + summary: FoundationInfo queries foundation info. + operationId: FoundationInfo responses: '200': description: A successful response. schema: type: object properties: - plan: - description: plan is the current upgrade plan. + info: + description: info is the FoundationInfo for the foundation. type: object properties: - name: + version: type: string - description: >- - Sets the name for the upgrade. This name will be used by - the upgraded - - version of the software to apply any special "on-upgrade" - commands during - - the first BeginBlock method after the upgrade is applied. - It is also used - - to detect whether a software version can handle a given - upgrade. If no - - upgrade handler with this name has been set in the - software, it will be - - assumed that the software is out-of-date when the upgrade - Time or Height is + format: uint64 + title: >- + version is used to track changes to the foundation's + membership structure that - reached and the software will exit. - time: - type: string - format: date-time - description: >- - Deprecated: Time based upgrades have been deprecated. Time - based upgrade logic + would break existing proposals. Whenever any member is + added or removed, - has been removed from the SDK. + this version is incremented and will cause proposals based + on older versions - If this field is not empty, an error will be thrown. - height: - type: string - format: int64 - description: |- - The height at which the upgrade must be performed. - Only used if Time is not set. - info: + of the foundation to fail + total_weight: type: string - title: >- - Any application specific upgrade info to be included - on-chain - - such as a git commit that validators could automatically - upgrade to - upgraded_client_state: + description: total_weight is the number of the foundation members. + decision_policy: type: object properties: type_url: @@ -22143,10 +20565,8 @@ paths: "value": "1.212s" } description: >- - QueryCurrentPlanResponse is the response type for the - Query/CurrentPlan RPC - - method. + QueryFoundationInfoResponse is the Query/FoundationInfo response + type. default: description: An unexpected error response schema: @@ -22338,44 +20758,58 @@ paths: } tags: - Query - /cosmos/upgrade/v1beta1/module_versions: + /lbm/foundation/v1/foundation_members: get: - summary: ModuleVersions queries the list of module versions from state. - description: 'Since: cosmos-sdk 0.43' - operationId: ModuleVersions + summary: Members queries members of the foundation + operationId: Members responses: '200': description: A successful response. schema: type: object properties: - module_versions: + members: type: array items: type: object properties: - name: + address: type: string - title: name of the app module - version: + description: address is the member's account address. + metadata: type: string - format: uint64 - title: consensus version of the app module - description: |- - ModuleVersion specifies a module and its consensus version. - - Since: cosmos-sdk 0.43 - description: >- - module_versions is a list of module names with their consensus - versions. - description: >- - QueryModuleVersionsResponse is the response type for the - Query/ModuleVersions - - RPC method. - + description: >- + metadata is any arbitrary metadata to attached to the + member. + added_at: + type: string + format: date-time + description: >- + added_at is a timestamp specifying when a member was + added. + description: >- + Member represents a foundation member with an account + address and metadata. + description: members are the members of the foundation. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - Since: cosmos-sdk 0.43 + was set, its value is undefined otherwise + description: QueryMembersResponse is the Query/MembersResponse response type. default: description: An unexpected error response schema: @@ -22566,46 +21000,97 @@ paths: "value": "1.212s" } parameters: - - name: module_name + - name: pagination.key description: |- - module_name is a field to query a specific module - consensus version from state. Leaving this empty will - fetch the full list of module versions from state. + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. in: query required: false type: string - tags: - - Query - '/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}': - get: - summary: >- - UpgradedConsensusState queries the consensus state that will serve + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. - as a trusted kernel for the next version of this chain. It will only be + It is less efficient than using key. Only one of offset or key + should - stored at the last height of this chain. + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. - UpgradedConsensusState RPC not supported with legacy querier + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include - This rpc is deprecated now that IBC has its own replacement + a count of the total number of items available for pagination in + UIs. - (https://github.com/cosmos/ibc-go/blob/2c880a22e9f9cc75f62b527ca94aa75ce1106001/proto/ibc/core/client/v1/query.proto#L54) - operationId: UpgradedConsensusState + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/lbm/foundation/v1/foundation_members/{address}': + get: + summary: Member queries a member of the foundation + operationId: Member responses: '200': description: A successful response. schema: type: object properties: - upgraded_consensus_state: - type: string - format: byte - title: 'Since: cosmos-sdk 0.43' - description: >- - QueryUpgradedConsensusStateResponse is the response type for the - Query/UpgradedConsensusState - - RPC method. + member: + type: object + properties: + address: + type: string + description: address is the member's account address. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + member. + added_at: + type: string + format: date-time + description: >- + added_at is a timestamp specifying when a member was + added. + description: >- + Member represents a foundation member with an account address + and metadata. + description: QueryMemberResponse is the Query/MemberResponse response type. default: description: An unexpected error response schema: @@ -22796,219 +21281,202 @@ paths: "value": "1.212s" } parameters: - - name: last_height - description: |- - last height of the current chain must be sent in request - as this is the height under which next consensus state is stored + - name: address in: path required: true type: string - format: int64 tags: - Query - /cosmos/authz/v1beta1/grants: + '/lbm/foundation/v1/grants/{grantee}/{msg_type_url}': get: - summary: 'Returns list of `Authorization`, granted to the grantee by the granter.' - operationId: Grants + summary: 'Returns list of authorizations, granted to the grantee.' + operationId: FoundationGrants responses: '200': description: A successful response. schema: type: object properties: - grants: + authorizations: type: array items: type: object properties: - authorization: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized - protocol buffer message. This string must contain at - least + protocol buffer message. This string must contain at + least - one "/" character. The last segment of the URL's - path must represent + one "/" character. The last segment of the URL's path + must represent - the fully qualified name of the type (as in + the fully qualified name of the type (as in - `path/google.protobuf.Duration`). The name should be - in a canonical form + `path/google.protobuf.Duration`). The name should be in + a canonical form - (e.g., leading "." is not accepted). + (e.g., leading "." is not accepted). - In practice, teams usually precompile into the - binary all types that they + In practice, teams usually precompile into the binary + all types that they - expect it to use in the context of Any. However, for - URLs which use the + expect it to use in the context of Any. However, for + URLs which use the - scheme `http`, `https`, or no scheme, one can - optionally set up a type + scheme `http`, `https`, or no scheme, one can optionally + set up a type - server that maps type URLs to message definitions as - follows: + server that maps type URLs to message definitions as + follows: - * If no scheme is provided, `https` is assumed. + * If no scheme is provided, `https` is assumed. - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Note: this functionality is not currently available - in the official + Note: this functionality is not currently available in + the official - protobuf release, and it is not used for type URLs - beginning with + protobuf release, and it is not used for type URLs + beginning with - type.googleapis.com. + type.googleapis.com. - Schemes other than `http`, `https` (or the empty - scheme) might be + Schemes other than `http`, `https` (or the empty scheme) + might be - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. + used with implementation specific semantics. + value: + type: string + format: byte description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a - URL that describes the type of the serialized message. + URL that describes the type of the serialized message. - Protobuf library provides support to pack/unpack Any - values in the form + Protobuf library provides support to pack/unpack Any values + in the form - of utility functions or additional generated methods of - the Any type. + of utility functions or additional generated methods of the + Any type. - Example 1: Pack and unpack a message in C++. + Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Example 2: Pack and unpack a message in Java. + Example 2: Pack and unpack a message in Java. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - Example 3: Pack and unpack a message in Python. + Example 3: Pack and unpack a message in Python. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - Example 4: Pack and unpack a message in Go + Example 4: Pack and unpack a message in Go - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and - the unpack + 'type.googleapis.com/full.type.name' as the type URL and the + unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after the + last '/' - in the type URL, for example "foo.bar.com/x/y.z" will - yield type + in the type URL, for example "foo.bar.com/x/y.z" will yield + type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the - regular + The JSON representation of an `Any` value uses the regular - representation of the deserialized, embedded message, - with an + representation of the deserialized, embedded message, with + an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a - custom JSON + If the embedded message type is well-known and has a custom + JSON - representation, that representation will be embedded - adding a field + representation, that representation will be embedded adding + a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message - [google.protobuf.Duration][]): + field. Example (for message [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - description: |- - Grant gives permissions to execute - the provide method with expiration time. - description: >- - authorizations is a list of grants granted for grantee by - granter. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: authorizations is a list of grants granted for grantee. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -23026,8 +21494,8 @@ paths: was set, its value is undefined otherwise description: >- - QueryGrantsResponse is the response type for the - Query/Authorizations RPC method. + QueryGrantsResponse is the response type for the Query/Grants RPC + method. default: description: An unexpected error response schema: @@ -23218,20 +21686,16 @@ paths: "value": "1.212s" } parameters: - - name: granter - in: query - required: false - type: string - name: grantee - in: query - required: false + in: path + required: true type: string - name: msg_type_url description: >- Optional, msg_type_url, when set, will query only grants matching given msg type. - in: query - required: false + in: path + required: true type: string - name: pagination.key description: |- @@ -23293,234 +21757,25 @@ paths: format: boolean tags: - Query - '/cosmos/authz/v1beta1/grants/grantee/{grantee}': + /lbm/foundation/v1/params: get: - summary: GranteeGrants returns a list of `GrantAuthorization` by grantee. - description: 'Since: cosmos-sdk 0.45.2' - operationId: GranteeGrants + summary: Params queries the module params. + operationId: FoundationParams responses: '200': description: A successful response. schema: type: object properties: - grants: - type: array - items: - type: object - properties: - granter: - type: string - grantee: - type: string - authorization: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - description: 'Since: cosmos-sdk 0.45.2' - title: >- - GrantAuthorization extends a grant with both the addresses - of the grantee and granter. - - It is used in genesis.proto and query.proto - description: grants is a list of grants granted to the grantee. - pagination: - description: pagination defines an pagination for the response. + params: type: object properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + foundation_tax: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + description: Params defines the parameters for the foundation module. description: >- - QueryGranteeGrantsResponse is the response type for the - Query/GranteeGrants RPC method. + QueryParamsResponse is the response type for the Query/Params RPC + method. default: description: An unexpected error response schema: @@ -23710,280 +21965,315 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - parameters: - - name: grantee - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/cosmos/authz/v1beta1/grants/granter/{granter}': + /lbm/foundation/v1/proposals: get: - summary: 'GranterGrants returns list of `GrantAuthorization`, granted by granter.' - description: 'Since: cosmos-sdk 0.45.2' - operationId: GranterGrants + summary: Proposals queries all proposals. + operationId: FoundationProposals responses: '200': description: A successful response. schema: type: object properties: - grants: + proposals: type: array items: type: object properties: - granter: + id: type: string - grantee: + format: uint64 + description: id is the unique id of the proposal. + metadata: type: string - authorization: + description: >- + metadata is any arbitrary metadata to attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal + was submitted. + foundation_version: + type: string + format: uint64 + description: >- + foundation_version tracks the version of the foundation + that this proposal corresponds to. + + When foundation info is changed, existing proposals from + previous foundation versions will become invalid. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all votes for + this + + proposal for each vote option, after tallying. When + querying a proposal + + via gRPC, this field is not populated until the + proposal's voting period + + has ended. type: object properties: - type_url: + yes_count: type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized + description: yes_count is the sum of yes votes. + abstain_count: + type: string + description: abstain_count is the sum of abstainers. + no_count: + type: string + description: no is the sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. - protocol buffer message. This string must contain at - least + Unless a successfull MsgExec is called before (to + execute a proposal whose - one "/" character. The last segment of the URL's - path must represent + tally is successful before the voting period ends), + tallying will be done - the fully qualified name of the type (as in + at this point, and the `final_tally_result`, as well - `path/google.protobuf.Duration`). The name should be - in a canonical form + as `status` and `result` fields will be accordingly + updated. + executor_result: + description: >- + executor_result is the final result based on the votes + and election rule. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized - (e.g., leading "." is not accepted). + protocol buffer message. This string must contain + at least + one "/" character. The last segment of the URL's + path must represent - In practice, teams usually precompile into the - binary all types that they + the fully qualified name of the type (as in - expect it to use in the context of Any. However, for - URLs which use the + `path/google.protobuf.Duration`). The name should + be in a canonical form - scheme `http`, `https`, or no scheme, one can - optionally set up a type + (e.g., leading "." is not accepted). - server that maps type URLs to message definitions as - follows: + In practice, teams usually precompile into the + binary all types that they - * If no scheme is provided, `https` is assumed. + expect it to use in the context of Any. However, + for URLs which use the - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + scheme `http`, `https`, or no scheme, one can + optionally set up a type - Note: this functionality is not currently available - in the official + server that maps type URLs to message definitions + as follows: - protobuf release, and it is not used for type URLs - beginning with - type.googleapis.com. + * If no scheme is provided, `https` is assumed. + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - Schemes other than `http`, `https` (or the empty - scheme) might be + Note: this functionality is not currently + available in the official - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a + protobuf release, and it is not used for type URLs + beginning with - URL that describes the type of the serialized message. + type.googleapis.com. - Protobuf library provides support to pack/unpack Any - values in the form + Schemes other than `http`, `https` (or the empty + scheme) might be - of utility functions or additional generated methods of - the Any type. + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + URL that describes the type of the serialized message. - Example 1: Pack and unpack a message in C++. - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + Protobuf library provides support to pack/unpack Any + values in the form - Example 2: Pack and unpack a message in Java. + of utility functions or additional generated methods + of the Any type. - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - Example 3: Pack and unpack a message in Python. + Example 1: Pack and unpack a message in C++. - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) + Foo foo = ...; + Any any; + any.PackFrom(foo); ... + if (any.UnpackTo(&foo)) { + ... + } - Example 4: Pack and unpack a message in Go + Example 2: Pack and unpack a message in Java. - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) ... - } + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - The pack methods provided by protobuf library will by - default use + The pack methods provided by protobuf library will by + default use - 'type.googleapis.com/full.type.name' as the type URL and - the unpack + 'type.googleapis.com/full.type.name' as the type URL + and the unpack - methods only use the fully qualified type name after the - last '/' + methods only use the fully qualified type name after + the last '/' - in the type URL, for example "foo.bar.com/x/y.z" will - yield type + in the type URL, for example "foo.bar.com/x/y.z" will + yield type - name "y.z". + name "y.z". - JSON + JSON - ==== + ==== - The JSON representation of an `Any` value uses the - regular + The JSON representation of an `Any` value uses the + regular - representation of the deserialized, embedded message, - with an + representation of the deserialized, embedded message, + with an - additional field `@type` which contains the type URL. - Example: + additional field `@type` which contains the type URL. + Example: - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - If the embedded message type is well-known and has a - custom JSON + If the embedded message type is well-known and has a + custom JSON - representation, that representation will be embedded - adding a field + representation, that representation will be embedded + adding a field - `value` which holds the custom JSON in addition to the - `@type` + `value` which holds the custom JSON in addition to the + `@type` - field. Example (for message - [google.protobuf.Duration][]): + field. Example (for message + [google.protobuf.Duration][]): - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - expiration: - type: string - format: date-time - description: 'Since: cosmos-sdk 0.45.2' - title: >- - GrantAuthorization extends a grant with both the addresses - of the grantee and granter. + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages is a list of Msgs that will be executed if the + proposal passes. + description: >- + Proposal defines a foundation proposal. Any member of the + foundation can submit a proposal - It is used in genesis.proto and query.proto - description: grants is a list of grants granted by the granter. + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be + executed if the proposal + + passes as well as some optional metadata associated with the + proposal. + description: proposals are the proposals of the foundation. pagination: - description: pagination defines an pagination for the response. + description: pagination defines the pagination in the response. type: object properties: next_key: @@ -24000,9 +22290,7 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: >- - QueryGranterGrantsResponse is the response type for the - Query/GranterGrants RPC method. + description: QueryProposalsResponse is the Query/Proposals response type. default: description: An unexpected error response schema: @@ -24193,10 +22481,6 @@ paths: "value": "1.212s" } parameters: - - name: granter - in: path - required: true - type: string - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -24257,56 +22541,308 @@ paths: format: boolean tags: - Query - /lbm/foundation/v1/censorships: + '/lbm/foundation/v1/proposals/{proposal_id}': get: - summary: Censorships queries the censorship informations. - operationId: Censorships + summary: Proposal queries a proposal based on proposal id. + operationId: FoundationProposal responses: '200': description: A successful response. schema: type: object properties: - censorships: - type: array - items: - type: object - properties: - msg_type_url: - type: string - authority: - type: string - enum: - - CENSORSHIP_AUTHORITY_UNSPECIFIED - - CENSORSHIP_AUTHORITY_GOVERNANCE - - CENSORSHIP_AUTHORITY_FOUNDATION - default: CENSORSHIP_AUTHORITY_UNSPECIFIED - description: |2- - - CENSORSHIP_AUTHORITY_UNSPECIFIED: CENSORSHIP_AUTHORITY_UNSPECIFIED defines an invalid authority. - - CENSORSHIP_AUTHORITY_GOVERNANCE: CENSORSHIP_AUTHORITY_GOVERNANCE defines x/gov authority. - - CENSORSHIP_AUTHORITY_FOUNDATION: CENSORSHIP_AUTHORITY_FOUNDATION defines x/foundation authority. - description: authorizations is a list of grants granted for grantee. - pagination: - description: pagination defines the pagination in the response. + proposal: type: object properties: - next_key: + id: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: uint64 + description: id is the unique id of the proposal. + metadata: + type: string + description: >- + metadata is any arbitrary metadata to attached to the + proposal. + proposers: + type: array + items: + type: string + description: proposers are the account addresses of the proposers. + submit_time: + type: string + format: date-time + description: >- + submit_time is a timestamp specifying when a proposal was + submitted. + foundation_version: type: string format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + foundation_version tracks the version of the foundation + that this proposal corresponds to. - was set, its value is undefined otherwise - description: >- - QueryCensorshipsResponse is the response type for the - Query/Censorships RPC method. + When foundation info is changed, existing proposals from + previous foundation versions will become invalid. + status: + description: >- + status represents the high level position in the life + cycle of the proposal. Initial value is Submitted. + type: string + enum: + - PROPOSAL_STATUS_UNSPECIFIED + - PROPOSAL_STATUS_SUBMITTED + - PROPOSAL_STATUS_ACCEPTED + - PROPOSAL_STATUS_REJECTED + - PROPOSAL_STATUS_ABORTED + - PROPOSAL_STATUS_WITHDRAWN + default: PROPOSAL_STATUS_UNSPECIFIED + final_tally_result: + description: >- + final_tally_result contains the sums of all votes for this + + proposal for each vote option, after tallying. When + querying a proposal + + via gRPC, this field is not populated until the proposal's + voting period + + has ended. + type: object + properties: + yes_count: + type: string + description: yes_count is the sum of yes votes. + abstain_count: + type: string + description: abstain_count is the sum of abstainers. + no_count: + type: string + description: no is the sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the sum of veto. + voting_period_end: + type: string + format: date-time + description: >- + voting_period_end is the timestamp before which voting + must be done. + + Unless a successfull MsgExec is called before (to execute + a proposal whose + + tally is successful before the voting period ends), + tallying will be done + + at this point, and the `final_tally_result`, as well + + as `status` and `result` fields will be accordingly + updated. + executor_result: + description: >- + executor_result is the final result based on the votes and + election rule. Initial value is NotRun. + type: string + enum: + - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + - PROPOSAL_EXECUTOR_RESULT_NOT_RUN + - PROPOSAL_EXECUTOR_RESULT_SUCCESS + - PROPOSAL_EXECUTOR_RESULT_FAILURE + default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED + messages: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer + message along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any + values in the form + + of utility functions or additional generated methods of + the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by + default use + + 'type.googleapis.com/full.type.name' as the type URL and + the unpack + + methods only use the fully qualified type name after the + last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will + yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the + regular + + representation of the deserialized, embedded message, + with an + + additional field `@type` which contains the type URL. + Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a + custom JSON + + representation, that representation will be embedded + adding a field + + `value` which holds the custom JSON in addition to the + `@type` + + field. Example (for message + [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + messages is a list of Msgs that will be executed if the + proposal passes. + description: >- + Proposal defines a foundation proposal. Any member of the + foundation can submit a proposal + + for a group policy to decide upon. + + A proposal consists of a set of `sdk.Msg`s that will be + executed if the proposal + + passes as well as some optional metadata associated with the + proposal. + description: QueryProposalResponse is the Query/Proposal response type. default: description: An unexpected error response schema: @@ -24497,275 +23033,41 @@ paths: "value": "1.212s" } parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false + - name: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true type: string format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - /lbm/foundation/v1/foundation_info: + '/lbm/foundation/v1/proposals/{proposal_id}/tally': get: - summary: FoundationInfo queries foundation info. - operationId: FoundationInfo + summary: TallyResult queries the tally of a proposal votes. + operationId: FoundationTallyResult responses: '200': description: A successful response. schema: type: object properties: - info: - description: info is the FoundationInfo for the foundation. + tally: + description: tally defines the requested tally. type: object properties: - version: + yes_count: type: string - format: uint64 - title: >- - version is used to track changes to the foundation's - membership structure that - - would break existing proposals. Whenever any member is - added or removed, - - this version is incremented and will cause proposals based - on older versions - - of the foundation to fail - total_weight: + description: yes_count is the sum of yes votes. + abstain_count: type: string - description: total_weight is the number of the foundation members. - decision_policy: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - QueryFoundationInfoResponse is the Query/FoundationInfo response - type. + description: abstain_count is the sum of abstainers. + no_count: + type: string + description: no is the sum of no votes. + no_with_veto_count: + type: string + description: no_with_veto_count is the sum of veto. + description: QueryTallyResultResponse is the Query/TallyResult response type. default: description: An unexpected error response schema: @@ -24955,41 +23257,60 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: proposal_id + description: proposal_id is the unique id of a proposal. + in: path + required: true + type: string + format: uint64 tags: - Query - /lbm/foundation/v1/foundation_members: + '/lbm/foundation/v1/proposals/{proposal_id}/votes': get: - summary: Members queries members of the foundation - operationId: Members + summary: Votes queries a vote by proposal. + operationId: FoundationVotes responses: '200': description: A successful response. schema: type: object properties: - members: + votes: type: array items: type: object properties: - address: + proposal_id: type: string - description: address is the member's account address. + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED metadata: type: string description: >- metadata is any arbitrary metadata to attached to the - member. - added_at: + vote. + submit_time: type: string format: date-time description: >- - added_at is a timestamp specifying when a member was - added. - description: >- - Member represents a foundation member with an account - address and metadata. - description: members are the members of the foundation. + submit_time is the timestamp when the vote was + submitted. + description: Vote represents a vote for a proposal. + description: votes are the list of votes for given proposal_id. pagination: description: pagination defines the pagination in the response. type: object @@ -25008,7 +23329,7 @@ paths: PageRequest.count_total was set, its value is undefined otherwise - description: QueryMembersResponse is the Query/MembersResponse response type. + description: QueryVotesResponse is the Query/Votes response type. default: description: An unexpected error response schema: @@ -25199,6 +23520,12 @@ paths: "value": "1.212s" } parameters: + - name: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -25259,37 +23586,47 @@ paths: format: boolean tags: - Query - '/lbm/foundation/v1/foundation_members/{address}': + '/lbm/foundation/v1/proposals/{proposal_id}/votes/{voter}': get: - summary: Member queries a member of the foundation - operationId: Member + summary: Vote queries a vote by proposal id and voter. + operationId: FoundationVote responses: '200': description: A successful response. schema: type: object properties: - member: + vote: type: object properties: - address: + proposal_id: type: string - description: address is the member's account address. + format: uint64 + description: proposal is the unique ID of the proposal. + voter: + type: string + description: voter is the account address of the voter. + option: + description: option is the voter's choice on the proposal. + type: string + enum: + - VOTE_OPTION_UNSPECIFIED + - VOTE_OPTION_YES + - VOTE_OPTION_ABSTAIN + - VOTE_OPTION_NO + - VOTE_OPTION_NO_WITH_VETO + default: VOTE_OPTION_UNSPECIFIED metadata: type: string description: >- metadata is any arbitrary metadata to attached to the - member. - added_at: + vote. + submit_time: type: string format: date-time - description: >- - added_at is a timestamp specifying when a member was - added. - description: >- - Member represents a foundation member with an account address - and metadata. - description: QueryMemberResponse is the Query/MemberResponse response type. + description: submit_time is the timestamp when the vote was submitted. + description: Vote represents a vote for a proposal. + description: QueryVoteResponse is the Query/Vote response type. default: description: An unexpected error response schema: @@ -25480,23 +23817,63 @@ paths: "value": "1.212s" } parameters: - - name: address + - name: proposal_id + description: proposal_id is the unique ID of a proposal. + in: path + required: true + type: string + format: uint64 + - name: voter + description: voter is a proposal voter account address. in: path required: true type: string tags: - Query - '/lbm/foundation/v1/grants/{grantee}/{msg_type_url}': + /lbm/foundation/v1/treasury: get: - summary: 'Returns list of authorizations, granted to the grantee.' - operationId: FoundationGrants + summary: Treasury queries the foundation treasury. + operationId: Treasury responses: '200': description: A successful response. schema: type: object properties: - authorizations: + amount: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: >- + DecCoin defines a token with a denomination and a decimal + amount. + + + NOTE: The amount field is an Dec which implements the custom + method + + signatures required by gogoproto. + description: |- + QueryTreasuryResponse is the response type for the + Query/Treasury RPC method. + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object @@ -25673,7 +24050,214 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - description: authorizations is a list of grants granted for grantee. + tags: + - Query + '/lbm/token/v1/token_classes/{contract_id}': + get: + summary: Contract queries an token metadata based on its contract id. + operationId: TokenContract + responses: + '200': + description: A successful response. + schema: + type: object + properties: + contract: + type: object + properties: + id: + type: string + description: id defines the unique identifier of the contract. + name: + type: string + description: >- + name defines the human-readable name of the contract. + mandatory (not ERC20 compliant). + symbol: + type: string + description: >- + symbol is an abbreviated name for contract. mandatory (not + ERC20 compliant). + uri: + type: string + description: an uri for the image of the contract stored off chain. + meta: + type: string + description: meta is a brief description of contract. + decimals: + type: integer + format: int32 + description: >- + decimals is the number of decimals which one must divide + the amount by to get its user representation. + mintable: + type: boolean + format: boolean + description: >- + mintable represents whether the token is allowed to mint + or burn. + description: Contract defines token information. + title: >- + QueryContractResponse is the response type for the Query/Contract + RPC method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + tags: + - Query + '/lbm/token/v1/token_classes/{contract_id}/balances/{address}': + get: + summary: >- + Balance queries the number of tokens of a given contract owned by the + address. + operationId: TokenBalance + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + description: the balance of the tokens. + title: >- + QueryBalanceResponse is the response type for the Query/Balance + RPC method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + - name: address + description: address is the address to query balance for. + in: path + required: true + type: string + tags: + - Query + '/lbm/token/v1/token_classes/{contract_id}/burnt': + get: + summary: Burnt queries the number of burnt tokens from the given contract id. + operationId: TokenBurnt + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + description: the amount of the burnt tokens. + title: >- + QueryBurntResponse is the response type for the Query/Burnt RPC + method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + tags: + - Query + '/lbm/token/v1/token_classes/{contract_id}/grants/{grantee}': + get: + summary: GranteeGrants queries permissions on a given grantee. + operationId: TokenGranteeGrants + responses: + '200': + description: A successful response. + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + grantee: + type: string + description: address of the grantee. + permission: + description: permission on the contract. + type: string + enum: + - PERMISSION_UNSPECIFIED + - PERMISSION_MODIFY + - PERMISSION_MINT + - PERMISSION_BURN + default: PERMISSION_UNSPECIFIED + description: Grant defines permission given to a grantee. + description: all the grants on the grantee. pagination: description: pagination defines the pagination in the response. type: object @@ -25692,9 +24276,223 @@ paths: PageRequest.count_total was set, its value is undefined otherwise + title: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + - name: grantee + description: grantee which has permissions on the contract. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean + tags: + - Query + '/lbm/token/v1/token_classes/{contract_id}/minted': + get: + summary: Minted queries the number of minted tokens from the given contract id. + operationId: TokenMinted + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + description: the amount of the minted tokens. + title: >- + QueryMintedResponse is the response type for the Query/Minted RPC + method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + tags: + - Query + '/lbm/token/v1/token_classes/{contract_id}/supply': + get: + summary: Supply queries the number of tokens from the given contract id. + operationId: TokenSupply + responses: + '200': + description: A successful response. + schema: + type: object + properties: + amount: + type: string + description: the supply of the tokens. + title: >- + QuerySupplyResponse is the response type for the Query/Supply RPC + method + default: + description: An unexpected error response + schema: + type: object + properties: + error: + type: string + code: + type: integer + format: int32 + message: + type: string + details: + type: array + items: + type: object + properties: + type_url: + type: string + value: + type: string + format: byte + parameters: + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + tags: + - Query + '/lbm/collection/v1/contracts/{contract_id}': + get: + summary: Contract queries a contract metadata based on its contract id. + operationId: CollectionContract + responses: + '200': + description: A successful response. + schema: + type: object + properties: + contract: + description: contract is the information of the contract. + type: object + properties: + id: + type: string + description: contract_id defines the unique identifier of the contract. + name: + type: string + description: name defines the human-readable name of the contract. + meta: + type: string + description: meta is a brief description of the contract. + uri: + type: string + description: uri for the contract image stored off chain. description: >- - QueryGrantsResponse is the response type for the Query/Grants RPC - method. + QueryContractResponse is the response type for the Query/Contract + RPC method. default: description: An unexpected error response schema: @@ -25885,96 +24683,59 @@ paths: "value": "1.212s" } parameters: - - name: grantee - in: path - required: true - type: string - - name: msg_type_url - description: >- - Optional, msg_type_url, when set, will query only grants matching - given msg type. + - name: contract_id + description: contract id associated with the contract. in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - /lbm/foundation/v1/params: + '/lbm/collection/v1/contracts/{contract_id}/balances/{address}': get: - summary: Params queries the module params. - operationId: FoundationParams + summary: >- + AllBalances queries the balance of all token classes for a single + account. + operationId: CollectionAllBalances responses: '200': description: A successful response. schema: type: object properties: - params: + balances: + type: array + items: + type: object + properties: + token_id: + type: string + description: token id associated with the token. + amount: + type: string + description: amount of the token. + description: Coin defines a token with a token id and an amount. + description: balances is the balalces of all the tokens. + pagination: + description: pagination defines the pagination in the response. type: object properties: - foundation_tax: + next_key: type: string - description: Params defines the parameters for the foundation module. + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - QueryParamsResponse is the response type for the Query/Params RPC - method. + QueryAllBalancesResponse is the response type for the + Query/AllBalances RPC method. default: description: An unexpected error response schema: @@ -26164,332 +24925,102 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + - name: address + description: address is the address to query the balances for. + in: path + required: true + type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - /lbm/foundation/v1/proposals: + '/lbm/collection/v1/contracts/{contract_id}/balances/{address}/{token_id}': get: - summary: Proposals queries all proposals. - operationId: FoundationProposals + summary: >- + Balance queries the balance of a single token class for a single + account. + operationId: CollectionBalance responses: '200': description: A successful response. schema: type: object properties: - proposals: - type: array - items: - type: object - properties: - id: - type: string - format: uint64 - description: id is the unique id of the proposal. - metadata: - type: string - description: >- - metadata is any arbitrary metadata to attached to the - proposal. - proposers: - type: array - items: - type: string - description: proposers are the account addresses of the proposers. - submit_time: - type: string - format: date-time - description: >- - submit_time is a timestamp specifying when a proposal - was submitted. - foundation_version: - type: string - format: uint64 - description: >- - foundation_version tracks the version of the foundation - that this proposal corresponds to. - - When foundation info is changed, existing proposals from - previous foundation versions will become invalid. - status: - description: >- - status represents the high level position in the life - cycle of the proposal. Initial value is Submitted. - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_SUBMITTED - - PROPOSAL_STATUS_ACCEPTED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_ABORTED - - PROPOSAL_STATUS_WITHDRAWN - default: PROPOSAL_STATUS_UNSPECIFIED - final_tally_result: - description: >- - final_tally_result contains the sums of all votes for - this - - proposal for each vote option, after tallying. When - querying a proposal - - via gRPC, this field is not populated until the - proposal's voting period - - has ended. - type: object - properties: - yes_count: - type: string - description: yes_count is the sum of yes votes. - abstain_count: - type: string - description: abstain_count is the sum of abstainers. - no_count: - type: string - description: no is the sum of no votes. - no_with_veto_count: - type: string - description: no_with_veto_count is the sum of veto. - voting_period_end: - type: string - format: date-time - description: >- - voting_period_end is the timestamp before which voting - must be done. - - Unless a successfull MsgExec is called before (to - execute a proposal whose - - tally is successful before the voting period ends), - tallying will be done - - at this point, and the `final_tally_result`, as well - - as `status` and `result` fields will be accordingly - updated. - executor_result: - description: >- - executor_result is the final result based on the votes - and election rule. Initial value is NotRun. - type: string - enum: - - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - - PROPOSAL_EXECUTOR_RESULT_SUCCESS - - PROPOSAL_EXECUTOR_RESULT_FAILURE - default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - messages: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain - at least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should - be in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, - for URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions - as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently - available in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods - of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL - and the unpack - - methods only use the fully qualified type name after - the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - messages is a list of Msgs that will be executed if the - proposal passes. - description: >- - Proposal defines a foundation proposal. Any member of the - foundation can submit a proposal - - for a group policy to decide upon. - - A proposal consists of a set of `sdk.Msg`s that will be - executed if the proposal - - passes as well as some optional metadata associated with the - proposal. - description: proposals are the proposals of the foundation. - pagination: - description: pagination defines the pagination in the response. + balance: type: object properties: - next_key: + token_id: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + description: token id associated with the token. + amount: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: QueryProposalsResponse is the Query/Proposals response type. + description: amount of the token. + description: Coin defines a token with a token id and an amount. + description: >- + QueryBalanceResponse is the response type for the Query/Balance + RPC method. default: description: An unexpected error response schema: @@ -26680,368 +25211,41 @@ paths: "value": "1.212s" } parameters: - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false + - name: contract_id + description: contract id associated with the contract. + in: path + required: true type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false + - name: address + description: address is the address to query the balance for. + in: path + required: true type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false + - name: token_id + description: token id associated with the token. + in: path + required: true type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/lbm/foundation/v1/proposals/{proposal_id}': + '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/burnt': get: - summary: Proposal queries a proposal based on proposal id. - operationId: FoundationProposal + summary: >- + FTBurnt queries the number of burnt tokens from a given contract id and + token id. + operationId: FTBurnt responses: '200': description: A successful response. schema: type: object properties: - proposal: - type: object - properties: - id: - type: string - format: uint64 - description: id is the unique id of the proposal. - metadata: - type: string - description: >- - metadata is any arbitrary metadata to attached to the - proposal. - proposers: - type: array - items: - type: string - description: proposers are the account addresses of the proposers. - submit_time: - type: string - format: date-time - description: >- - submit_time is a timestamp specifying when a proposal was - submitted. - foundation_version: - type: string - format: uint64 - description: >- - foundation_version tracks the version of the foundation - that this proposal corresponds to. - - When foundation info is changed, existing proposals from - previous foundation versions will become invalid. - status: - description: >- - status represents the high level position in the life - cycle of the proposal. Initial value is Submitted. - type: string - enum: - - PROPOSAL_STATUS_UNSPECIFIED - - PROPOSAL_STATUS_SUBMITTED - - PROPOSAL_STATUS_ACCEPTED - - PROPOSAL_STATUS_REJECTED - - PROPOSAL_STATUS_ABORTED - - PROPOSAL_STATUS_WITHDRAWN - default: PROPOSAL_STATUS_UNSPECIFIED - final_tally_result: - description: >- - final_tally_result contains the sums of all votes for this - - proposal for each vote option, after tallying. When - querying a proposal - - via gRPC, this field is not populated until the proposal's - voting period - - has ended. - type: object - properties: - yes_count: - type: string - description: yes_count is the sum of yes votes. - abstain_count: - type: string - description: abstain_count is the sum of abstainers. - no_count: - type: string - description: no is the sum of no votes. - no_with_veto_count: - type: string - description: no_with_veto_count is the sum of veto. - voting_period_end: - type: string - format: date-time - description: >- - voting_period_end is the timestamp before which voting - must be done. - - Unless a successfull MsgExec is called before (to execute - a proposal whose - - tally is successful before the voting period ends), - tallying will be done - - at this point, and the `final_tally_result`, as well - - as `status` and `result` fields will be accordingly - updated. - executor_result: - description: >- - executor_result is the final result based on the votes and - election rule. Initial value is NotRun. - type: string - enum: - - PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - - PROPOSAL_EXECUTOR_RESULT_NOT_RUN - - PROPOSAL_EXECUTOR_RESULT_SUCCESS - - PROPOSAL_EXECUTOR_RESULT_FAILURE - default: PROPOSAL_EXECUTOR_RESULT_UNSPECIFIED - messages: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any - values in the form - - of utility functions or additional generated methods of - the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and - the unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will - yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the - regular - - representation of the deserialized, embedded message, - with an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a - custom JSON - - representation, that representation will be embedded - adding a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message - [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - messages is a list of Msgs that will be executed if the - proposal passes. - description: >- - Proposal defines a foundation proposal. Any member of the - foundation can submit a proposal - - for a group policy to decide upon. - - A proposal consists of a set of `sdk.Msg`s that will be - executed if the proposal - - passes as well as some optional metadata associated with the - proposal. - description: QueryProposalResponse is the Query/Proposal response type. + burnt: + type: string + description: burnt is the amount of the burnt tokens. + description: >- + QueryFTBurntResponse is the response type for the Query/FTBurnt + RPC method. default: description: An unexpected error response schema: @@ -27232,41 +25436,36 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id is the unique ID of a proposal. + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + - name: token_id + description: token id associated with the fungible token. in: path required: true type: string - format: uint64 tags: - Query - '/lbm/foundation/v1/proposals/{proposal_id}/tally': + '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/minted': get: - summary: TallyResult queries the tally of a proposal votes. - operationId: FoundationTallyResult + summary: >- + FTMinted queries the number of minted tokens from a given contract id + and token id. + operationId: FTMinted responses: '200': description: A successful response. schema: type: object properties: - tally: - description: tally defines the requested tally. - type: object - properties: - yes_count: - type: string - description: yes_count is the sum of yes votes. - abstain_count: - type: string - description: abstain_count is the sum of abstainers. - no_count: - type: string - description: no is the sum of no votes. - no_with_veto_count: - type: string - description: no_with_veto_count is the sum of veto. - description: QueryTallyResultResponse is the Query/TallyResult response type. + minted: + type: string + description: minted is the amount of the minted tokens. + description: >- + QueryFTMintedResponse is the response type for the Query/FTMinted + RPC method. default: description: An unexpected error response schema: @@ -27457,78 +25656,36 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id is the unique id of a proposal. + - name: contract_id + description: contract id associated with the contract. + in: path + required: true + type: string + - name: token_id + description: token id associated with the fungible token. in: path required: true type: string - format: uint64 tags: - Query - '/lbm/foundation/v1/proposals/{proposal_id}/votes': + '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/supply': get: - summary: Votes queries a vote by proposal. - operationId: FoundationVotes + summary: >- + FTSupply queries the number of tokens from a given contract id and token + id. + operationId: FTSupply responses: '200': description: A successful response. schema: type: object properties: - votes: - type: array - items: - type: object - properties: - proposal_id: - type: string - format: uint64 - description: proposal is the unique ID of the proposal. - voter: - type: string - description: voter is the account address of the voter. - option: - description: option is the voter's choice on the proposal. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - metadata: - type: string - description: >- - metadata is any arbitrary metadata to attached to the - vote. - submit_time: - type: string - format: date-time - description: >- - submit_time is the timestamp when the vote was - submitted. - description: Vote represents a vote for a proposal. - description: votes are the list of votes for given proposal_id. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: QueryVotesResponse is the Query/Votes response type. + supply: + type: string + description: supply is the supply of the tokens. + description: >- + QueryFTSupplyResponse is the response type for the Query/FTSupply + RPC method. default: description: An unexpected error response schema: @@ -27719,113 +25876,71 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id is the unique ID of a proposal. + - name: contract_id + description: contract id associated with the contract. in: path required: true type: string - format: uint64 - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false + - name: token_id + description: token id associated with the fungible token. + in: path + required: true type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should + tags: + - Query + '/lbm/collection/v1/contracts/{contract_id}/grants/{grantee}': + get: + summary: GranteeGrants queries all permissions on a given grantee. + operationId: CollectionGranteeGrants + responses: + '200': + description: A successful response. + schema: + type: object + properties: + grants: + type: array + items: + type: object + properties: + grantee: + type: string + description: address of the grantee. + permission: + description: permission on the contract. + type: string + enum: + - PERMISSION_UNSPECIFIED + - PERMISSION_ISSUE + - PERMISSION_MODIFY + - PERMISSION_MINT + - PERMISSION_BURN + default: PERMISSION_UNSPECIFIED + description: |- + Grant defines permission given to a grantee. - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean - tags: - - Query - '/lbm/foundation/v1/proposals/{proposal_id}/votes/{voter}': - get: - summary: Vote queries a vote by proposal id and voter. - operationId: FoundationVote - responses: - '200': - description: A successful response. - schema: - type: object - properties: - vote: + Since: 0.46.0 (finschia) + pagination: + description: pagination defines the pagination in the response. type: object properties: - proposal_id: - type: string - format: uint64 - description: proposal is the unique ID of the proposal. - voter: - type: string - description: voter is the account address of the voter. - option: - description: option is the voter's choice on the proposal. - type: string - enum: - - VOTE_OPTION_UNSPECIFIED - - VOTE_OPTION_YES - - VOTE_OPTION_ABSTAIN - - VOTE_OPTION_NO - - VOTE_OPTION_NO_WITH_VETO - default: VOTE_OPTION_UNSPECIFIED - metadata: + next_key: type: string - description: >- - metadata is any arbitrary metadata to attached to the - vote. - submit_time: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - format: date-time - description: submit_time is the timestamp when the vote was submitted. - description: Vote represents a vote for a proposal. - description: QueryVoteResponse is the Query/Vote response type. + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryGranteeGrantsResponse is the response type for the + Query/GranteeGrants RPC method. default: description: An unexpected error response schema: @@ -28016,50 +26131,126 @@ paths: "value": "1.212s" } parameters: - - name: proposal_id - description: proposal_id is the unique ID of a proposal. + - name: contract_id + description: contract id associated with the contract. in: path required: true type: string - format: uint64 - - name: voter - description: voter is a proposal voter account address. + - name: grantee + description: the address of the grantee. in: path required: true type: string + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false + type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - /lbm/foundation/v1/treasury: + '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/children': get: - summary: Treasury queries the foundation treasury. - operationId: Treasury + summary: Children queries the children of a given nft. + operationId: Children responses: '200': description: A successful response. schema: type: object properties: - amount: + children: type: array items: type: object properties: - denom: + token_id: type: string - amount: + description: token id defines the unique identifier of the token. + name: type: string - description: >- - DecCoin defines a token with a denomination and a decimal - amount. - + description: name defines the human-readable name of the token. + meta: + type: string + description: meta is a brief description of the token. + description: |- + NFT defines the information of non-fungible token. - NOTE: The amount field is an Dec which implements the custom - method + Since: 0.46.0 (finschia) + description: children is the information of the child tokens. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - signatures required by gogoproto. - description: |- - QueryTreasuryResponse is the response type for the - Query/Treasury RPC method. + was set, its value is undefined otherwise + description: >- + QueryChildrenResponse is the response type for the Query/Children + RPC method. default: description: An unexpected error response schema: @@ -28249,265 +26440,14 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } - tags: - - Query - '/lbm/token/v1/token_classes/{contract_id}': - get: - summary: Contract queries an token metadata based on its contract id. - operationId: TokenContract - responses: - '200': - description: A successful response. - schema: - type: object - properties: - contract: - type: object - properties: - id: - type: string - description: id defines the unique identifier of the contract. - name: - type: string - description: >- - name defines the human-readable name of the contract. - mandatory (not ERC20 compliant). - symbol: - type: string - description: >- - symbol is an abbreviated name for contract. mandatory (not - ERC20 compliant). - uri: - type: string - description: an uri for the image of the contract stored off chain. - meta: - type: string - description: meta is a brief description of contract. - decimals: - type: integer - format: int32 - description: >- - decimals is the number of decimals which one must divide - the amount by to get its user representation. - mintable: - type: boolean - format: boolean - description: >- - mintable represents whether the token is allowed to mint - or burn. - description: Contract defines token information. - title: >- - QueryContractResponse is the response type for the Query/Contract - RPC method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - tags: - - Query - '/lbm/token/v1/token_classes/{contract_id}/balances/{address}': - get: - summary: >- - Balance queries the number of tokens of a given contract owned by the - address. - operationId: TokenBalance - responses: - '200': - description: A successful response. - schema: - type: object - properties: - amount: - type: string - description: the balance of the tokens. - title: >- - QueryBalanceResponse is the response type for the Query/Balance - RPC method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - - name: address - description: address is the address to query balance for. - in: path - required: true - type: string - tags: - - Query - '/lbm/token/v1/token_classes/{contract_id}/burnt': - get: - summary: Burnt queries the number of burnt tokens from the given contract id. - operationId: TokenBurnt - responses: - '200': - description: A successful response. - schema: - type: object - properties: - amount: - type: string - description: the amount of the burnt tokens. - title: >- - QueryBurntResponse is the response type for the Query/Burnt RPC - method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - tags: - - Query - '/lbm/token/v1/token_classes/{contract_id}/grants/{grantee}': - get: - summary: GranteeGrants queries permissions on a given grantee. - operationId: TokenGranteeGrants - responses: - '200': - description: A successful response. - schema: - type: object - properties: - grants: - type: array - items: - type: object - properties: - grantee: - type: string - description: address of the grantee. - permission: - description: permission on the contract. - type: string - enum: - - PERMISSION_UNSPECIFIED - - PERMISSION_MODIFY - - PERMISSION_MINT - - PERMISSION_BURN - default: PERMISSION_UNSPECIFIED - description: Grant defines permission given to a grantee. - description: all the grants on the grantee. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - title: >- - QueryGranteeGrantsResponse is the response type for the - Query/GranteeGrants RPC method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte parameters: - name: contract_id description: contract id associated with the contract. in: path required: true type: string - - name: grantee - description: grantee which has permissions on the contract. + - name: token_id + description: token id associated with the non-fungible token. in: path required: true type: string @@ -28571,127 +26511,23 @@ paths: format: boolean tags: - Query - '/lbm/token/v1/token_classes/{contract_id}/minted': + '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/has_parent': get: - summary: Minted queries the number of minted tokens from the given contract id. - operationId: TokenMinted + summary: HasParent queries whether a given nft has its parent. + operationId: HasParent responses: '200': description: A successful response. schema: type: object properties: - amount: - type: string - description: the amount of the minted tokens. - title: >- - QueryMintedResponse is the response type for the Query/Minted RPC - method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - tags: - - Query - '/lbm/token/v1/token_classes/{contract_id}/supply': - get: - summary: Supply queries the number of tokens from the given contract id. - operationId: TokenSupply - responses: - '200': - description: A successful response. - schema: - type: object - properties: - amount: - type: string - description: the supply of the tokens. - title: >- - QuerySupplyResponse is the response type for the Query/Supply RPC - method - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - tags: - - Query - '/lbm/collection/v1/contracts/{contract_id}': - get: - summary: Contract queries a contract metadata based on its contract id. - operationId: CollectionContract - responses: - '200': - description: A successful response. - schema: - type: object - properties: - contract: - description: contract is the information of the contract. - type: object - properties: - id: - type: string - description: contract_id defines the unique identifier of the contract. - name: - type: string - description: name defines the human-readable name of the contract. - meta: - type: string - description: meta is a brief description of the contract. - uri: - type: string - description: uri for the contract image stored off chain. - description: >- - QueryContractResponse is the response type for the Query/Contract - RPC method. + has_parent: + type: boolean + format: boolean + description: whether the token has its parent. + description: >- + QueryHasParentResponse is the response type for the + Query/HasParent RPC method. default: description: An unexpected error response schema: @@ -28887,54 +26723,42 @@ paths: in: path required: true type: string + - name: token_id + description: token id associated wit the non-fungible token. + in: path + required: true + type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/balances/{address}': + '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/parent': get: - summary: >- - AllBalances queries the balance of all token classes for a single - account. - operationId: CollectionAllBalances + summary: Parent queries the parent of a given nft. + operationId: Parent responses: '200': description: A successful response. schema: type: object properties: - balances: - type: array - items: - type: object - properties: - token_id: - type: string - description: token id associated with the token. - amount: - type: string - description: amount of the token. - description: Coin defines a token with a token id and an amount. - description: balances is the balalces of all the tokens. - pagination: - description: pagination defines the pagination in the response. + parent: type: object properties: - next_key: + token_id: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + description: token id defines the unique identifier of the token. + name: type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: name defines the human-readable name of the token. + meta: + type: string + description: meta is a brief description of the token. + description: |- + NFT defines the information of non-fungible token. - was set, its value is undefined otherwise + Since: 0.46.0 (finschia) description: >- - QueryAllBalancesResponse is the response type for the - Query/AllBalances RPC method. + QueryParentResponse is the response type for the Query/Parent RPC + method. default: description: An unexpected error response schema: @@ -29130,96 +26954,42 @@ paths: in: path required: true type: string - - name: address - description: address is the address to query the balances for. + - name: token_id + description: token id associated wit the non-fungible token. in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/balances/{address}/{token_id}': + '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/root': get: - summary: >- - Balance queries the balance of a single token class for a single - account. - operationId: CollectionBalance + summary: Root queries the root of a given nft. + operationId: Root responses: '200': description: A successful response. schema: type: object properties: - balance: + root: type: object properties: token_id: type: string - description: token id associated with the token. - amount: + description: token id defines the unique identifier of the token. + name: type: string - description: amount of the token. - description: Coin defines a token with a token id and an amount. + description: name defines the human-readable name of the token. + meta: + type: string + description: meta is a brief description of the token. + description: |- + NFT defines the information of non-fungible token. + + Since: 0.46.0 (finschia) description: >- - QueryBalanceResponse is the response type for the Query/Balance - RPC method. + QueryRootResponse is the response type for the Query/Root RPC + method. default: description: An unexpected error response schema: @@ -29415,36 +27185,35 @@ paths: in: path required: true type: string - - name: address - description: address is the address to query the balance for. - in: path - required: true - type: string - name: token_id - description: token id associated with the token. + description: token id associated with the non-fungible token. in: path required: true type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/burnt': + '/lbm/collection/v1/contracts/{contract_id}/token_classes/{class_id}/type_name': get: summary: >- - FTBurnt queries the number of burnt tokens from a given contract id and - token id. - operationId: FTBurnt + TokenClassTypeName queries the fully qualified message type name of a + token class from its class id. + description: 'Since: 0.46.0 (finschia)' + operationId: TokenClassTypeName responses: '200': description: A successful response. schema: type: object properties: - burnt: + name: type: string - description: burnt is the amount of the burnt tokens. + description: type name of the token class. description: >- - QueryFTBurntResponse is the response type for the Query/FTBurnt - RPC method. + QueryTokenClassTypeNameResponse is the response type for the + Query/TokenClassTypeName RPC method. + + + Since: 0.46.0 (finschia) default: description: An unexpected error response schema: @@ -29640,31 +27409,47 @@ paths: in: path required: true type: string - - name: token_id - description: token id associated with the fungible token. + - name: class_id + description: class id associated with the token class. in: path required: true type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/minted': + '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}': get: - summary: >- - FTMinted queries the number of minted tokens from a given contract id - and token id. - operationId: FTMinted + summary: TokenType queries metadata of a token type. + operationId: TokenType responses: '200': description: A successful response. schema: type: object properties: - minted: - type: string - description: minted is the amount of the minted tokens. + token_type: + description: token type is the information of the token type. + type: object + properties: + contract_id: + type: string + description: contract id associated with the contract. + token_type: + type: string + description: >- + token type defines the unique identifier of the token + type. + + the format of the value is identical to that of class_id. + name: + type: string + description: name defines the human-readable name of the token type. + meta: + type: string + description: meta is a brief description of the token type. + title: 'Deprecated: use TokenClass' description: >- - QueryFTMintedResponse is the response type for the Query/FTMinted - RPC method. + QueryTokenTypeResponse is the response type for the + Query/TokenType RPC method. default: description: An unexpected error response schema: @@ -29860,30 +27645,32 @@ paths: in: path required: true type: string - - name: token_id - description: token id associated with the fungible token. + - name: token_type + description: |- + token type associated with the token type. + refer to TokenType for the definition. in: path required: true type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/fts/{token_id}/supply': + '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/burnt': get: summary: >- - FTSupply queries the number of tokens from a given contract id and token - id. - operationId: FTSupply + NFTBurnt queries the number of burnt tokens from a given contract id and + token type. + operationId: NFTBurnt responses: '200': description: A successful response. schema: type: object properties: - supply: + burnt: type: string - description: supply is the supply of the tokens. + description: burnt is the amount of the burnt tokens. description: >- - QueryFTSupplyResponse is the response type for the Query/FTSupply + QueryNFTBurntResponse is the response type for the Query/NFTBurnt RPC method. default: description: An unexpected error response @@ -30080,66 +27867,33 @@ paths: in: path required: true type: string - - name: token_id - description: token id associated with the fungible token. + - name: token_type + description: |- + token type associated with the token type. + refer to TokenType for the definition. in: path required: true type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/grants/{grantee}': + '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/minted': get: - summary: GranteeGrants queries all permissions on a given grantee. - operationId: CollectionGranteeGrants + summary: >- + NFTMinted queries the number of minted tokens from a given contract id + and token type. + operationId: NFTMinted responses: '200': description: A successful response. schema: type: object properties: - grants: - type: array - items: - type: object - properties: - grantee: - type: string - description: address of the grantee. - permission: - description: permission on the contract. - type: string - enum: - - PERMISSION_UNSPECIFIED - - PERMISSION_ISSUE - - PERMISSION_MODIFY - - PERMISSION_MINT - - PERMISSION_BURN - default: PERMISSION_UNSPECIFIED - description: |- - Grant defines permission given to a grantee. - - Since: 0.46.0 (finschia) - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + minted: + type: string + description: minted is the amount of minted tokens. description: >- - QueryGranteeGrantsResponse is the response type for the - Query/GranteeGrants RPC method. + QueryNFTMintedResponse is the response type for the + Query/NFTMinted RPC method. default: description: An unexpected error response schema: @@ -30335,121 +28089,33 @@ paths: in: path required: true type: string - - name: grantee - description: the address of the grantee. + - name: token_type + description: |- + token type associated with the token type. + refer to TokenType for the definition. in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/children': + '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/supply': get: - summary: Children queries the children of a given nft. - operationId: Children + summary: >- + NFTSupply queries the number of tokens from a given contract id and + token type. + operationId: NFTSupply responses: '200': description: A successful response. schema: type: object properties: - children: - type: array - items: - type: object - properties: - token_id: - type: string - description: token id defines the unique identifier of the token. - name: - type: string - description: name defines the human-readable name of the token. - meta: - type: string - description: meta is a brief description of the token. - description: |- - NFT defines the information of non-fungible token. - - Since: 0.46.0 (finschia) - description: children is the information of the child tokens. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise + supply: + type: string + description: supply is the supply of the non-fungible token. description: >- - QueryChildrenResponse is the response type for the Query/Children - RPC method. + QueryNFTSupplyResponse is the response type for the + Query/NFTSupply RPC method. default: description: An unexpected error response schema: @@ -30645,88 +28311,199 @@ paths: in: path required: true type: string - - name: token_id - description: token id associated with the non-fungible token. + - name: token_type + description: |- + token type associated with the token type. + refer to TokenType for the definition. in: path required: true type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/has_parent': + '/lbm/collection/v1/contracts/{contract_id}/tokens/{token_id}': get: - summary: HasParent queries whether a given nft has its parent. - operationId: HasParent + summary: Token queries a metadata of a token from its token id. + operationId: Token responses: '200': description: A successful response. schema: type: object properties: - has_parent: - type: boolean - format: boolean - description: whether the token has its parent. + token: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of + the serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally + set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based + on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the + Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield + type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom + JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } description: >- - QueryHasParentResponse is the response type for the - Query/HasParent RPC method. + QueryTokenResponse is the response type for the Query/Token RPC + method. default: description: An unexpected error response schema: @@ -30923,41 +28700,110 @@ paths: required: true type: string - name: token_id - description: token id associated wit the non-fungible token. + description: token id associated with the fungible token. in: path required: true type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/parent': + '/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}': get: - summary: Parent queries the parent of a given nft. - operationId: Parent + summary: Allowance returns fee granted to the grantee by the granter. + operationId: Allowance responses: '200': description: A successful response. schema: type: object properties: - parent: + allowance: + description: allowance is a allowance granted for grantee by granter. type: object properties: - token_id: - type: string - description: token id defines the unique identifier of the token. - name: + granter: type: string - description: name defines the human-readable name of the token. - meta: + description: >- + granter is the address of the user granting an allowance + of their funds. + grantee: type: string - description: meta is a brief description of the token. - description: |- - NFT defines the information of non-fungible token. + description: >- + grantee is the address of the user being granted an + allowance of another user's funds. + allowance: + description: allowance can be any of basic and filtered fee allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type + of the serialized - Since: 0.46.0 (finschia) + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's path + must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary + all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in + the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + title: >- + Grant is stored in the KVStore to record a grant with full + context description: >- - QueryParentResponse is the response type for the Query/Parent RPC - method. + QueryAllowanceResponse is the response type for the + Query/Allowance RPC method. default: description: An unexpected error response schema: @@ -31148,47 +28994,142 @@ paths: "value": "1.212s" } parameters: - - name: contract_id - description: contract id associated with the contract. + - name: granter + description: >- + granter is the address of the user granting an allowance of their + funds. in: path required: true type: string - - name: token_id - description: token id associated wit the non-fungible token. + - name: grantee + description: >- + grantee is the address of the user being granted an allowance of + another user's funds. in: path required: true type: string tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/nfts/{token_id}/root': + '/cosmos/feegrant/v1beta1/allowances/{grantee}': get: - summary: Root queries the root of a given nft. - operationId: Root + summary: Allowances returns all the grants for address. + operationId: Allowances responses: '200': description: A successful response. schema: type: object properties: - root: + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance + of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an + allowance of another user's funds. + allowance: + description: >- + allowance can be any of basic and filtered fee + allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + + protocol buffer message. This string must contain at + least + + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + title: >- + Grant is stored in the KVStore to record a grant with full + context + description: allowances are allowance's granted for grantee by granter. + pagination: + description: pagination defines an pagination for the response. type: object properties: - token_id: - type: string - description: token id defines the unique identifier of the token. - name: + next_key: type: string - description: name defines the human-readable name of the token. - meta: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - description: meta is a brief description of the token. - description: |- - NFT defines the information of non-fungible token. + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - Since: 0.46.0 (finschia) + was set, its value is undefined otherwise description: >- - QueryRootResponse is the response type for the Query/Root RPC - method. + QueryAllowancesResponse is the response type for the + Query/Allowances RPC method. default: description: An unexpected error response schema: @@ -31379,40 +29320,192 @@ paths: "value": "1.212s" } parameters: - - name: contract_id - description: contract id associated with the contract. + - name: grantee in: path required: true type: string - - name: token_id - description: token id associated with the non-fungible token. - in: path - required: true + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/token_classes/{class_id}/type_name': + '/cosmos/feegrant/v1beta1/issued/{granter}': get: - summary: >- - TokenClassTypeName queries the fully qualified message type name of a - token class from its class id. - description: 'Since: 0.46.0 (finschia)' - operationId: TokenClassTypeName + summary: |- + AllowancesByGranter returns all the grants given by an address + Since v0.46 + operationId: AllowancesByGranter responses: '200': description: A successful response. schema: type: object properties: - name: - type: string - description: type name of the token class. - description: >- - QueryTokenClassTypeNameResponse is the response type for the - Query/TokenClassTypeName RPC method. + allowances: + type: array + items: + type: object + properties: + granter: + type: string + description: >- + granter is the address of the user granting an allowance + of their funds. + grantee: + type: string + description: >- + grantee is the address of the user being granted an + allowance of another user's funds. + allowance: + description: >- + allowance can be any of basic and filtered fee + allowance. + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the + type of the serialized + protocol buffer message. This string must contain at + least - Since: 0.46.0 (finschia) + one "/" character. The last segment of the URL's + path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be + in a canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the + binary all types that they + + expect it to use in the context of Any. However, for + URLs which use the + + scheme `http`, `https`, or no scheme, one can + optionally set up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results + based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available + in the official + + protobuf release, and it is not used for type URLs + beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty + scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the + above specified type. + title: >- + Grant is stored in the KVStore to record a grant with full + context + description: allowances that have been issued by the granter. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllowancesByGranterResponse is the response type for the + Query/AllowancesByGranter RPC method. default: description: An unexpected error response schema: @@ -31603,52 +29696,85 @@ paths: "value": "1.212s" } parameters: - - name: contract_id - description: contract id associated with the contract. + - name: granter in: path required: true type: string - - name: class_id - description: class id associated with the token class. - in: path - required: true + - name: pagination.key + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + in: query + required: false + type: string + format: byte + - name: pagination.offset + description: >- + offset is a numeric offset that can be used when key is unavailable. + + It is less efficient than using key. Only one of offset or key + should + + be set. + in: query + required: false + type: string + format: uint64 + - name: pagination.limit + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + in: query + required: false type: string + format: uint64 + - name: pagination.count_total + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in + UIs. + + count_total is only respected when offset is used. It is ignored + when key + + is set. + in: query + required: false + type: boolean + format: boolean + - name: pagination.reverse + description: >- + reverse is set to true if results are to be returned in the + descending order. + + + Since: cosmos-sdk 0.43 + in: query + required: false + type: boolean + format: boolean tags: - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}': + /cosmos/base/node/v1beta1/config: get: - summary: TokenType queries metadata of a token type. - operationId: TokenType + summary: Config queries for the operator configuration. + operationId: Config responses: '200': description: A successful response. schema: type: object properties: - token_type: - description: token type is the information of the token type. - type: object - properties: - contract_id: - type: string - description: contract id associated with the contract. - token_type: - type: string - description: >- - token type defines the unique identifier of the token - type. - - the format of the value is identical to that of class_id. - name: - type: string - description: name defines the human-readable name of the token type. - meta: - type: string - description: meta is a brief description of the token type. - title: 'Deprecated: use TokenClass' + minimum_gas_price: + type: string description: >- - QueryTokenTypeResponse is the response type for the - Query/TokenType RPC method. + ConfigResponse defines the response structure for the Config gRPC + query. default: description: An unexpected error response schema: @@ -31668,7970 +29794,1546 @@ paths: properties: type_url: type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + tags: + - Service +definitions: + cosmos.auth.v1beta1.Params: + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: Params defines the parameters for the auth module. + cosmos.auth.v1beta1.QueryAccountResponse: + type: object + properties: + account: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - The pack methods provided by protobuf library will by - default use + protocol buffer message. This string must contain at least - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + one "/" character. The last segment of the URL's path must + represent - methods only use the fully qualified type name after the - last '/' + the fully qualified name of the type (as in - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + `path/google.protobuf.Duration`). The name should be in a + canonical form - name "y.z". + (e.g., leading "." is not accepted). + In practice, teams usually precompile into the binary all types + that they - JSON + expect it to use in the context of Any. However, for URLs which + use the - ==== + scheme `http`, `https`, or no scheme, one can optionally set up a + type - The JSON representation of an `Any` value uses the regular + server that maps type URLs to message definitions as follows: - representation of the deserialized, embedded message, with - an - additional field `@type` which contains the type URL. - Example: + * If no scheme is provided, `https` is assumed. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Note: this functionality is not currently available in the + official - If the embedded message type is well-known and has a custom - JSON + protobuf release, and it is not used for type URLs beginning with - representation, that representation will be embedded adding - a field + type.googleapis.com. - `value` which holds the custom JSON in addition to the - `@type` - field. Example (for message [google.protobuf.Duration][]): + Schemes other than `http`, `https` (or the empty scheme) might be - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - - name: token_type - description: |- - token type associated with the token type. - refer to TokenType for the definition. - in: path - required: true - type: string - tags: - - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/burnt': - get: - summary: >- - NFTBurnt queries the number of burnt tokens from a given contract id and - token type. - operationId: NFTBurnt - responses: - '200': - description: A successful response. - schema: - type: object - properties: - burnt: - type: string - description: burnt is the amount of the burnt tokens. + used with implementation specific semantics. + value: + type: string + format: byte description: >- - QueryNFTBurntResponse is the response type for the Query/NFTBurnt - RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - protocol buffer message. This string must contain at - least + URL that describes the type of the serialized message. - one "/" character. The last segment of the URL's path - must represent - the fully qualified name of the type (as in + Protobuf library provides support to pack/unpack Any values in the + form - `path/google.protobuf.Duration`). The name should be in - a canonical form + of utility functions or additional generated methods of the Any type. - (e.g., leading "." is not accepted). + Example 1: Pack and unpack a message in C++. - In practice, teams usually precompile into the binary - all types that they + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - expect it to use in the context of Any. However, for - URLs which use the + Example 2: Pack and unpack a message in Java. - scheme `http`, `https`, or no scheme, one can optionally - set up a type + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - server that maps type URLs to message definitions as - follows: + Example 3: Pack and unpack a message in Python. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... - * If no scheme is provided, `https` is assumed. + Example 4: Pack and unpack a message in Go - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - Note: this functionality is not currently available in - the official + The pack methods provided by protobuf library will by default use - protobuf release, and it is not used for type URLs - beginning with + 'type.googleapis.com/full.type.name' as the type URL and the unpack - type.googleapis.com. + methods only use the fully qualified type name after the last '/' + in the type URL, for example "foo.bar.com/x/y.z" will yield type - Schemes other than `http`, `https` (or the empty scheme) - might be + name "y.z". - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - URL that describes the type of the serialized message. + JSON - Protobuf library provides support to pack/unpack Any values - in the form + ==== - of utility functions or additional generated methods of the - Any type. + The JSON representation of an `Any` value uses the regular + representation of the deserialized, embedded message, with an - Example 1: Pack and unpack a message in C++. + additional field `@type` which contains the type URL. Example: - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } - Example 2: Pack and unpack a message in Java. + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } + If the embedded message type is well-known and has a custom JSON - Example 3: Pack and unpack a message in Python. + representation, that representation will be embedded adding a field - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... + `value` which holds the custom JSON in addition to the `@type` - Example 4: Pack and unpack a message in Go + field. Example (for message [google.protobuf.Duration][]): - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryAccountResponse is the response type for the Query/Account RPC + method. + cosmos.auth.v1beta1.QueryAccountsResponse: + type: object + properties: + accounts: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - The pack methods provided by protobuf library will by - default use + protocol buffer message. This string must contain at least - 'type.googleapis.com/full.type.name' as the type URL and the - unpack + one "/" character. The last segment of the URL's path must + represent - methods only use the fully qualified type name after the - last '/' + the fully qualified name of the type (as in - in the type URL, for example "foo.bar.com/x/y.z" will yield - type + `path/google.protobuf.Duration`). The name should be in a + canonical form - name "y.z". + (e.g., leading "." is not accepted). + In practice, teams usually precompile into the binary all types + that they - JSON + expect it to use in the context of Any. However, for URLs which + use the - ==== + scheme `http`, `https`, or no scheme, one can optionally set up + a type - The JSON representation of an `Any` value uses the regular + server that maps type URLs to message definitions as follows: - representation of the deserialized, embedded message, with - an - additional field `@type` which contains the type URL. - Example: + * If no scheme is provided, `https` is assumed. - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } + Note: this functionality is not currently available in the + official - If the embedded message type is well-known and has a custom - JSON + protobuf release, and it is not used for type URLs beginning + with - representation, that representation will be embedded adding - a field + type.googleapis.com. - `value` which holds the custom JSON in addition to the - `@type` - field. Example (for message [google.protobuf.Duration][]): + Schemes other than `http`, `https` (or the empty scheme) might + be - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - - name: token_type - description: |- - token type associated with the token type. - refer to TokenType for the definition. - in: path - required: true - type: string - tags: - - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/minted': - get: - summary: >- - NFTMinted queries the number of minted tokens from a given contract id - and token type. - operationId: NFTMinted - responses: - '200': - description: A successful response. - schema: - type: object - properties: - minted: - type: string - description: minted is the amount of minted tokens. - description: >- - QueryNFTMintedResponse is the response type for the - Query/NFTMinted RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - - name: token_type - description: |- - token type associated with the token type. - refer to TokenType for the definition. - in: path - required: true - type: string - tags: - - Query - '/lbm/collection/v1/contracts/{contract_id}/token_types/{token_type}/supply': - get: - summary: >- - NFTSupply queries the number of tokens from a given contract id and - token type. - operationId: NFTSupply - responses: - '200': - description: A successful response. - schema: - type: object - properties: - supply: - type: string - description: supply is the supply of the non-fungible token. - description: >- - QueryNFTSupplyResponse is the response type for the - Query/NFTSupply RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - - name: token_type - description: |- - token type associated with the token type. - refer to TokenType for the definition. - in: path - required: true - type: string - tags: - - Query - '/lbm/collection/v1/contracts/{contract_id}/tokens/{token_id}': - get: - summary: Token queries a metadata of a token from its token id. - operationId: Token - responses: - '200': - description: A successful response. - schema: - type: object - properties: - token: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - QueryTokenResponse is the response type for the Query/Token RPC - method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: contract_id - description: contract id associated with the contract. - in: path - required: true - type: string - - name: token_id - description: token id associated with the fungible token. - in: path - required: true - type: string - tags: - - Query - '/cosmos/feegrant/v1beta1/allowance/{granter}/{grantee}': - get: - summary: Allowance returns fee granted to the grantee by the granter. - operationId: Allowance - responses: - '200': - description: A successful response. - schema: - type: object - properties: - allowance: - description: allowance is a allowance granted for grantee by granter. - type: object - properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance - of their funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an - allowance of another user's funds. - allowance: - description: allowance can be any of basic and filtered fee allowance. - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type - of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - title: >- - Grant is stored in the KVStore to record a grant with full - context - description: >- - QueryAllowanceResponse is the response type for the - Query/Allowance RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: granter - description: >- - granter is the address of the user granting an allowance of their - funds. - in: path - required: true - type: string - - name: grantee - description: >- - grantee is the address of the user being granted an allowance of - another user's funds. - in: path - required: true - type: string - tags: - - Query - '/cosmos/feegrant/v1beta1/allowances/{grantee}': - get: - summary: Allowances returns all the grants for address. - operationId: Allowances - responses: - '200': - description: A successful response. - schema: - type: object - properties: - allowances: - type: array - items: - type: object - properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance - of their funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an - allowance of another user's funds. - allowance: - description: >- - allowance can be any of basic and filtered fee - allowance. - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - title: >- - Grant is stored in the KVStore to record a grant with full - context - description: allowances are allowance's granted for grantee by granter. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryAllowancesResponse is the response type for the - Query/Allowances RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: grantee - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean - tags: - - Query - '/cosmos/feegrant/v1beta1/issued/{granter}': - get: - summary: |- - AllowancesByGranter returns all the grants given by an address - Since v0.46 - operationId: AllowancesByGranter - responses: - '200': - description: A successful response. - schema: - type: object - properties: - allowances: - type: array - items: - type: object - properties: - granter: - type: string - description: >- - granter is the address of the user granting an allowance - of their funds. - grantee: - type: string - description: >- - grantee is the address of the user being granted an - allowance of another user's funds. - allowance: - description: >- - allowance can be any of basic and filtered fee - allowance. - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the - type of the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's - path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be - in a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the - binary all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can - optionally set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results - based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available - in the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty - scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the - above specified type. - title: >- - Grant is stored in the KVStore to record a grant with full - context - description: allowances that have been issued by the granter. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryAllowancesByGranterResponse is the response type for the - Query/AllowancesByGranter RPC method. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: granter - in: path - required: true - type: string - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean - tags: - - Query - /cosmos/base/node/v1beta1/config: - get: - summary: Config queries for the operator configuration. - operationId: Config - responses: - '200': - description: A successful response. - schema: - type: object - properties: - minimum_gas_price: - type: string - description: >- - ConfigResponse defines the response structure for the Config gRPC - query. - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - value: - type: string - format: byte - tags: - - Service - '/lbm/tx/v1beta1/txs/block/{height}': - get: - summary: GetBlockWithTxs fetches a block with decoded txs. - description: 'Since: finschia-sdk 0.47.0' - operationId: GetBlockWithTxs2 - responses: - '200': - description: A successful response. - schema: - $ref: '#/definitions/lbm.tx.v1beta1.GetBlockWithTxsResponse' - default: - description: An unexpected error response - schema: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of - the serialized - - protocol buffer message. This string must contain at - least - - one "/" character. The last segment of the URL's path - must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in - a canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary - all types that they - - expect it to use in the context of Any. However, for - URLs which use the - - scheme `http`, `https`, or no scheme, one can optionally - set up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based - on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in - the official - - protobuf release, and it is not used for type URLs - beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer - message along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values - in the form - - of utility functions or additional generated methods of the - Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by - default use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the - last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield - type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with - an - - additional field `@type` which contains the type URL. - Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom - JSON - - representation, that representation will be embedded adding - a field - - `value` which holds the custom JSON in addition to the - `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - parameters: - - name: height - description: height is the height of the block to query. - in: path - required: true - type: string - format: int64 - - name: pagination.key - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - in: query - required: false - type: string - format: byte - - name: pagination.offset - description: >- - offset is a numeric offset that can be used when key is unavailable. - - It is less efficient than using key. Only one of offset or key - should - - be set. - in: query - required: false - type: string - format: uint64 - - name: pagination.limit - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - in: query - required: false - type: string - format: uint64 - - name: pagination.count_total - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in - UIs. - - count_total is only respected when offset is used. It is ignored - when key - - is set. - in: query - required: false - type: boolean - format: boolean - - name: pagination.reverse - description: >- - reverse is set to true if results are to be returned in the - descending order. - - - Since: cosmos-sdk 0.43 - in: query - required: false - type: boolean - format: boolean - tags: - - Service -definitions: - cosmos.auth.v1beta1.Params: - type: object - properties: - max_memo_characters: - type: string - format: uint64 - tx_sig_limit: - type: string - format: uint64 - tx_size_cost_per_byte: - type: string - format: uint64 - sig_verify_cost_ed25519: - type: string - format: uint64 - sig_verify_cost_secp256k1: - type: string - format: uint64 - description: Params defines the parameters for the auth module. - cosmos.auth.v1beta1.QueryAccountResponse: - type: object - properties: - account: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - QueryAccountResponse is the response type for the Query/Account RPC - method. - cosmos.auth.v1beta1.QueryAccountsResponse: - type: object - properties: - accounts: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up - a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: accounts are the existing accounts - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryAccountsResponse is the response type for the Query/Accounts RPC - method. - - - Since: cosmos-sdk 0.43 - cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: - type: object - properties: - account: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - description: >- - QueryModuleAccountByNameResponse is the response type for the - Query/ModuleAccountByName RPC method. - cosmos.auth.v1beta1.QueryNextAccountNumberResponse: - type: object - properties: - next_account_number: - type: string - format: uint64 - description: The next account number is the next value of global account number. - description: >- - QueryNextAccountNumberResponse is the response for the - Query/NextAccountNumber. - cosmos.auth.v1beta1.QueryParamsResponse: - type: object - properties: - params: - description: params defines the parameters of the module. - type: object - properties: - max_memo_characters: - type: string - format: uint64 - tx_sig_limit: - type: string - format: uint64 - tx_size_cost_per_byte: - type: string - format: uint64 - sig_verify_cost_ed25519: - type: string - format: uint64 - sig_verify_cost_secp256k1: - type: string - format: uint64 - description: QueryParamsResponse is the response type for the Query/Params RPC method. - cosmos.base.query.v1beta1.PageRequest: - type: object - properties: - key: - type: string - format: byte - description: |- - key is a value returned in PageResponse.next_key to begin - querying the next page most efficiently. Only one of offset or key - should be set. - offset: - type: string - format: uint64 - description: |- - offset is a numeric offset that can be used when key is unavailable. - It is less efficient than using key. Only one of offset or key should - be set. - limit: - type: string - format: uint64 - description: >- - limit is the total number of results to be returned in the result - page. - - If left empty it will default to a value to be set by each app. - count_total: - type: boolean - format: boolean - description: >- - count_total is set to true to indicate that the result set should - include - - a count of the total number of items available for pagination in UIs. - - count_total is only respected when offset is used. It is ignored when - key - - is set. - reverse: - type: boolean - format: boolean - description: >- - reverse is set to true if results are to be returned in the descending - order. - - - Since: cosmos-sdk 0.43 - description: |- - message SomeRequest { - Foo some_parameter = 1; - PageRequest pagination = 2; - } - title: |- - PageRequest is to be embedded in gRPC request messages for efficient - pagination. Ex: - cosmos.base.query.v1beta1.PageResponse: - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: |- - total is total number of results available if PageRequest.count_total - was set, its value is undefined otherwise - description: |- - PageResponse is to be embedded in gRPC response messages where the - corresponding request message has used PageRequest. - - message SomeResponse { - repeated Bar results = 1; - PageResponse page = 2; - } - google.protobuf.Any: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a canonical - form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types that - they - - expect it to use in the context of Any. However, for URLs which use - the - - scheme `http`, `https`, or no scheme, one can optionally set up a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along with - a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - grpc.gateway.runtime.Error: - type: object - properties: - error: - type: string - code: - type: integer - format: int32 - message: - type: string - details: - type: array - items: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up - a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - cosmos.bank.v1beta1.DenomUnit: - type: object - properties: - denom: - type: string - description: denom represents the string name of the given denom unit (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must - - raise the base_denom to in order to equal the given DenomUnit's denom - - 1 denom = 1^exponent base_denom - - (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' - with - - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - cosmos.bank.v1beta1.Metadata: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit (e.g - uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must - - raise the base_denom to in order to equal the given DenomUnit's - denom - - 1 denom = 1^exponent base_denom - - (e.g. with a base_denom of uatom, one can create a DenomUnit of - 'atom' with - - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with exponent - = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: ATOM). This - can - - be the same as the display. - - - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - cosmos.bank.v1beta1.Params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is - - sendable). - default_send_enabled: - type: boolean - format: boolean - description: Params defines the parameters for the bank module. - cosmos.bank.v1beta1.QueryAllBalancesResponse: - type: object - properties: - balances: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: balances is the balances of all the coins. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryAllBalancesResponse is the response type for the Query/AllBalances - RPC - - method. - cosmos.bank.v1beta1.QueryBalanceResponse: - type: object - properties: - balance: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QueryBalanceResponse is the response type for the Query/Balance RPC - method. - cosmos.bank.v1beta1.QueryDenomMetadataResponse: - type: object - properties: - metadata: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must - - raise the base_denom to in order to equal the given - DenomUnit's denom - - 1 denom = 1^exponent base_denom - - (e.g. with a base_denom of uatom, one can create a DenomUnit - of 'atom' with - - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: ATOM). - This can - - be the same as the display. - - - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - QueryDenomMetadataResponse is the response type for the - Query/DenomMetadata RPC - - method. - cosmos.bank.v1beta1.QueryDenomsMetadataResponse: - type: object - properties: - metadatas: - type: array - items: - type: object - properties: - description: - type: string - denom_units: - type: array - items: - type: object - properties: - denom: - type: string - description: >- - denom represents the string name of the given denom unit - (e.g uatom). - exponent: - type: integer - format: int64 - description: >- - exponent represents power of 10 exponent that one must - - raise the base_denom to in order to equal the given - DenomUnit's denom - - 1 denom = 1^exponent base_denom - - (e.g. with a base_denom of uatom, one can create a - DenomUnit of 'atom' with - - exponent = 6, thus: 1 atom = 10^6 uatom). - aliases: - type: array - items: - type: string - title: aliases is a list of string aliases for the given denom - description: |- - DenomUnit represents a struct that describes a given - denomination unit of the basic token. - title: denom_units represents the list of DenomUnit's for a given coin - base: - type: string - description: >- - base represents the base denom (should be the DenomUnit with - exponent = 0). - display: - type: string - description: |- - display indicates the suggested denom that should be - displayed in clients. - name: - type: string - description: 'Since: cosmos-sdk 0.43' - title: 'name defines the name of the token (eg: Cosmos Atom)' - symbol: - type: string - description: >- - symbol is the token symbol usually shown on exchanges (eg: - ATOM). This can - - be the same as the display. - - - Since: cosmos-sdk 0.43 - description: |- - Metadata represents a struct that describes - a basic token. - description: >- - metadata provides the client information for all the registered - tokens. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryDenomsMetadataResponse is the response type for the - Query/DenomsMetadata RPC - - method. - cosmos.bank.v1beta1.QueryParamsResponse: - type: object - properties: - params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean - description: >- - SendEnabled maps coin denom to a send_enabled status (whether a - denom is - - sendable). - default_send_enabled: - type: boolean - format: boolean - description: Params defines the parameters for the bank module. - description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. - cosmos.bank.v1beta1.QuerySpendableBalancesResponse: - type: object - properties: - balances: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: balances is the spendable balances of all the coins. - pagination: - description: pagination defines the pagination in the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QuerySpendableBalancesResponse defines the gRPC response structure for - querying - - an account's spendable balances. - cosmos.bank.v1beta1.QuerySupplyOfResponse: - type: object - properties: - amount: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - description: >- - QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC - method. - cosmos.bank.v1beta1.QueryTotalSupplyResponse: - type: object - properties: - supply: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - title: supply is the supply of the coins - pagination: - description: |- - pagination defines the pagination in the response. - - Since: cosmos-sdk 0.43 - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - title: >- - QueryTotalSupplyResponse is the response type for the Query/TotalSupply - RPC - - method - cosmos.bank.v1beta1.SendEnabled: - type: object - properties: - denom: - type: string - enabled: - type: boolean - format: boolean - description: |- - SendEnabled maps coin denom to a send_enabled status (whether a denom is - sendable). - cosmos.base.v1beta1.Coin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. - - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - lbm.base.ostracon.v1.GetBlockByHashResponse: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - entropy: - title: '*** Ostracon Extended Fields ***' - type: object - properties: - round: - type: integer - format: int32 - proof: - type: string - format: byte - description: >- - GetBlockByHashResponse is the response type for the Query/GetBlockByHash - RPC method. - lbm.base.ostracon.v1.GetBlockByHeightResponse: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - entropy: - title: '*** Ostracon Extended Fields ***' - type: object - properties: - round: - type: integer - format: int32 - proof: - type: string - format: byte - description: >- - GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. - lbm.base.ostracon.v1.GetBlockResultsByHeightResponse: - type: object - properties: - height: - type: string - format: int64 - txs_results: - type: array - items: - type: object - properties: - code: - type: integer - format: int64 - data: - type: string - format: byte - log: - type: string - info: - type: string - gas_wanted: - type: string - format: int64 - gas_used: - type: string - format: int64 - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, associated - with an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. - - Later, transactions may be queried using these events. - codespace: - type: string - res_begin_block: - type: object - properties: - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, associated with - an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. - - Later, transactions may be queried using these events. - res_end_block: - type: object - properties: - validator_updates: - type: array - items: - type: object - properties: - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - power: - type: string - format: int64 - title: ValidatorUpdate - consensus_param_updates: - type: object - properties: - block: - type: object - properties: - max_bytes: - type: string - format: int64 - title: 'Note: must be greater than 0' - max_gas: - type: string - format: int64 - title: 'Note: must be greater or equal to -1' - description: BlockParams contains limits on the block size. - evidence: - type: object - properties: - max_age_num_blocks: - type: string - format: int64 - description: >- - Max age of evidence, in blocks. - - - The basic formula for calculating this is: MaxAgeDuration - / {average block - - time}. - max_age_duration: - type: string - description: >- - Max age of evidence, in time. - - - It should correspond with an app's "unbonding period" or - other similar - - mechanism for handling [Nothing-At-Stake - - attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - max_bytes: - type: string - format: int64 - title: >- - This sets the maximum size of total evidence in bytes that - can be committed in a single block. - - and should fall comfortably under the max block bytes. - - Default is 1048576 or 1MB - description: >- - EvidenceParams determine how we handle evidence of - malfeasance. - validator: - type: object - properties: - pub_key_types: - type: array - items: - type: string - description: >- - ValidatorParams restrict the public key types validators can - use. - - NOTE: uses ABCI pubkey naming, not Amino names. - version: - type: object - properties: - app_version: - type: string - format: uint64 - description: VersionParams contains the ABCI application version. - title: |- - ConsensusParams contains all consensus-relevant parameters - that can be adjusted by the abci app - events: - type: array - items: - type: object - properties: - type: - type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, associated with - an event. - description: >- - Event allows application developers to attach additional - information to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. - - Later, transactions may be queried using these events. - description: >- - GetBlockResultsByHeightResponse is the response type for the - Query/GetBlockResultsByHeight RPC method. - lbm.base.ostracon.v1.GetLatestBlockResponse: - type: object - properties: - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - entropy: - title: '*** Ostracon Extended Fields ***' - type: object - properties: - round: - type: integer - format: int32 - proof: - type: string - format: byte - description: >- - GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC method. - lbm.base.ostracon.v1.GetLatestValidatorSetResponse: - type: object - properties: - block_height: - type: string - format: int64 - validators: - type: array - items: - type: object - properties: - address: - type: string - pub_key: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - GetLatestValidatorSetResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - lbm.base.ostracon.v1.GetNodeInfoResponse: - type: object - properties: - default_node_info: - type: object - properties: - protocol_version: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: - type: string - format: byte - moniker: - type: string - other: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - application_version: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - lbm_sdk_version: - type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. - description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC - method. - lbm.base.ostracon.v1.GetSyncingResponse: - type: object - properties: - syncing: - type: boolean - format: boolean - description: >- - GetSyncingResponse is the response type for the Query/GetSyncing RPC - method. - lbm.base.ostracon.v1.GetValidatorSetByHeightResponse: - type: object - properties: - block_height: - type: string - format: int64 - validators: - type: array - items: - type: object - properties: - address: - type: string - pub_key: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - GetValidatorSetByHeightResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - lbm.base.ostracon.v1.Module: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - lbm.base.ostracon.v1.Validator: - type: object - properties: - address: - type: string - pub_key: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - lbm.base.ostracon.v1.VersionInfo: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - lbm_sdk_version: - type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. - ostracon.types.Block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: + used with implementation specific semantics. + value: type: string format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for - processing a block in the blockchain, - - including all blockchain data structures and - the rules of the application's + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block was - committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: accounts are the existing accounts + pagination: + description: pagination defines the pagination in the response. type: object properties: - height: + next_key: type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - entropy: - title: '*** Ostracon Extended Fields ***' + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAccountsResponse is the response type for the Query/Accounts RPC + method. + + + Since: cosmos-sdk 0.43 + cosmos.auth.v1beta1.QueryModuleAccountByNameResponse: + type: object + properties: + account: type: object properties: - round: - type: integer - format: int32 - proof: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: type: string format: byte - ostracon.types.Entropy: + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + description: >- + QueryModuleAccountByNameResponse is the response type for the + Query/ModuleAccountByName RPC method. + cosmos.auth.v1beta1.QueryNextAccountNumberResponse: type: object properties: - round: - type: integer - format: int32 - proof: + next_account_number: + type: string + format: uint64 + description: The next account number is the next value of global account number. + description: >- + QueryNextAccountNumberResponse is the response for the + Query/NextAccountNumber. + cosmos.auth.v1beta1.QueryParamsResponse: + type: object + properties: + params: + description: params defines the parameters of the module. + type: object + properties: + max_memo_characters: + type: string + format: uint64 + tx_sig_limit: + type: string + format: uint64 + tx_size_cost_per_byte: + type: string + format: uint64 + sig_verify_cost_ed25519: + type: string + format: uint64 + sig_verify_cost_secp256k1: + type: string + format: uint64 + description: QueryParamsResponse is the response type for the Query/Params RPC method. + cosmos.base.query.v1beta1.PageRequest: + type: object + properties: + key: type: string format: byte - title: >- - Entropy represents height-specific complexity and used in - proposer-election. + description: |- + key is a value returned in PageResponse.next_key to begin + querying the next page most efficiently. Only one of offset or key + should be set. + offset: + type: string + format: uint64 + description: |- + offset is a numeric offset that can be used when key is unavailable. + It is less efficient than using key. Only one of offset or key should + be set. + limit: + type: string + format: uint64 + description: >- + limit is the total number of results to be returned in the result + page. + + If left empty it will default to a value to be set by each app. + count_total: + type: boolean + format: boolean + description: >- + count_total is set to true to indicate that the result set should + include + + a count of the total number of items available for pagination in UIs. + + count_total is only respected when offset is used. It is ignored when + key + + is set. + reverse: + type: boolean + format: boolean + description: >- + reverse is set to true if results are to be returned in the descending + order. + + + Since: cosmos-sdk 0.43 + description: |- + message SomeRequest { + Foo some_parameter = 1; + PageRequest pagination = 2; + } + title: |- + PageRequest is to be embedded in gRPC request messages for efficient + pagination. Ex: + cosmos.base.query.v1beta1.PageResponse: + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: |- + total is total number of results available if PageRequest.count_total + was set, its value is undefined otherwise + description: |- + PageResponse is to be embedded in gRPC response messages where the + corresponding request message has used PageRequest. + + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + google.protobuf.Any: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a canonical + form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types that + they + + expect it to use in the context of Any. However, for URLs which use + the + + scheme `http`, `https`, or no scheme, one can optionally set up a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along with + a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. - Entropy contains vrf proof and generated round. The relationship of each - field is as follows. + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } - Entropy.proof = VRFProof(last_proof_hash, current_height, Entropy.round) - tendermint.abci.BlockParams: - type: object - properties: - max_bytes: - type: string - format: int64 - title: 'Note: must be greater than 0' - max_gas: - type: string - format: int64 - title: 'Note: must be greater or equal to -1' - description: BlockParams contains limits on the block size. - tendermint.abci.ConsensusParams: - type: object - properties: - block: - type: object - properties: - max_bytes: - type: string - format: int64 - title: 'Note: must be greater than 0' - max_gas: - type: string - format: int64 - title: 'Note: must be greater or equal to -1' - description: BlockParams contains limits on the block size. - evidence: - type: object - properties: - max_age_num_blocks: - type: string - format: int64 - description: >- - Max age of evidence, in blocks. + Example 2: Pack and unpack a message in Java. + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } - The basic formula for calculating this is: MaxAgeDuration / - {average block + Example 3: Pack and unpack a message in Python. - time}. - max_age_duration: - type: string - description: >- - Max age of evidence, in time. + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + Example 4: Pack and unpack a message in Go - It should correspond with an app's "unbonding period" or other - similar + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } - mechanism for handling [Nothing-At-Stake + The pack methods provided by protobuf library will by default use - attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - max_bytes: - type: string - format: int64 - title: >- - This sets the maximum size of total evidence in bytes that can be - committed in a single block. + 'type.googleapis.com/full.type.name' as the type URL and the unpack - and should fall comfortably under the max block bytes. + methods only use the fully qualified type name after the last '/' - Default is 1048576 or 1MB - description: EvidenceParams determine how we handle evidence of malfeasance. - validator: - type: object - properties: - pub_key_types: - type: array - items: - type: string - description: |- - ValidatorParams restrict the public key types validators can use. - NOTE: uses ABCI pubkey naming, not Amino names. - version: - type: object - properties: - app_version: - type: string - format: uint64 - description: VersionParams contains the ABCI application version. - title: |- - ConsensusParams contains all consensus-relevant parameters - that can be adjusted by the abci app - tendermint.abci.Event: + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + grpc.gateway.runtime.Error: type: object properties: - type: + error: type: string - attributes: + code: + type: integer + format: int32 + message: + type: string + details: type: array items: type: object properties: - key: + type_url: type: string - format: byte + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. value: type: string format: byte - index: - type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' - description: >- - Event allows application developers to attach additional information to + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + URL that describes the type of the serialized message. - Later, transactions may be queried using these events. - tendermint.abci.EventAttribute: + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + cosmos.bank.v1beta1.DenomUnit: type: object properties: - key: - type: string - format: byte - value: + denom: type: string - format: byte - index: - type: boolean - format: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' - tendermint.abci.ResponseBeginBlock: + description: denom represents the string name of the given denom unit (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must + + raise the base_denom to in order to equal the given DenomUnit's denom + + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of 'atom' + with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + cosmos.bank.v1beta1.Metadata: type: object properties: - events: + description: + type: string + denom_units: type: array items: type: object properties: - type: + denom: type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, associated with an - event. - description: >- - Event allows application developers to attach additional information - to + description: >- + denom represents the string name of the given denom unit (e.g + uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + raise the base_denom to in order to equal the given DenomUnit's + denom - Later, transactions may be queried using these events. - tendermint.abci.ResponseDeliverTx: - type: object - properties: - code: - type: integer - format: int64 - data: - type: string - format: byte - log: + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a DenomUnit of + 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: type: string - info: + description: >- + base represents the base denom (should be the DenomUnit with exponent + = 0). + display: type: string - gas_wanted: + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: type: string - format: int64 - gas_used: + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: type: string - format: int64 - events: + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). This + can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + cosmos.bank.v1beta1.Params: + type: object + properties: + send_enabled: type: array items: type: object properties: - type: + denom: type: string - attributes: - type: array - items: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, associated with an - event. + enabled: + type: boolean + format: boolean description: >- - Event allows application developers to attach additional information - to - - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + SendEnabled maps coin denom to a send_enabled status (whether a + denom is - Later, transactions may be queried using these events. - codespace: - type: string - tendermint.abci.ResponseEndBlock: + sendable). + default_send_enabled: + type: boolean + format: boolean + description: Params defines the parameters for the bank module. + cosmos.bank.v1beta1.QueryAllBalancesResponse: type: object properties: - validator_updates: + balances: type: array items: type: object properties: - pub_key: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the balances of all the coins. + pagination: + description: pagination defines the pagination in the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryAllBalancesResponse is the response type for the Query/AllBalances + RPC + + method. + cosmos.bank.v1beta1.QueryBalanceResponse: + type: object + properties: + balance: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QueryBalanceResponse is the response type for the Query/Balance RPC + method. + cosmos.bank.v1beta1.QueryDenomMetadataResponse: + type: object + properties: + metadata: + type: object + properties: + description: + type: string + denom_units: + type: array + items: type: object properties: - ed25519: - type: string - format: byte - secp256k1: + denom: type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - power: - type: string - format: int64 - title: ValidatorUpdate - consensus_param_updates: - type: object - properties: - block: - type: object - properties: - max_bytes: - type: string - format: int64 - title: 'Note: must be greater than 0' - max_gas: - type: string - format: int64 - title: 'Note: must be greater or equal to -1' - description: BlockParams contains limits on the block size. - evidence: - type: object - properties: - max_age_num_blocks: - type: string - format: int64 - description: >- - Max age of evidence, in blocks. - + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must - The basic formula for calculating this is: MaxAgeDuration / - {average block + raise the base_denom to in order to equal the given + DenomUnit's denom - time}. - max_age_duration: - type: string - description: >- - Max age of evidence, in time. + 1 denom = 1^exponent base_denom + (e.g. with a base_denom of uatom, one can create a DenomUnit + of 'atom' with - It should correspond with an app's "unbonding period" or other - similar + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: ATOM). + This can - mechanism for handling [Nothing-At-Stake + be the same as the display. - attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - max_bytes: - type: string - format: int64 - title: >- - This sets the maximum size of total evidence in bytes that can - be committed in a single block. - and should fall comfortably under the max block bytes. + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC - Default is 1048576 or 1MB - description: EvidenceParams determine how we handle evidence of malfeasance. - validator: - type: object - properties: - pub_key_types: - type: array - items: - type: string - description: |- - ValidatorParams restrict the public key types validators can use. - NOTE: uses ABCI pubkey naming, not Amino names. - version: - type: object - properties: - app_version: - type: string - format: uint64 - description: VersionParams contains the ABCI application version. - title: |- - ConsensusParams contains all consensus-relevant parameters - that can be adjusted by the abci app - events: + method. + cosmos.bank.v1beta1.QueryDenomsMetadataResponse: + type: object + properties: + metadatas: type: array items: type: object properties: - type: + description: type: string - attributes: + denom_units: type: array items: type: object properties: - key: - type: string - format: byte - value: + denom: type: string - format: byte - index: - type: boolean - format: boolean - description: >- - EventAttribute is a single key-value pair, associated with an - event. - description: >- - Event allows application developers to attach additional information - to + description: >- + denom represents the string name of the given denom unit + (e.g uatom). + exponent: + type: integer + format: int64 + description: >- + exponent represents power of 10 exponent that one must - ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and - ResponseDeliverTx. + raise the base_denom to in order to equal the given + DenomUnit's denom - Later, transactions may be queried using these events. - tendermint.abci.ValidatorUpdate: - type: object - properties: - pub_key: + 1 denom = 1^exponent base_denom + + (e.g. with a base_denom of uatom, one can create a + DenomUnit of 'atom' with + + exponent = 6, thus: 1 atom = 10^6 uatom). + aliases: + type: array + items: + type: string + title: aliases is a list of string aliases for the given denom + description: |- + DenomUnit represents a struct that describes a given + denomination unit of the basic token. + title: denom_units represents the list of DenomUnit's for a given coin + base: + type: string + description: >- + base represents the base denom (should be the DenomUnit with + exponent = 0). + display: + type: string + description: |- + display indicates the suggested denom that should be + displayed in clients. + name: + type: string + description: 'Since: cosmos-sdk 0.43' + title: 'name defines the name of the token (eg: Cosmos Atom)' + symbol: + type: string + description: >- + symbol is the token symbol usually shown on exchanges (eg: + ATOM). This can + + be the same as the display. + + + Since: cosmos-sdk 0.43 + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + metadata provides the client information for all the registered + tokens. + pagination: + description: pagination defines the pagination in the response. type: object properties: - ed25519: + next_key: type: string format: byte - secp256k1: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - power: - type: string - format: int64 - title: ValidatorUpdate - tendermint.crypto.PublicKey: + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QueryDenomsMetadataResponse is the response type for the + Query/DenomsMetadata RPC + + method. + cosmos.bank.v1beta1.QueryParamsResponse: type: object properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: PublicKey defines the keys available for use with Tendermint Validators - tendermint.p2p.DefaultNodeInfo: + params: + type: object + properties: + send_enabled: + type: array + items: + type: object + properties: + denom: + type: string + enabled: + type: boolean + format: boolean + description: >- + SendEnabled maps coin denom to a send_enabled status (whether a + denom is + + sendable). + default_send_enabled: + type: boolean + format: boolean + description: Params defines the parameters for the bank module. + description: >- + QueryParamsResponse defines the response type for querying x/bank + parameters. + cosmos.bank.v1beta1.QuerySpendableBalancesResponse: type: object properties: - protocol_version: + balances: + type: array + items: + type: object + properties: + denom: + type: string + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: balances is the spendable balances of all the coins. + pagination: + description: pagination defines the pagination in the response. type: object properties: - p2p: - type: string - format: uint64 - block: + next_key: type: string - format: uint64 - app: + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: - type: string - format: byte - moniker: - type: string - other: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - tendermint.p2p.DefaultNodeInfoOther: - type: object - properties: - tx_index: - type: string - rpc_address: - type: string - tendermint.p2p.ProtocolVersion: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - tendermint.types.BlockID: + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + QuerySpendableBalancesResponse defines the gRPC response structure for + querying + + an account's spendable balances. + cosmos.bank.v1beta1.QuerySupplyOfResponse: type: object properties: - hash: - type: string - format: byte - part_set_header: + amount: type: object properties: - total: - type: integer - format: int64 - hash: + denom: type: string - format: byte - title: PartsetHeader - title: BlockID - tendermint.types.BlockIDFlag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - tendermint.types.Commit: + amount: + type: string + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + description: >- + QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC + method. + cosmos.bank.v1beta1.QueryTotalSupplyResponse: type: object properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: + supply: type: array items: type: object properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: + denom: type: string - format: date-time - signature: + amount: type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.CommitSig: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - tendermint.types.Data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the order - first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - tendermint.types.DuplicateVoteEvidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. + description: |- + Coin defines a token with a denomination and an amount. - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from validators - for + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + title: supply is the supply of the coins + pagination: + description: |- + pagination defines the pagination in the response. - consensus. - vote_b: + Since: cosmos-sdk 0.43 type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: + next_key: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from validators - for + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total - consensus. - total_voting_power: + was set, its value is undefined otherwise + title: >- + QueryTotalSupplyResponse is the response type for the Query/TotalSupply + RPC + + method + cosmos.bank.v1beta1.SendEnabled: + type: object + properties: + denom: type: string - format: int64 - validator_power: + enabled: + type: boolean + format: boolean + description: |- + SendEnabled maps coin denom to a send_enabled status (whether a denom is + sendable). + cosmos.base.v1beta1.Coin: + type: object + properties: + denom: type: string - format: int64 - timestamp: + amount: type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator signed two - conflicting votes. - tendermint.types.Evidence: + description: |- + Coin defines a token with a denomination and an amount. + + NOTE: The amount field is an Int which implements the custom method + signatures required by gogoproto. + cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: type: object properties: - duplicate_vote_evidence: + block_id: type: object properties: - vote_a: + hash: + type: string + format: byte + part_set_header: type: object properties: - type: + total: + type: integer + format: int64 + hash: type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. + format: byte + title: PartsetHeader + title: BlockID + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string height: type: string format: int64 - round: - type: integer - format: int32 - block_id: + time: + type: string + format: date-time + last_block_id: type: object properties: hash: @@ -39648,39 +31350,435 @@ definitions: format: byte title: PartsetHeader title: BlockID - timestamp: + last_commit_hash: type: string - format: date-time - validator_address: + format: byte + title: hashes of block data + data_hash: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + validators_hash: type: string format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. - consensus. - vote_b: + NOTE: not all txs here are valid. We're just agreeing on the + order first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules + for processing a block in the + blockchain, + + including all blockchain data structures + and the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block + was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 @@ -39704,448 +31802,187 @@ definitions: format: byte title: PartsetHeader title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator signed two - conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing - a block in the blockchain, - - including all blockchain data structures and the rules - of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. - description: >- - Commit contains the evidence that a block was committed by - a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of validators - attempting to mislead a light client. - tendermint.types.EvidenceList: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: + signatures: + type: array + items: type: object properties: - type: + block_id_flag: type: string enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for validator_address: type: string format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID timestamp: type: string format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 signature: type: string format: byte - description: >- - Vote represents a prevote, precommit, or commit vote from - validators for + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set + of validators. + description: >- + GetBlockByHeightResponse is the response type for the + Query/GetBlockByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + type: object + properties: + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + block: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator signed - two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the + order first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: + evidence: + type: array + items: type: object properties: - signed_header: + duplicate_vote_evidence: type: object properties: - header: + vote_a: type: object properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN description: >- - Consensus captures the consensus rules for - processing a block in the blockchain, - - including all blockchain data structures and the - rules of the application's + SignedMsgType is a type of signed message in the + consensus. - state transition machine. - chain_id: - type: string + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 - time: - type: string - format: date-time - last_block_id: + round: + type: integer + format: int32 + block_id: type: object properties: hash: @@ -40162,42 +31999,40 @@ definitions: format: byte title: PartsetHeader title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: + timestamp: type: string - format: byte - evidence_hash: + format: date-time + validator_address: type: string format: byte - title: consensus info - proposer_address: + validator_index: + type: integer + format: int32 + signature: type: string format: byte description: >- - Header defines the structure of a Tendermint block - header. - commit: + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + vote_b: type: object properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 @@ -40221,41 +32056,243 @@ definitions: format: byte title: PartsetHeader title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included in a - Commit. + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte description: >- - Commit contains the evidence that a block was - committed by a set of validators. - validator_set: + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: type: object properties: - validators: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules + for processing a block in the + blockchain, + + including all blockchain data structures + and the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block + was committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: type: array items: type: object @@ -40265,284 +32302,32 @@ definitions: format: byte pub_key: type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 total_voting_power: type: string format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - tendermint.types.EvidenceParams: - type: object - properties: - max_age_num_blocks: - type: string - format: int64 - description: >- - Max age of evidence, in blocks. - - - The basic formula for calculating this is: MaxAgeDuration / {average - block - - time}. - max_age_duration: - type: string - description: >- - Max age of evidence, in time. - - - It should correspond with an app's "unbonding period" or other similar - - mechanism for handling [Nothing-At-Stake - - attacks](https://github.com/ethereum/wiki/wiki/Proof-of-Stake-FAQ#what-is-the-nothing-at-stake-problem-and-how-can-it-be-fixed). - max_bytes: - type: string - format: int64 - title: >- - This sets the maximum size of total evidence in bytes that can be - committed in a single block. - - and should fall comfortably under the max block bytes. - - Default is 1048576 or 1MB - description: EvidenceParams determine how we handle evidence of malfeasance. - tendermint.types.Header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - tendermint.types.LightBlock: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: type: object properties: height: @@ -40595,1175 +32380,1357 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - tendermint.types.LightClientAttackEvidence: + description: >- + GetLatestBlockResponse is the response type for the Query/GetLatestBlock + RPC method. + cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: type: object properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a - block in the blockchain, - - including all blockchain data structures and the rules of - the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the signature is - for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a - set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: + block_height: type: string format: int64 - byzantine_validators: + validators: type: array items: type: object properties: address: type: string - format: byte pub_key: type: object properties: - ed25519: + type_url: type: string - format: byte - secp256k1: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } voting_power: type: string format: int64 proposer_priority: type: string format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise description: >- - LightClientAttackEvidence contains evidence of a set of validators - attempting to mislead a light client. - tendermint.types.PartSetHeader: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - tendermint.types.SignedHeader: + GetLatestValidatorSetResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: type: object properties: - header: + default_node_info: type: object properties: - version: - title: basic block info + protocol_version: type: object properties: + p2p: + type: string + format: uint64 block: type: string format: uint64 app: type: string format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in - the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: + default_node_id: type: string - format: int64 - time: + listen_addr: type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: + network: type: string - format: byte - title: hashes of block data - data_hash: + version: type: string - format: byte - validators_hash: + channels: type: string format: byte - title: hashes from the app output from the prev block - next_validators_hash: + moniker: type: string - format: byte - consensus_hash: + other: + type: object + properties: + tx_index: + type: string + rpc_address: + type: string + application_version: + type: object + properties: + name: type: string - format: byte - app_hash: + app_name: type: string - format: byte - last_results_hash: + version: type: string - format: byte - evidence_hash: + git_commit: type: string - format: byte - title: consensus info - proposer_address: + build_tags: type: string - format: byte - description: Header defines the structure of a Tendermint block header. - commit: - type: object - properties: - height: + go_version: type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: + build_deps: type: array items: type: object properties: - block_id_flag: + path: type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: + title: module path + version: type: string - format: byte - timestamp: + title: module version + sum: type: string - format: date-time - signature: + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + description: >- + GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC + method. + cosmos.base.tendermint.v1beta1.GetSyncingResponse: + type: object + properties: + syncing: + type: boolean + format: boolean + description: >- + GetSyncingResponse is the response type for the Query/GetSyncing RPC + method. + cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + type: object + properties: + block_height: + type: string + format: int64 + validators: + type: array + items: + type: object + properties: + address: + type: string + pub_key: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all + types that they + + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: type: string format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set of - validators. - tendermint.types.SignedMsgType: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message + along with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in + the form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default + use + + 'type.googleapis.com/full.type.name' as the type URL and the + unpack + + methods only use the fully qualified type name after the last + '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - tendermint.types.Validator: + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a + field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + description: Validator is the type for the validator-set. + pagination: + description: pagination defines an pagination for the response. + type: object + properties: + next_key: + type: string + format: byte + title: |- + next_key is the key to be passed to PageRequest.key to + query the next page most efficiently + total: + type: string + format: uint64 + title: >- + total is total number of results available if + PageRequest.count_total + + was set, its value is undefined otherwise + description: >- + GetValidatorSetByHeightResponse is the response type for the + Query/GetValidatorSetByHeight RPC method. + cosmos.base.tendermint.v1beta1.Module: + type: object + properties: + path: + type: string + title: module path + version: + type: string + title: module version + sum: + type: string + title: checksum + title: Module is the type for VersionInfo + cosmos.base.tendermint.v1beta1.Validator: type: object properties: address: type: string - format: byte pub_key: type: object properties: - ed25519: + type_url: type: string - format: byte - secp256k1: + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up a + type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might be + + used with implementation specific semantics. + value: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + description: >- + Must be a valid serialized protocol buffer of the above specified + type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } voting_power: type: string format: int64 proposer_priority: type: string format: int64 - tendermint.types.ValidatorParams: - type: object - properties: - pub_key_types: - type: array - items: - type: string - description: |- - ValidatorParams restrict the public key types validators can use. - NOTE: uses ABCI pubkey naming, not Amino names. - tendermint.types.ValidatorSet: + description: Validator is the type for the validator-set. + cosmos.base.tendermint.v1beta1.VersionInfo: type: object properties: - validators: + name: + type: string + app_name: + type: string + version: + type: string + git_commit: + type: string + build_tags: + type: string + go_version: + type: string + build_deps: type: array items: type: object properties: - address: + path: type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: + title: module path + version: type: string - format: int64 - proposer_priority: + title: module version + sum: type: string - format: int64 - proposer: + title: checksum + title: Module is the type for VersionInfo + cosmos_sdk_version: + type: string + title: 'Since: cosmos-sdk 0.43' + description: VersionInfo is the type for the GetNodeInfoResponse message. + tendermint.crypto.PublicKey: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: PublicKey defines the keys available for use with Tendermint Validators + tendermint.p2p.DefaultNodeInfo: + type: object + properties: + protocol_version: type: object properties: - address: + p2p: type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators - voting_power: + format: uint64 + block: type: string - format: int64 - proposer_priority: + format: uint64 + app: type: string - format: int64 - total_voting_power: + format: uint64 + default_node_id: type: string - format: int64 - tendermint.types.VersionParams: - type: object - properties: - app_version: + listen_addr: type: string - format: uint64 - description: VersionParams contains the ABCI application version. - tendermint.types.Vote: - type: object - properties: - type: + network: type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: |- - SignedMsgType is a type of signed message in the consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: + version: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + channels: + type: string + format: byte + moniker: + type: string + other: type: object properties: - hash: + tx_index: type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: + rpc_address: + type: string + tendermint.p2p.DefaultNodeInfoOther: + type: object + properties: + tx_index: type: string - format: byte - validator_index: - type: integer - format: int32 - signature: + rpc_address: type: string - format: byte - description: |- - Vote represents a prevote, precommit, or commit vote from validators for - consensus. - tendermint.version.Consensus: + tendermint.p2p.ProtocolVersion: type: object properties: + p2p: + type: string + format: uint64 block: type: string format: uint64 app: type: string format: uint64 - description: >- - Consensus captures the consensus rules for processing a block in the - blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - cosmos.base.tendermint.v1beta1.GetBlockByHeightResponse: + tendermint.types.Block: type: object properties: - block_id: + header: type: object properties: - hash: - type: string - format: byte - part_set_header: + version: + title: basic block info type: object properties: - total: - type: integer - format: int64 - hash: + block: type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in + the blockchain, - including all blockchain data structures and the rules of the - application's + including all blockchain data structures and the rules of the + application's - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: type: object properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. - NOTE: not all txs here are valid. We're just agreeing on the - order first. + NOTE: not all txs here are valid. We're just agreeing on the + order first. - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + evidence: + type: object + properties: evidence: - type: object - properties: - evidence: - type: array - items: + type: array + items: + type: object + properties: + duplicate_vote_evidence: type: object properties: - duplicate_vote_evidence: + vote_a: type: object properties: - vote_a: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: + hash: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + format: byte + part_set_header: type: object properties: + total: + type: integer + format: int64 hash: type: string format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote + from validators for + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the consensus. - vote_b: + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: + hash: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + format: byte + part_set_header: type: object properties: + total: + type: integer + format: int64 hash: type: string format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 + title: PartsetHeader + title: BlockID timestamp: type: string format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: + Vote represents a prevote, precommit, or commit vote + from validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator + signed two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: type: object properties: - conflicting_block: + signed_header: type: object properties: - signed_header: + header: type: object properties: - header: + version: + title: basic block info type: object properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: + block: type: string - format: byte - title: consensus info - proposer_address: + format: uint64 + app: type: string - format: byte + format: uint64 description: >- - Header defines the structure of a Tendermint - block header. - commit: + Consensus captures the consensus rules for + processing a block in the blockchain, + + including all blockchain data structures and + the rules of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: type: object properties: - height: + hash: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + format: byte + part_set_header: type: object properties: + total: + type: integer + format: int64 hash: type: string format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: >- + hashes from the app output from the prev + block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: >- + Header defines the structure of a Tendermint + block header. + commit: type: object properties: - validators: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: type: array items: type: object properties: - address: + block_id_flag: type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: type: string - format: int64 - proposer_priority: + format: byte + timestamp: type: string - format: int64 - proposer: + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included + in a Commit. + description: >- + Commit contains the evidence that a block was + committed by a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for + use with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - address: + ed25519: type: string format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: + secp256k1: type: string - format: int64 - total_voting_power: + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: type: string format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: type: object properties: - address: + ed25519: type: string format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: + secp256k1: type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + last_commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - height: + hash: type: string - format: int64 - round: - type: integer - format: int32 - block_id: + format: byte + part_set_header: type: object properties: + total: + type: integer + format: int64 hash: type: string format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - description: >- - GetBlockByHeightResponse is the response type for the - Query/GetBlockByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetLatestBlockResponse: + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.BlockID: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + tendermint.types.BlockIDFlag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + tendermint.types.Commit: type: object properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 block_id: type: object properties: @@ -41781,39 +33748,227 @@ definitions: format: byte title: PartsetHeader title: BlockID - block: + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a set of + validators. + tendermint.types.CommitSig: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + tendermint.types.Data: + type: object + properties: + txs: + type: array + items: + type: string + format: byte + description: >- + Txs that will be applied by state @ block.Height+1. + + NOTE: not all txs here are valid. We're just agreeing on the order + first. + + This means that block.AppHash does not include these txs. + title: Data contains the set of transactions included in the block + tendermint.types.DuplicateVoteEvidence: + type: object + properties: + vote_a: type: object properties: - header: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: type: object properties: - version: - title: basic block info + hash: + type: string + format: byte + part_set_header: type: object properties: - block: - type: string - format: uint64 - app: + total: + type: integer + format: int64 + hash: type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from validators + for - including all blockchain data structures and the rules of the - application's + consensus. + vote_b: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. - state transition machine. - chain_id: + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from validators + for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + tendermint.types.Evidence: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 - time: - type: string - format: date-time - last_block_id: + round: + type: integer + format: int32 + block_id: type: object properties: hash: @@ -41830,88 +33985,504 @@ definitions: format: byte title: PartsetHeader title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: + timestamp: type: string - format: byte - validators_hash: + format: date-time + validator_address: type: string format: byte - title: hashes from the app output from the prev block - next_validators_hash: + validator_index: + type: integer + format: int32 + signature: type: string format: byte - consensus_hash: + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for + + consensus. + vote_b: + type: object + properties: + type: type: string - format: byte - app_hash: + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: type: string - format: byte - last_results_hash: + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: type: string - format: byte - evidence_hash: + format: date-time + validator_address: type: string format: byte - title: consensus info - proposer_address: + validator_index: + type: integer + format: int32 + signature: type: string format: byte - description: Header defines the structure of a Tendermint block header. - data: + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed two + conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: type: object properties: - txs: - type: array - items: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing + a block in the blockchain, + + including all blockchain data structures and the rules + of the application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included in a + Commit. + description: >- + Commit contains the evidence that a block was committed by + a set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: + type: string + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: type: string format: byte - description: >- - Txs that will be applied by state @ block.Height+1. + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + tendermint.types.EvidenceList: + type: object + properties: + evidence: + type: array + items: + type: object + properties: + duplicate_vote_evidence: + type: object + properties: + vote_a: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. - NOTE: not all txs here are valid. We're just agreeing on the - order first. + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: + consensus. + vote_b: type: object properties: - duplicate_vote_evidence: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: >- + SignedMsgType is a type of signed message in the + consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: >- + Vote represents a prevote, precommit, or commit vote from + validators for + + consensus. + total_voting_power: + type: string + format: int64 + validator_power: + type: string + format: int64 + timestamp: + type: string + format: date-time + description: >- + DuplicateVoteEvidence contains evidence of a validator signed + two conflicting votes. + light_client_attack_evidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: type: object properties: - vote_a: + header: type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 description: >- - SignedMsgType is a type of signed message in the - consensus. + Consensus captures the consensus rules for + processing a block in the blockchain, - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals + including all blockchain data structures and the + rules of the application's + + state transition machine. + chain_id: + type: string height: type: string format: int64 - round: - type: integer - format: int32 - block_id: + time: + type: string + format: date-time + last_block_id: type: object properties: hash: @@ -41928,40 +34499,42 @@ definitions: format: byte title: PartsetHeader title: BlockID - timestamp: + last_commit_hash: type: string - format: date-time - validator_address: + format: byte + title: hashes of block data + data_hash: type: string format: byte - validator_index: - type: integer - format: int32 - signature: + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: type: string format: byte description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: + Header defines the structure of a Tendermint block + header. + commit: type: object properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals height: type: string format: int64 @@ -41985,243 +34558,41 @@ definitions: format: byte title: PartsetHeader title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the + signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: >- + CommitSig is a part of the Vote included in a + Commit. description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: + Commit contains the evidence that a block was + committed by a set of validators. + validator_set: type: object properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - - including all blockchain data structures - and the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: + validators: type: array items: type: object @@ -42247,794 +34618,586 @@ definitions: proposer_priority: type: string format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - description: >- - GetLatestBlockResponse is the response type for the Query/GetLatestBlock - RPC method. - cosmos.base.tendermint.v1beta1.GetLatestValidatorSetResponse: - type: object - properties: - block_height: - type: string - format: int64 - validators: - type: array - items: - type: object - properties: - address: - type: string - pub_key: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use + with Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. + format: int64 + byzantine_validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + timestamp: + type: string + format: date-time description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - pagination: - description: pagination defines an pagination for the response. + LightClientAttackEvidence contains evidence of a set of + validators attempting to mislead a light client. + tendermint.types.Header: + type: object + properties: + version: + title: basic block info type: object properties: - next_key: + block: type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: + format: uint64 + app: type: string format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, - was set, its value is undefined otherwise - description: >- - GetLatestValidatorSetResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - cosmos.base.tendermint.v1beta1.GetNodeInfoResponse: - type: object - properties: - default_node_info: + including all blockchain data structures and the rules of the + application's + + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: type: object properties: - protocol_version: - type: object - properties: - p2p: - type: string - format: uint64 - block: - type: string - format: uint64 - app: - type: string - format: uint64 - default_node_id: - type: string - listen_addr: - type: string - network: - type: string - version: - type: string - channels: + hash: type: string format: byte - moniker: - type: string - other: + part_set_header: type: object properties: - tx_index: - type: string - rpc_address: + total: + type: integer + format: int64 + hash: type: string - application_version: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: - type: array - items: - type: object - properties: - path: - type: string - title: module path - version: - type: string - title: module version - sum: - type: string - title: checksum - title: Module is the type for VersionInfo - cosmos_sdk_version: - type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. - description: >- - GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC - method. - cosmos.base.tendermint.v1beta1.GetSyncingResponse: - type: object - properties: - syncing: - type: boolean - format: boolean - description: >- - GetSyncingResponse is the response type for the Query/GetSyncing RPC - method. - cosmos.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: - type: object - properties: - block_height: + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: type: string - format: int64 - validators: - type: array - items: - type: object - properties: - address: - type: string - pub_key: - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message - along with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in - the form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default - use - - 'type.googleapis.com/full.type.name' as the type URL and the - unpack - - methods only use the fully qualified type name after the last - '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a - field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - description: Validator is the type for the validator-set. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - GetValidatorSetByHeightResponse is the response type for the - Query/GetValidatorSetByHeight RPC method. - cosmos.base.tendermint.v1beta1.Module: - type: object - properties: - path: + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: type: string - title: module path - version: + format: byte + consensus_hash: type: string - title: module version - sum: + format: byte + app_hash: type: string - title: checksum - title: Module is the type for VersionInfo - cosmos.base.tendermint.v1beta1.Validator: + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + tendermint.types.LightBlock: type: object properties: - address: - type: string - pub_key: + signed_header: type: object properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up a - type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning with - - type.googleapis.com. - + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block + in the blockchain, - Schemes other than `http`, `https` (or the empty scheme) might be + including all blockchain data structures and the rules of the + application's - used with implementation specific semantics. - value: - type: string - format: byte + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: BlockIdFlag indicates which BlcokID the signature is for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. description: >- - Must be a valid serialized protocol buffer of the above specified - type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` + Commit contains the evidence that a block was committed by a set + of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + tendermint.types.LightClientAttackEvidence: + type: object + properties: + conflicting_block: + type: object + properties: + signed_header: + type: object + properties: + header: + type: object + properties: + version: + title: basic block info + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a + block in the blockchain, - field. Example (for message [google.protobuf.Duration][]): + including all blockchain data structures and the rules of + the application's - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - voting_power: - type: string - format: int64 - proposer_priority: + state transition machine. + chain_id: + type: string + height: + type: string + format: int64 + time: + type: string + format: date-time + last_block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + last_commit_hash: + type: string + format: byte + title: hashes of block data + data_hash: + type: string + format: byte + validators_hash: + type: string + format: byte + title: hashes from the app output from the prev block + next_validators_hash: + type: string + format: byte + consensus_hash: + type: string + format: byte + app_hash: + type: string + format: byte + last_results_hash: + type: string + format: byte + evidence_hash: + type: string + format: byte + title: consensus info + proposer_address: + type: string + format: byte + description: Header defines the structure of a Tendermint block header. + commit: + type: object + properties: + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + signatures: + type: array + items: + type: object + properties: + block_id_flag: + type: string + enum: + - BLOCK_ID_FLAG_UNKNOWN + - BLOCK_ID_FLAG_ABSENT + - BLOCK_ID_FLAG_COMMIT + - BLOCK_ID_FLAG_NIL + default: BLOCK_ID_FLAG_UNKNOWN + title: >- + BlockIdFlag indicates which BlcokID the signature is + for + validator_address: + type: string + format: byte + timestamp: + type: string + format: date-time + signature: + type: string + format: byte + description: CommitSig is a part of the Vote included in a Commit. + description: >- + Commit contains the evidence that a block was committed by a + set of validators. + validator_set: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with + Tendermint Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + common_height: type: string format: int64 - description: Validator is the type for the validator-set. - cosmos.base.tendermint.v1beta1.VersionInfo: - type: object - properties: - name: - type: string - app_name: - type: string - version: - type: string - git_commit: - type: string - build_tags: - type: string - go_version: - type: string - build_deps: + byzantine_validators: type: array items: type: object properties: - path: + address: type: string - title: module path - version: + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: type: string - title: module version - sum: + format: int64 + proposer_priority: type: string - title: checksum - title: Module is the type for VersionInfo - cosmos_sdk_version: + format: int64 + total_voting_power: type: string - title: 'Since: cosmos-sdk 0.43' - description: VersionInfo is the type for the GetNodeInfoResponse message. - tendermint.types.Block: + format: int64 + timestamp: + type: string + format: date-time + description: >- + LightClientAttackEvidence contains evidence of a set of validators + attempting to mislead a light client. + tendermint.types.PartSetHeader: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + tendermint.types.SignedHeader: type: object properties: header: @@ -43114,401 +35277,7 @@ definitions: type: string format: byte description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: - type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. - - NOTE: not all txs here are valid. We're just agreeing on the - order first. - - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. - - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for - - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for - processing a block in the blockchain, - - including all blockchain data structures and - the rules of the application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block was - committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use with - Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: + commit: type: object properties: height: @@ -43561,6 +35330,170 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. + tendermint.types.SignedMsgType: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + tendermint.types.Validator: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + tendermint.types.ValidatorSet: + type: object + properties: + validators: + type: array + items: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + proposer: + type: object + properties: + address: + type: string + format: byte + pub_key: + type: object + properties: + ed25519: + type: string + format: byte + secp256k1: + type: string + format: byte + title: >- + PublicKey defines the keys available for use with Tendermint + Validators + voting_power: + type: string + format: int64 + proposer_priority: + type: string + format: int64 + total_voting_power: + type: string + format: int64 + tendermint.types.Vote: + type: object + properties: + type: + type: string + enum: + - SIGNED_MSG_TYPE_UNKNOWN + - SIGNED_MSG_TYPE_PREVOTE + - SIGNED_MSG_TYPE_PRECOMMIT + - SIGNED_MSG_TYPE_PROPOSAL + default: SIGNED_MSG_TYPE_UNKNOWN + description: |- + SignedMsgType is a type of signed message in the consensus. + + - SIGNED_MSG_TYPE_PREVOTE: Votes + - SIGNED_MSG_TYPE_PROPOSAL: Proposals + height: + type: string + format: int64 + round: + type: integer + format: int32 + block_id: + type: object + properties: + hash: + type: string + format: byte + part_set_header: + type: object + properties: + total: + type: integer + format: int64 + hash: + type: string + format: byte + title: PartsetHeader + title: BlockID + timestamp: + type: string + format: date-time + validator_address: + type: string + format: byte + validator_index: + type: integer + format: int32 + signature: + type: string + format: byte + description: |- + Vote represents a prevote, precommit, or commit vote from validators for + consensus. + tendermint.version.Consensus: + type: object + properties: + block: + type: string + format: uint64 + app: + type: string + format: uint64 + description: >- + Consensus captures the consensus rules for processing a block in the + blockchain, + + including all blockchain data structures and the rules of the + application's + + state transition machine. cosmos.base.v1beta1.DecCoin: type: object properties: @@ -52722,179 +44655,219 @@ definitions: when the default options are not sufficient. If any of these are present - and can't be handled, the transaction will be rejected - non_critical_extension_options: + and can't be handled, the transaction will be rejected + non_critical_extension_options: + type: array + items: + type: object + properties: + type_url: + type: string + description: >- + A URL/resource name that uniquely identifies the type of the + serialized + + protocol buffer message. This string must contain at least + + one "/" character. The last segment of the URL's path must + represent + + the fully qualified name of the type (as in + + `path/google.protobuf.Duration`). The name should be in a + canonical form + + (e.g., leading "." is not accepted). + + + In practice, teams usually precompile into the binary all types + that they + + expect it to use in the context of Any. However, for URLs which + use the + + scheme `http`, `https`, or no scheme, one can optionally set up + a type + + server that maps type URLs to message definitions as follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) might + be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + description: >- + `Any` contains an arbitrary serialized protocol buffer message along + with a + + URL that describes the type of the serialized message. + + + Protobuf library provides support to pack/unpack Any values in the + form + + of utility functions or additional generated methods of the Any + type. + + + Example 1: Pack and unpack a message in C++. + + Foo foo = ...; + Any any; + any.PackFrom(foo); + ... + if (any.UnpackTo(&foo)) { + ... + } + + Example 2: Pack and unpack a message in Java. + + Foo foo = ...; + Any any = Any.pack(foo); + ... + if (any.is(Foo.class)) { + foo = any.unpack(Foo.class); + } + + Example 3: Pack and unpack a message in Python. + + foo = Foo(...) + any = Any() + any.Pack(foo) + ... + if any.Is(Foo.DESCRIPTOR): + any.Unpack(foo) + ... + + Example 4: Pack and unpack a message in Go + + foo := &pb.Foo{...} + any, err := ptypes.MarshalAny(foo) + ... + foo := &pb.Foo{} + if err := ptypes.UnmarshalAny(any, foo); err != nil { + ... + } + + The pack methods provided by protobuf library will by default use + + 'type.googleapis.com/full.type.name' as the type URL and the unpack + + methods only use the fully qualified type name after the last '/' + + in the type URL, for example "foo.bar.com/x/y.z" will yield type + + name "y.z". + + + + JSON + + ==== + + The JSON representation of an `Any` value uses the regular + + representation of the deserialized, embedded message, with an + + additional field `@type` which contains the type URL. Example: + + package google.profile; + message Person { + string first_name = 1; + string last_name = 2; + } + + { + "@type": "type.googleapis.com/google.profile.Person", + "firstName": , + "lastName": + } + + If the embedded message type is well-known and has a custom JSON + + representation, that representation will be embedded adding a field + + `value` which holds the custom JSON in addition to the `@type` + + field. Example (for message [google.protobuf.Duration][]): + + { + "@type": "type.googleapis.com/google.protobuf.Duration", + "value": "1.212s" + } + title: >- + extension_options are arbitrary options that can be added by chains + + when the default options are not sufficient. If any of these are + present + + and can't be handled, they will be ignored + description: TxBody is the body of a transaction that all signers sign over. + tendermint.abci.Event: + type: object + properties: + type: + type: string + attributes: type: array items: type: object properties: - type_url: + key: type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all types - that they - - expect it to use in the context of Any. However, for URLs which - use the - - scheme `http`, `https`, or no scheme, one can optionally set up - a type - - server that maps type URLs to message definitions as follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) might - be - - used with implementation specific semantics. + format: byte value: type: string format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - description: >- - `Any` contains an arbitrary serialized protocol buffer message along - with a - - URL that describes the type of the serialized message. - - - Protobuf library provides support to pack/unpack Any values in the - form - - of utility functions or additional generated methods of the Any - type. - - - Example 1: Pack and unpack a message in C++. - - Foo foo = ...; - Any any; - any.PackFrom(foo); - ... - if (any.UnpackTo(&foo)) { - ... - } - - Example 2: Pack and unpack a message in Java. - - Foo foo = ...; - Any any = Any.pack(foo); - ... - if (any.is(Foo.class)) { - foo = any.unpack(Foo.class); - } - - Example 3: Pack and unpack a message in Python. - - foo = Foo(...) - any = Any() - any.Pack(foo) - ... - if any.Is(Foo.DESCRIPTOR): - any.Unpack(foo) - ... - - Example 4: Pack and unpack a message in Go - - foo := &pb.Foo{...} - any, err := ptypes.MarshalAny(foo) - ... - foo := &pb.Foo{} - if err := ptypes.UnmarshalAny(any, foo); err != nil { - ... - } - - The pack methods provided by protobuf library will by default use - - 'type.googleapis.com/full.type.name' as the type URL and the unpack - - methods only use the fully qualified type name after the last '/' - - in the type URL, for example "foo.bar.com/x/y.z" will yield type - - name "y.z". - - - - JSON - - ==== - - The JSON representation of an `Any` value uses the regular - - representation of the deserialized, embedded message, with an - - additional field `@type` which contains the type URL. Example: - - package google.profile; - message Person { - string first_name = 1; - string last_name = 2; - } - - { - "@type": "type.googleapis.com/google.profile.Person", - "firstName": , - "lastName": - } - - If the embedded message type is well-known and has a custom JSON - - representation, that representation will be embedded adding a field - - `value` which holds the custom JSON in addition to the `@type` - - field. Example (for message [google.protobuf.Duration][]): - - { - "@type": "type.googleapis.com/google.protobuf.Duration", - "value": "1.212s" - } - title: >- - extension_options are arbitrary options that can be added by chains + index: + type: boolean + format: boolean + description: 'EventAttribute is a single key-value pair, associated with an event.' + description: >- + Event allows application developers to attach additional information to - when the default options are not sufficient. If any of these are - present + ResponseBeginBlock, ResponseEndBlock, ResponseCheckTx and + ResponseDeliverTx. - and can't be handled, they will be ignored - description: TxBody is the body of a transaction that all signers sign over. + Later, transactions may be queried using these events. + tendermint.abci.EventAttribute: + type: object + properties: + key: + type: string + format: byte + value: + type: string + format: byte + index: + type: boolean + format: boolean + description: 'EventAttribute is a single key-value pair, associated with an event.' cosmos.upgrade.v1beta1.ModuleVersion: type: object properties: @@ -57277,665 +49250,75 @@ definitions: another user's funds. allowance: description: allowance can be any of basic and filtered fee allowance. - type: object - properties: - type_url: - type: string - description: >- - A URL/resource name that uniquely identifies the type of the - serialized - - protocol buffer message. This string must contain at least - - one "/" character. The last segment of the URL's path must - represent - - the fully qualified name of the type (as in - - `path/google.protobuf.Duration`). The name should be in a - canonical form - - (e.g., leading "." is not accepted). - - - In practice, teams usually precompile into the binary all - types that they - - expect it to use in the context of Any. However, for URLs - which use the - - scheme `http`, `https`, or no scheme, one can optionally set - up a type - - server that maps type URLs to message definitions as - follows: - - - * If no scheme is provided, `https` is assumed. - - * An HTTP GET on the URL must yield a - [google.protobuf.Type][] - value in binary format, or produce an error. - * Applications are allowed to cache lookup results based on - the - URL, or have them precompiled into a binary to avoid any - lookup. Therefore, binary compatibility needs to be preserved - on changes to types. (Use versioned type names to manage - breaking changes.) - - Note: this functionality is not currently available in the - official - - protobuf release, and it is not used for type URLs beginning - with - - type.googleapis.com. - - - Schemes other than `http`, `https` (or the empty scheme) - might be - - used with implementation specific semantics. - value: - type: string - format: byte - description: >- - Must be a valid serialized protocol buffer of the above - specified type. - title: Grant is stored in the KVStore to record a grant with full context - description: allowances are allowance's granted for grantee by granter. - pagination: - description: pagination defines an pagination for the response. - type: object - properties: - next_key: - type: string - format: byte - title: |- - next_key is the key to be passed to PageRequest.key to - query the next page most efficiently - total: - type: string - format: uint64 - title: >- - total is total number of results available if - PageRequest.count_total - - was set, its value is undefined otherwise - description: >- - QueryAllowancesResponse is the response type for the Query/Allowances RPC - method. - cosmos.base.node.v1beta1.ConfigResponse: - type: object - properties: - minimum_gas_price: - type: string - description: ConfigResponse defines the response structure for the Config gRPC query. - lbm.tx.v1beta1.GetBlockWithTxsResponse: - type: object - properties: - txs: - type: array - items: - $ref: '#/definitions/cosmos.tx.v1beta1.Tx' - description: txs are the transactions in the block. - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - block: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules for processing a block - in the blockchain, - - including all blockchain data structures and the rules of the - application's - - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: hashes from the app output from the prev block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: Header defines the structure of a Tendermint block header. - data: - type: object - properties: - txs: - type: array - items: + type: object + properties: + type_url: type: string - format: byte - description: >- - Txs that will be applied by state @ block.Height+1. + description: >- + A URL/resource name that uniquely identifies the type of the + serialized - NOTE: not all txs here are valid. We're just agreeing on the - order first. + protocol buffer message. This string must contain at least - This means that block.AppHash does not include these txs. - title: Data contains the set of transactions included in the block - evidence: - type: object - properties: - evidence: - type: array - items: - type: object - properties: - duplicate_vote_evidence: - type: object - properties: - vote_a: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + one "/" character. The last segment of the URL's path must + represent - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + the fully qualified name of the type (as in - consensus. - vote_b: - type: object - properties: - type: - type: string - enum: - - SIGNED_MSG_TYPE_UNKNOWN - - SIGNED_MSG_TYPE_PREVOTE - - SIGNED_MSG_TYPE_PRECOMMIT - - SIGNED_MSG_TYPE_PROPOSAL - default: SIGNED_MSG_TYPE_UNKNOWN - description: >- - SignedMsgType is a type of signed message in the - consensus. + `path/google.protobuf.Duration`). The name should be in a + canonical form - - SIGNED_MSG_TYPE_PREVOTE: Votes - - SIGNED_MSG_TYPE_PROPOSAL: Proposals - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - timestamp: - type: string - format: date-time - validator_address: - type: string - format: byte - validator_index: - type: integer - format: int32 - signature: - type: string - format: byte - description: >- - Vote represents a prevote, precommit, or commit vote - from validators for + (e.g., leading "." is not accepted). - consensus. - total_voting_power: - type: string - format: int64 - validator_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - DuplicateVoteEvidence contains evidence of a validator - signed two conflicting votes. - light_client_attack_evidence: - type: object - properties: - conflicting_block: - type: object - properties: - signed_header: - type: object - properties: - header: - type: object - properties: - version: - title: basic block info - type: object - properties: - block: - type: string - format: uint64 - app: - type: string - format: uint64 - description: >- - Consensus captures the consensus rules - for processing a block in the - blockchain, - including all blockchain data structures - and the rules of the application's + In practice, teams usually precompile into the binary all + types that they - state transition machine. - chain_id: - type: string - height: - type: string - format: int64 - time: - type: string - format: date-time - last_block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - last_commit_hash: - type: string - format: byte - title: hashes of block data - data_hash: - type: string - format: byte - validators_hash: - type: string - format: byte - title: >- - hashes from the app output from the prev - block - next_validators_hash: - type: string - format: byte - consensus_hash: - type: string - format: byte - app_hash: - type: string - format: byte - last_results_hash: - type: string - format: byte - evidence_hash: - type: string - format: byte - title: consensus info - proposer_address: - type: string - format: byte - description: >- - Header defines the structure of a Tendermint - block header. - commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: >- - BlockIdFlag indicates which BlcokID the - signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: >- - CommitSig is a part of the Vote included - in a Commit. - description: >- - Commit contains the evidence that a block - was committed by a set of validators. - validator_set: - type: object - properties: - validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - proposer: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for - use with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - common_height: - type: string - format: int64 - byzantine_validators: - type: array - items: - type: object - properties: - address: - type: string - format: byte - pub_key: - type: object - properties: - ed25519: - type: string - format: byte - secp256k1: - type: string - format: byte - title: >- - PublicKey defines the keys available for use - with Tendermint Validators - voting_power: - type: string - format: int64 - proposer_priority: - type: string - format: int64 - total_voting_power: - type: string - format: int64 - timestamp: - type: string - format: date-time - description: >- - LightClientAttackEvidence contains evidence of a set of - validators attempting to mislead a light client. - last_commit: - type: object - properties: - height: - type: string - format: int64 - round: - type: integer - format: int32 - block_id: - type: object - properties: - hash: - type: string - format: byte - part_set_header: - type: object - properties: - total: - type: integer - format: int64 - hash: - type: string - format: byte - title: PartsetHeader - title: BlockID - signatures: - type: array - items: - type: object - properties: - block_id_flag: - type: string - enum: - - BLOCK_ID_FLAG_UNKNOWN - - BLOCK_ID_FLAG_ABSENT - - BLOCK_ID_FLAG_COMMIT - - BLOCK_ID_FLAG_NIL - default: BLOCK_ID_FLAG_UNKNOWN - title: BlockIdFlag indicates which BlcokID the signature is for - validator_address: - type: string - format: byte - timestamp: - type: string - format: date-time - signature: - type: string - format: byte - description: CommitSig is a part of the Vote included in a Commit. - description: >- - Commit contains the evidence that a block was committed by a set - of validators. - entropy: - title: '*** Ostracon Extended Fields ***' - type: object - properties: - round: - type: integer - format: int32 - proof: - type: string - format: byte + expect it to use in the context of Any. However, for URLs + which use the + + scheme `http`, `https`, or no scheme, one can optionally set + up a type + + server that maps type URLs to message definitions as + follows: + + + * If no scheme is provided, `https` is assumed. + + * An HTTP GET on the URL must yield a + [google.protobuf.Type][] + value in binary format, or produce an error. + * Applications are allowed to cache lookup results based on + the + URL, or have them precompiled into a binary to avoid any + lookup. Therefore, binary compatibility needs to be preserved + on changes to types. (Use versioned type names to manage + breaking changes.) + + Note: this functionality is not currently available in the + official + + protobuf release, and it is not used for type URLs beginning + with + + type.googleapis.com. + + + Schemes other than `http`, `https` (or the empty scheme) + might be + + used with implementation specific semantics. + value: + type: string + format: byte + description: >- + Must be a valid serialized protocol buffer of the above + specified type. + title: Grant is stored in the KVStore to record a grant with full context + description: allowances are allowance's granted for grantee by granter. pagination: - description: pagination defines a pagination for the response. + description: pagination defines an pagination for the response. type: object properties: next_key: @@ -57953,8 +49336,11 @@ definitions: was set, its value is undefined otherwise description: >- - GetBlockWithTxsResponse is the response type for the - Service.GetBlockWithTxs method. - - - Since: finschia-sdk 0.47.0 + QueryAllowancesResponse is the response type for the Query/Allowances RPC + method. + cosmos.base.node.v1beta1.ConfigResponse: + type: object + properties: + minimum_gas_price: + type: string + description: ConfigResponse defines the response structure for the Config gRPC query. diff --git a/client/flags/flags.go b/client/flags/flags.go index 58bc675752..89ebbfbd21 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -5,8 +5,7 @@ import ( "strconv" "github.com/spf13/cobra" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/crypto/keyring" ) @@ -42,7 +41,7 @@ const ( // List of CLI flags const ( - FlagHome = ostcli.HomeFlag + FlagHome = tmcli.HomeFlag FlagKeyringDir = "keyring-dir" FlagUseLedger = "ledger" FlagChainID = "chain-id" @@ -77,12 +76,8 @@ const ( FlagReverse = "reverse" // Tendermint logging flags - FlagLogLevel = "log_level" - FlagLogFormat = "log_format" - FlagLogPath = "log_path" - FlagLogMaxAge = "log_max_age" - FlagLogMaxSize = "log_max_size" - FlagLogMaxBackups = "log_max_backups" + FlagLogLevel = "log_level" + FlagLogFormat = "log_format" ) // LineBreak can be included in a command list to provide a blank line @@ -93,14 +88,14 @@ var LineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}} func AddQueryFlagsToCmd(cmd *cobra.Command) { cmd.Flags().String(FlagNode, "tcp://localhost:26657", ": to Tendermint RPC interface for this chain") cmd.Flags().Int64(FlagHeight, 0, "Use a specific height to query state at (this can error if the node is pruning state)") - cmd.Flags().StringP(ostcli.OutputFlag, "o", "text", "Output format (text|json)") + cmd.Flags().StringP(tmcli.OutputFlag, "o", "text", "Output format (text|json)") _ = cmd.MarkFlagRequired(FlagChainID) } // AddTxFlagsToCmd adds common flags to a module tx command. func AddTxFlagsToCmd(cmd *cobra.Command) { - cmd.Flags().StringP(ostcli.OutputFlag, "o", "json", "Output format (text|json)") + cmd.Flags().StringP(tmcli.OutputFlag, "o", "json", "Output format (text|json)") cmd.Flags().String(FlagKeyringDir, "", "The client Keyring directory; if omitted, the default 'home' directory will be used") cmd.Flags().String(FlagFrom, "", "Name or address of private key with which to sign") cmd.Flags().Uint64P(FlagAccountNumber, "a", 0, "The account number of the signing account (offline mode only)") @@ -108,7 +103,7 @@ func AddTxFlagsToCmd(cmd *cobra.Command) { cmd.Flags().String(FlagNote, "", "Note to add a description to the transaction (previously --memo)") cmd.Flags().String(FlagFees, "", "Fees to pay along with transaction; eg: 10uatom") cmd.Flags().String(FlagGasPrices, "", "Gas prices in decimal format to determine the transaction fee (e.g. 0.1uatom)") - cmd.Flags().String(FlagNode, "tcp://localhost:26657", ": to ostracon rpc interface for this chain") + cmd.Flags().String(FlagNode, "tcp://localhost:26657", ": to tendermint rpc interface for this chain") cmd.Flags().Bool(FlagUseLedger, false, "Use a connected Ledger device") cmd.Flags().Float64(FlagGasAdjustment, DefaultGasAdjustment, "adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored ") cmd.Flags().StringP(FlagBroadcastMode, "b", BroadcastSync, "Transaction broadcasting mode (sync|async|block)") diff --git a/client/grpc/ocservice/query.pb.go b/client/grpc/ocservice/query.pb.go deleted file mode 100644 index 903fb9e67b..0000000000 --- a/client/grpc/ocservice/query.pb.go +++ /dev/null @@ -1,4948 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lbm/base/ostracon/v1/query.proto - -package ocservice - -import ( - context "context" - fmt "fmt" - types "github.com/Finschia/finschia-sdk/codec/types" - query "github.com/Finschia/finschia-sdk/types/query" - _ "github.com/Finschia/ostracon/abci/types" - types2 "github.com/Finschia/ostracon/proto/ostracon/types" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - types3 "github.com/tendermint/tendermint/abci/types" - p2p "github.com/tendermint/tendermint/proto/tendermint/p2p" - types1 "github.com/tendermint/tendermint/proto/tendermint/types" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -type GetValidatorSetByHeightRequest struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // pagination defines an pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *GetValidatorSetByHeightRequest) Reset() { *m = GetValidatorSetByHeightRequest{} } -func (m *GetValidatorSetByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*GetValidatorSetByHeightRequest) ProtoMessage() {} -func (*GetValidatorSetByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{0} -} -func (m *GetValidatorSetByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetValidatorSetByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetValidatorSetByHeightRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetValidatorSetByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetValidatorSetByHeightRequest.Merge(m, src) -} -func (m *GetValidatorSetByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *GetValidatorSetByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetValidatorSetByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetValidatorSetByHeightRequest proto.InternalMessageInfo - -func (m *GetValidatorSetByHeightRequest) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *GetValidatorSetByHeightRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -type GetValidatorSetByHeightResponse struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines an pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *GetValidatorSetByHeightResponse) Reset() { *m = GetValidatorSetByHeightResponse{} } -func (m *GetValidatorSetByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*GetValidatorSetByHeightResponse) ProtoMessage() {} -func (*GetValidatorSetByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{1} -} -func (m *GetValidatorSetByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetValidatorSetByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetValidatorSetByHeightResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetValidatorSetByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetValidatorSetByHeightResponse.Merge(m, src) -} -func (m *GetValidatorSetByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *GetValidatorSetByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetValidatorSetByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetValidatorSetByHeightResponse proto.InternalMessageInfo - -func (m *GetValidatorSetByHeightResponse) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *GetValidatorSetByHeightResponse) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *GetValidatorSetByHeightResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -type GetLatestValidatorSetRequest struct { - // pagination defines an pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,1,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *GetLatestValidatorSetRequest) Reset() { *m = GetLatestValidatorSetRequest{} } -func (m *GetLatestValidatorSetRequest) String() string { return proto.CompactTextString(m) } -func (*GetLatestValidatorSetRequest) ProtoMessage() {} -func (*GetLatestValidatorSetRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{2} -} -func (m *GetLatestValidatorSetRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetLatestValidatorSetRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetLatestValidatorSetRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetLatestValidatorSetRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetLatestValidatorSetRequest.Merge(m, src) -} -func (m *GetLatestValidatorSetRequest) XXX_Size() int { - return m.Size() -} -func (m *GetLatestValidatorSetRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetLatestValidatorSetRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetLatestValidatorSetRequest proto.InternalMessageInfo - -func (m *GetLatestValidatorSetRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -type GetLatestValidatorSetResponse struct { - BlockHeight int64 `protobuf:"varint,1,opt,name=block_height,json=blockHeight,proto3" json:"block_height,omitempty"` - Validators []*Validator `protobuf:"bytes,2,rep,name=validators,proto3" json:"validators,omitempty"` - // pagination defines an pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *GetLatestValidatorSetResponse) Reset() { *m = GetLatestValidatorSetResponse{} } -func (m *GetLatestValidatorSetResponse) String() string { return proto.CompactTextString(m) } -func (*GetLatestValidatorSetResponse) ProtoMessage() {} -func (*GetLatestValidatorSetResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{3} -} -func (m *GetLatestValidatorSetResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetLatestValidatorSetResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetLatestValidatorSetResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetLatestValidatorSetResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetLatestValidatorSetResponse.Merge(m, src) -} -func (m *GetLatestValidatorSetResponse) XXX_Size() int { - return m.Size() -} -func (m *GetLatestValidatorSetResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetLatestValidatorSetResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetLatestValidatorSetResponse proto.InternalMessageInfo - -func (m *GetLatestValidatorSetResponse) GetBlockHeight() int64 { - if m != nil { - return m.BlockHeight - } - return 0 -} - -func (m *GetLatestValidatorSetResponse) GetValidators() []*Validator { - if m != nil { - return m.Validators - } - return nil -} - -func (m *GetLatestValidatorSetResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -// Validator is the type for the validator-set. -type Validator struct { - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - PubKey *types.Any `protobuf:"bytes,2,opt,name=pub_key,json=pubKey,proto3" json:"pub_key,omitempty"` - VotingPower int64 `protobuf:"varint,3,opt,name=voting_power,json=votingPower,proto3" json:"voting_power,omitempty"` - ProposerPriority int64 `protobuf:"varint,4,opt,name=proposer_priority,json=proposerPriority,proto3" json:"proposer_priority,omitempty"` -} - -func (m *Validator) Reset() { *m = Validator{} } -func (m *Validator) String() string { return proto.CompactTextString(m) } -func (*Validator) ProtoMessage() {} -func (*Validator) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{4} -} -func (m *Validator) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Validator) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Validator.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Validator) XXX_Merge(src proto.Message) { - xxx_messageInfo_Validator.Merge(m, src) -} -func (m *Validator) XXX_Size() int { - return m.Size() -} -func (m *Validator) XXX_DiscardUnknown() { - xxx_messageInfo_Validator.DiscardUnknown(m) -} - -var xxx_messageInfo_Validator proto.InternalMessageInfo - -func (m *Validator) GetAddress() string { - if m != nil { - return m.Address - } - return "" -} - -func (m *Validator) GetPubKey() *types.Any { - if m != nil { - return m.PubKey - } - return nil -} - -func (m *Validator) GetVotingPower() int64 { - if m != nil { - return m.VotingPower - } - return 0 -} - -func (m *Validator) GetProposerPriority() int64 { - if m != nil { - return m.ProposerPriority - } - return 0 -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightRequest struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *GetBlockByHeightRequest) Reset() { *m = GetBlockByHeightRequest{} } -func (m *GetBlockByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*GetBlockByHeightRequest) ProtoMessage() {} -func (*GetBlockByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{5} -} -func (m *GetBlockByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockByHeightRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockByHeightRequest.Merge(m, src) -} -func (m *GetBlockByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *GetBlockByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockByHeightRequest proto.InternalMessageInfo - -func (m *GetBlockByHeightRequest) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -type GetBlockByHeightResponse struct { - BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types2.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (m *GetBlockByHeightResponse) Reset() { *m = GetBlockByHeightResponse{} } -func (m *GetBlockByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*GetBlockByHeightResponse) ProtoMessage() {} -func (*GetBlockByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{6} -} -func (m *GetBlockByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockByHeightResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockByHeightResponse.Merge(m, src) -} -func (m *GetBlockByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *GetBlockByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockByHeightResponse proto.InternalMessageInfo - -func (m *GetBlockByHeightResponse) GetBlockId() *types1.BlockID { - if m != nil { - return m.BlockId - } - return nil -} - -func (m *GetBlockByHeightResponse) GetBlock() *types2.Block { - if m != nil { - return m.Block - } - return nil -} - -// GetBlockByHashRequest is the request type for the Query/GetBlockByHash RPC method. -type GetBlockByHashRequest struct { - Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"` -} - -func (m *GetBlockByHashRequest) Reset() { *m = GetBlockByHashRequest{} } -func (m *GetBlockByHashRequest) String() string { return proto.CompactTextString(m) } -func (*GetBlockByHashRequest) ProtoMessage() {} -func (*GetBlockByHashRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{7} -} -func (m *GetBlockByHashRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockByHashRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockByHashRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockByHashRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockByHashRequest.Merge(m, src) -} -func (m *GetBlockByHashRequest) XXX_Size() int { - return m.Size() -} -func (m *GetBlockByHashRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockByHashRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockByHashRequest proto.InternalMessageInfo - -func (m *GetBlockByHashRequest) GetHash() []byte { - if m != nil { - return m.Hash - } - return nil -} - -// GetBlockByHashResponse is the response type for the Query/GetBlockByHash RPC method. -type GetBlockByHashResponse struct { - BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types2.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (m *GetBlockByHashResponse) Reset() { *m = GetBlockByHashResponse{} } -func (m *GetBlockByHashResponse) String() string { return proto.CompactTextString(m) } -func (*GetBlockByHashResponse) ProtoMessage() {} -func (*GetBlockByHashResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{8} -} -func (m *GetBlockByHashResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockByHashResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockByHashResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockByHashResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockByHashResponse.Merge(m, src) -} -func (m *GetBlockByHashResponse) XXX_Size() int { - return m.Size() -} -func (m *GetBlockByHashResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockByHashResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockByHashResponse proto.InternalMessageInfo - -func (m *GetBlockByHashResponse) GetBlockId() *types1.BlockID { - if m != nil { - return m.BlockId - } - return nil -} - -func (m *GetBlockByHashResponse) GetBlock() *types2.Block { - if m != nil { - return m.Block - } - return nil -} - -// GetBlockResultsByHeightRequest is the request type for the Query/GetBlockResultsByHeight RPC method. -type GetBlockResultsByHeightRequest struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` -} - -func (m *GetBlockResultsByHeightRequest) Reset() { *m = GetBlockResultsByHeightRequest{} } -func (m *GetBlockResultsByHeightRequest) String() string { return proto.CompactTextString(m) } -func (*GetBlockResultsByHeightRequest) ProtoMessage() {} -func (*GetBlockResultsByHeightRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{9} -} -func (m *GetBlockResultsByHeightRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockResultsByHeightRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockResultsByHeightRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockResultsByHeightRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockResultsByHeightRequest.Merge(m, src) -} -func (m *GetBlockResultsByHeightRequest) XXX_Size() int { - return m.Size() -} -func (m *GetBlockResultsByHeightRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockResultsByHeightRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockResultsByHeightRequest proto.InternalMessageInfo - -func (m *GetBlockResultsByHeightRequest) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -// GetBlockResultsByHeightResponse is the response type for the Query/GetBlockResultsByHeight RPC method. -type GetBlockResultsByHeightResponse struct { - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - TxsResults []*types3.ResponseDeliverTx `protobuf:"bytes,2,rep,name=txs_results,json=txsResults,proto3" json:"txs_results,omitempty"` - ResBeginBlock *types3.ResponseBeginBlock `protobuf:"bytes,3,opt,name=res_begin_block,json=resBeginBlock,proto3" json:"res_begin_block,omitempty"` - ResEndBlock *types3.ResponseEndBlock `protobuf:"bytes,4,opt,name=res_end_block,json=resEndBlock,proto3" json:"res_end_block,omitempty"` -} - -func (m *GetBlockResultsByHeightResponse) Reset() { *m = GetBlockResultsByHeightResponse{} } -func (m *GetBlockResultsByHeightResponse) String() string { return proto.CompactTextString(m) } -func (*GetBlockResultsByHeightResponse) ProtoMessage() {} -func (*GetBlockResultsByHeightResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{10} -} -func (m *GetBlockResultsByHeightResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockResultsByHeightResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockResultsByHeightResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockResultsByHeightResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockResultsByHeightResponse.Merge(m, src) -} -func (m *GetBlockResultsByHeightResponse) XXX_Size() int { - return m.Size() -} -func (m *GetBlockResultsByHeightResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockResultsByHeightResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockResultsByHeightResponse proto.InternalMessageInfo - -func (m *GetBlockResultsByHeightResponse) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *GetBlockResultsByHeightResponse) GetTxsResults() []*types3.ResponseDeliverTx { - if m != nil { - return m.TxsResults - } - return nil -} - -func (m *GetBlockResultsByHeightResponse) GetResBeginBlock() *types3.ResponseBeginBlock { - if m != nil { - return m.ResBeginBlock - } - return nil -} - -func (m *GetBlockResultsByHeightResponse) GetResEndBlock() *types3.ResponseEndBlock { - if m != nil { - return m.ResEndBlock - } - return nil -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -type GetLatestBlockRequest struct { -} - -func (m *GetLatestBlockRequest) Reset() { *m = GetLatestBlockRequest{} } -func (m *GetLatestBlockRequest) String() string { return proto.CompactTextString(m) } -func (*GetLatestBlockRequest) ProtoMessage() {} -func (*GetLatestBlockRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{11} -} -func (m *GetLatestBlockRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetLatestBlockRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetLatestBlockRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetLatestBlockRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetLatestBlockRequest.Merge(m, src) -} -func (m *GetLatestBlockRequest) XXX_Size() int { - return m.Size() -} -func (m *GetLatestBlockRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetLatestBlockRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetLatestBlockRequest proto.InternalMessageInfo - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -type GetLatestBlockResponse struct { - BlockId *types1.BlockID `protobuf:"bytes,1,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types2.Block `protobuf:"bytes,2,opt,name=block,proto3" json:"block,omitempty"` -} - -func (m *GetLatestBlockResponse) Reset() { *m = GetLatestBlockResponse{} } -func (m *GetLatestBlockResponse) String() string { return proto.CompactTextString(m) } -func (*GetLatestBlockResponse) ProtoMessage() {} -func (*GetLatestBlockResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{12} -} -func (m *GetLatestBlockResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetLatestBlockResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetLatestBlockResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetLatestBlockResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetLatestBlockResponse.Merge(m, src) -} -func (m *GetLatestBlockResponse) XXX_Size() int { - return m.Size() -} -func (m *GetLatestBlockResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetLatestBlockResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetLatestBlockResponse proto.InternalMessageInfo - -func (m *GetLatestBlockResponse) GetBlockId() *types1.BlockID { - if m != nil { - return m.BlockId - } - return nil -} - -func (m *GetLatestBlockResponse) GetBlock() *types2.Block { - if m != nil { - return m.Block - } - return nil -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -type GetSyncingRequest struct { -} - -func (m *GetSyncingRequest) Reset() { *m = GetSyncingRequest{} } -func (m *GetSyncingRequest) String() string { return proto.CompactTextString(m) } -func (*GetSyncingRequest) ProtoMessage() {} -func (*GetSyncingRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{13} -} -func (m *GetSyncingRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSyncingRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSyncingRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetSyncingRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSyncingRequest.Merge(m, src) -} -func (m *GetSyncingRequest) XXX_Size() int { - return m.Size() -} -func (m *GetSyncingRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetSyncingRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetSyncingRequest proto.InternalMessageInfo - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -type GetSyncingResponse struct { - Syncing bool `protobuf:"varint,1,opt,name=syncing,proto3" json:"syncing,omitempty"` -} - -func (m *GetSyncingResponse) Reset() { *m = GetSyncingResponse{} } -func (m *GetSyncingResponse) String() string { return proto.CompactTextString(m) } -func (*GetSyncingResponse) ProtoMessage() {} -func (*GetSyncingResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{14} -} -func (m *GetSyncingResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetSyncingResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetSyncingResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetSyncingResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetSyncingResponse.Merge(m, src) -} -func (m *GetSyncingResponse) XXX_Size() int { - return m.Size() -} -func (m *GetSyncingResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetSyncingResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetSyncingResponse proto.InternalMessageInfo - -func (m *GetSyncingResponse) GetSyncing() bool { - if m != nil { - return m.Syncing - } - return false -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -type GetNodeInfoRequest struct { -} - -func (m *GetNodeInfoRequest) Reset() { *m = GetNodeInfoRequest{} } -func (m *GetNodeInfoRequest) String() string { return proto.CompactTextString(m) } -func (*GetNodeInfoRequest) ProtoMessage() {} -func (*GetNodeInfoRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{15} -} -func (m *GetNodeInfoRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetNodeInfoRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetNodeInfoRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetNodeInfoRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetNodeInfoRequest.Merge(m, src) -} -func (m *GetNodeInfoRequest) XXX_Size() int { - return m.Size() -} -func (m *GetNodeInfoRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetNodeInfoRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetNodeInfoRequest proto.InternalMessageInfo - -// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. -type GetNodeInfoResponse struct { - DefaultNodeInfo *p2p.DefaultNodeInfo `protobuf:"bytes,1,opt,name=default_node_info,json=defaultNodeInfo,proto3" json:"default_node_info,omitempty"` - ApplicationVersion *VersionInfo `protobuf:"bytes,2,opt,name=application_version,json=applicationVersion,proto3" json:"application_version,omitempty"` -} - -func (m *GetNodeInfoResponse) Reset() { *m = GetNodeInfoResponse{} } -func (m *GetNodeInfoResponse) String() string { return proto.CompactTextString(m) } -func (*GetNodeInfoResponse) ProtoMessage() {} -func (*GetNodeInfoResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{16} -} -func (m *GetNodeInfoResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetNodeInfoResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetNodeInfoResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetNodeInfoResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetNodeInfoResponse.Merge(m, src) -} -func (m *GetNodeInfoResponse) XXX_Size() int { - return m.Size() -} -func (m *GetNodeInfoResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetNodeInfoResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetNodeInfoResponse proto.InternalMessageInfo - -func (m *GetNodeInfoResponse) GetDefaultNodeInfo() *p2p.DefaultNodeInfo { - if m != nil { - return m.DefaultNodeInfo - } - return nil -} - -func (m *GetNodeInfoResponse) GetApplicationVersion() *VersionInfo { - if m != nil { - return m.ApplicationVersion - } - return nil -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -type VersionInfo struct { - Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` - AppName string `protobuf:"bytes,2,opt,name=app_name,json=appName,proto3" json:"app_name,omitempty"` - Version string `protobuf:"bytes,3,opt,name=version,proto3" json:"version,omitempty"` - GitCommit string `protobuf:"bytes,4,opt,name=git_commit,json=gitCommit,proto3" json:"git_commit,omitempty"` - BuildTags string `protobuf:"bytes,5,opt,name=build_tags,json=buildTags,proto3" json:"build_tags,omitempty"` - GoVersion string `protobuf:"bytes,6,opt,name=go_version,json=goVersion,proto3" json:"go_version,omitempty"` - BuildDeps []*Module `protobuf:"bytes,7,rep,name=build_deps,json=buildDeps,proto3" json:"build_deps,omitempty"` - // Since: cosmos-sdk 0.43 - LbmSdkVersion string `protobuf:"bytes,8,opt,name=lbm_sdk_version,json=lbmSdkVersion,proto3" json:"lbm_sdk_version,omitempty"` -} - -func (m *VersionInfo) Reset() { *m = VersionInfo{} } -func (m *VersionInfo) String() string { return proto.CompactTextString(m) } -func (*VersionInfo) ProtoMessage() {} -func (*VersionInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{17} -} -func (m *VersionInfo) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *VersionInfo) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_VersionInfo.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *VersionInfo) XXX_Merge(src proto.Message) { - xxx_messageInfo_VersionInfo.Merge(m, src) -} -func (m *VersionInfo) XXX_Size() int { - return m.Size() -} -func (m *VersionInfo) XXX_DiscardUnknown() { - xxx_messageInfo_VersionInfo.DiscardUnknown(m) -} - -var xxx_messageInfo_VersionInfo proto.InternalMessageInfo - -func (m *VersionInfo) GetName() string { - if m != nil { - return m.Name - } - return "" -} - -func (m *VersionInfo) GetAppName() string { - if m != nil { - return m.AppName - } - return "" -} - -func (m *VersionInfo) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *VersionInfo) GetGitCommit() string { - if m != nil { - return m.GitCommit - } - return "" -} - -func (m *VersionInfo) GetBuildTags() string { - if m != nil { - return m.BuildTags - } - return "" -} - -func (m *VersionInfo) GetGoVersion() string { - if m != nil { - return m.GoVersion - } - return "" -} - -func (m *VersionInfo) GetBuildDeps() []*Module { - if m != nil { - return m.BuildDeps - } - return nil -} - -func (m *VersionInfo) GetLbmSdkVersion() string { - if m != nil { - return m.LbmSdkVersion - } - return "" -} - -// Module is the type for VersionInfo -type Module struct { - // module path - Path string `protobuf:"bytes,1,opt,name=path,proto3" json:"path,omitempty"` - // module version - Version string `protobuf:"bytes,2,opt,name=version,proto3" json:"version,omitempty"` - // checksum - Sum string `protobuf:"bytes,3,opt,name=sum,proto3" json:"sum,omitempty"` -} - -func (m *Module) Reset() { *m = Module{} } -func (m *Module) String() string { return proto.CompactTextString(m) } -func (*Module) ProtoMessage() {} -func (*Module) Descriptor() ([]byte, []int) { - return fileDescriptor_9cad75434dcac7b6, []int{18} -} -func (m *Module) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *Module) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_Module.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *Module) XXX_Merge(src proto.Message) { - xxx_messageInfo_Module.Merge(m, src) -} -func (m *Module) XXX_Size() int { - return m.Size() -} -func (m *Module) XXX_DiscardUnknown() { - xxx_messageInfo_Module.DiscardUnknown(m) -} - -var xxx_messageInfo_Module proto.InternalMessageInfo - -func (m *Module) GetPath() string { - if m != nil { - return m.Path - } - return "" -} - -func (m *Module) GetVersion() string { - if m != nil { - return m.Version - } - return "" -} - -func (m *Module) GetSum() string { - if m != nil { - return m.Sum - } - return "" -} - -func init() { - proto.RegisterType((*GetValidatorSetByHeightRequest)(nil), "lbm.base.ostracon.v1.GetValidatorSetByHeightRequest") - proto.RegisterType((*GetValidatorSetByHeightResponse)(nil), "lbm.base.ostracon.v1.GetValidatorSetByHeightResponse") - proto.RegisterType((*GetLatestValidatorSetRequest)(nil), "lbm.base.ostracon.v1.GetLatestValidatorSetRequest") - proto.RegisterType((*GetLatestValidatorSetResponse)(nil), "lbm.base.ostracon.v1.GetLatestValidatorSetResponse") - proto.RegisterType((*Validator)(nil), "lbm.base.ostracon.v1.Validator") - proto.RegisterType((*GetBlockByHeightRequest)(nil), "lbm.base.ostracon.v1.GetBlockByHeightRequest") - proto.RegisterType((*GetBlockByHeightResponse)(nil), "lbm.base.ostracon.v1.GetBlockByHeightResponse") - proto.RegisterType((*GetBlockByHashRequest)(nil), "lbm.base.ostracon.v1.GetBlockByHashRequest") - proto.RegisterType((*GetBlockByHashResponse)(nil), "lbm.base.ostracon.v1.GetBlockByHashResponse") - proto.RegisterType((*GetBlockResultsByHeightRequest)(nil), "lbm.base.ostracon.v1.GetBlockResultsByHeightRequest") - proto.RegisterType((*GetBlockResultsByHeightResponse)(nil), "lbm.base.ostracon.v1.GetBlockResultsByHeightResponse") - proto.RegisterType((*GetLatestBlockRequest)(nil), "lbm.base.ostracon.v1.GetLatestBlockRequest") - proto.RegisterType((*GetLatestBlockResponse)(nil), "lbm.base.ostracon.v1.GetLatestBlockResponse") - proto.RegisterType((*GetSyncingRequest)(nil), "lbm.base.ostracon.v1.GetSyncingRequest") - proto.RegisterType((*GetSyncingResponse)(nil), "lbm.base.ostracon.v1.GetSyncingResponse") - proto.RegisterType((*GetNodeInfoRequest)(nil), "lbm.base.ostracon.v1.GetNodeInfoRequest") - proto.RegisterType((*GetNodeInfoResponse)(nil), "lbm.base.ostracon.v1.GetNodeInfoResponse") - proto.RegisterType((*VersionInfo)(nil), "lbm.base.ostracon.v1.VersionInfo") - proto.RegisterType((*Module)(nil), "lbm.base.ostracon.v1.Module") -} - -func init() { proto.RegisterFile("lbm/base/ostracon/v1/query.proto", fileDescriptor_9cad75434dcac7b6) } - -var fileDescriptor_9cad75434dcac7b6 = []byte{ - // 1308 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0x4f, 0x6f, 0x1b, 0x45, - 0x14, 0xef, 0x3a, 0x6d, 0x9c, 0x8c, 0x5b, 0xda, 0x4e, 0xff, 0x39, 0x26, 0x75, 0x92, 0x2d, 0x6d, - 0x42, 0xd3, 0xec, 0x2a, 0x6e, 0x41, 0x48, 0x1c, 0x10, 0x69, 0xda, 0xb4, 0x2a, 0x54, 0xd1, 0xa6, - 0xe2, 0xc0, 0x65, 0x35, 0xbb, 0x3b, 0x5e, 0x8f, 0xb2, 0xde, 0x99, 0xee, 0x8c, 0x4d, 0xad, 0xaa, - 0x12, 0xe2, 0xc0, 0x85, 0x0b, 0x82, 0x03, 0x3d, 0x72, 0xe0, 0xc8, 0x11, 0x71, 0x81, 0x0f, 0xc0, - 0x01, 0xa1, 0x4a, 0x5c, 0x38, 0xa2, 0x96, 0x0f, 0x82, 0x76, 0x66, 0xd6, 0xde, 0x4d, 0xd6, 0xae, - 0xcb, 0xa1, 0x12, 0x17, 0x6b, 0xe7, 0xfd, 0xfd, 0xbd, 0xdf, 0xcc, 0xbc, 0x37, 0x06, 0xcb, 0x91, - 0xd7, 0xb5, 0x3d, 0xc4, 0xb1, 0x4d, 0xb9, 0x48, 0x90, 0x4f, 0x63, 0xbb, 0xbf, 0x69, 0x3f, 0xec, - 0xe1, 0x64, 0x60, 0xb1, 0x84, 0x0a, 0x0a, 0xcf, 0x46, 0x5e, 0xd7, 0x4a, 0x2d, 0xac, 0xcc, 0xc2, - 0xea, 0x6f, 0x36, 0x16, 0x42, 0x4a, 0xc3, 0x08, 0xdb, 0xd2, 0xc6, 0xeb, 0xb5, 0x6d, 0x14, 0x6b, - 0x87, 0xc6, 0xa2, 0x56, 0x21, 0x46, 0x6c, 0x14, 0xc7, 0x54, 0x20, 0x41, 0x68, 0xcc, 0xb5, 0xb6, - 0x31, 0xcc, 0x23, 0x06, 0x0c, 0x73, 0xdb, 0x8b, 0xa8, 0xbf, 0x3f, 0x46, 0x27, 0x7f, 0xb5, 0x6e, - 0x61, 0xa8, 0x43, 0x9e, 0x4f, 0x0a, 0xaa, 0xab, 0x3e, 0xe5, 0x5d, 0xca, 0x55, 0x19, 0x12, 0xba, - 0xdd, 0xdf, 0xf4, 0xb0, 0x40, 0x9b, 0x36, 0x43, 0x21, 0x89, 0x65, 0xfe, 0x2c, 0x85, 0xc0, 0x71, - 0x80, 0x93, 0x2e, 0x89, 0x85, 0xcd, 0x5a, 0xac, 0x10, 0x67, 0x31, 0xa7, 0x3b, 0x0c, 0xe0, 0xcd, - 0x9c, 0xf6, 0x20, 0x04, 0xf3, 0x73, 0x03, 0x34, 0x77, 0xb0, 0xf8, 0x04, 0x45, 0x24, 0x40, 0x82, - 0x26, 0x7b, 0x58, 0x6c, 0x0d, 0xee, 0x60, 0x12, 0x76, 0x84, 0x83, 0x1f, 0xf6, 0x30, 0x17, 0xf0, - 0x3c, 0x98, 0xed, 0x48, 0x41, 0xdd, 0x58, 0x36, 0xd6, 0x66, 0x1c, 0xbd, 0x82, 0xb7, 0x01, 0x18, - 0xa1, 0xac, 0x57, 0x96, 0x8d, 0xb5, 0x5a, 0xeb, 0x8a, 0xa5, 0x4a, 0x52, 0xbc, 0xab, 0xdd, 0xd0, - 0x25, 0x59, 0xbb, 0x28, 0xc4, 0x3a, 0xa6, 0x93, 0xf3, 0x34, 0xff, 0x30, 0xc0, 0xd2, 0x58, 0x08, - 0x9c, 0xd1, 0x98, 0x63, 0xb8, 0x02, 0x8e, 0x4b, 0xbe, 0xdd, 0x02, 0x92, 0x9a, 0x94, 0x29, 0x53, - 0xf8, 0x01, 0x00, 0xfd, 0x2c, 0x04, 0xaf, 0x57, 0x96, 0x67, 0xd6, 0x6a, 0xad, 0x25, 0xab, 0xec, - 0x0c, 0x58, 0xc3, 0x54, 0x4e, 0xce, 0x05, 0xee, 0x14, 0xea, 0x99, 0x91, 0xf5, 0xac, 0xbe, 0xb4, - 0x1e, 0x05, 0xb0, 0x50, 0x50, 0x1b, 0x2c, 0xee, 0x60, 0xf1, 0x11, 0x12, 0x98, 0x17, 0xaa, 0xca, - 0x08, 0x2d, 0x12, 0x67, 0xfc, 0x67, 0xe2, 0x7e, 0x37, 0xc0, 0xc5, 0x31, 0x89, 0xfe, 0x8f, 0xb4, - 0xfd, 0x60, 0x80, 0xf9, 0x61, 0x0a, 0x58, 0x07, 0x55, 0x14, 0x04, 0x09, 0xe6, 0x5c, 0xa2, 0x9e, - 0x77, 0xb2, 0x25, 0xdc, 0x00, 0x55, 0xd6, 0xf3, 0xdc, 0x7d, 0x3c, 0xd0, 0x87, 0xee, 0xac, 0xa5, - 0x2e, 0xae, 0x95, 0xdd, 0x69, 0xeb, 0xc3, 0x78, 0xe0, 0xcc, 0xb2, 0x9e, 0x77, 0x0f, 0x0f, 0x52, - 0x0e, 0xfa, 0x54, 0x90, 0x38, 0x74, 0x19, 0xfd, 0x0c, 0x27, 0x12, 0xe1, 0x8c, 0x53, 0x53, 0xb2, - 0xdd, 0x54, 0x04, 0xd7, 0xc1, 0x69, 0x96, 0x50, 0x46, 0x39, 0x4e, 0x5c, 0x96, 0x10, 0x9a, 0x10, - 0x31, 0xa8, 0x1f, 0x95, 0x76, 0xa7, 0x32, 0xc5, 0xae, 0x96, 0x9b, 0x9b, 0xe0, 0xc2, 0x0e, 0x16, - 0x5b, 0x29, 0x85, 0x53, 0xde, 0x14, 0xf3, 0x09, 0xa8, 0x1f, 0x76, 0xd1, 0x5b, 0x74, 0x03, 0xcc, - 0xa9, 0x2d, 0x22, 0x81, 0x3e, 0x0a, 0x0b, 0xd6, 0xe8, 0xc2, 0x5a, 0xea, 0xae, 0x4a, 0xd7, 0xbb, - 0xdb, 0x4e, 0x55, 0x9a, 0xde, 0x0d, 0xe0, 0x3a, 0x38, 0x26, 0x3f, 0x35, 0x03, 0xe7, 0x46, 0xfb, - 0x94, 0x73, 0x70, 0x94, 0x8d, 0xb9, 0x0e, 0xce, 0xe5, 0xd2, 0x23, 0xde, 0xc9, 0xf0, 0x42, 0x70, - 0xb4, 0x83, 0x78, 0x47, 0xe6, 0x3d, 0xee, 0xc8, 0x6f, 0xf3, 0x31, 0x38, 0x7f, 0xd0, 0xf8, 0xf5, - 0x21, 0x7d, 0x4f, 0x36, 0x23, 0x25, 0xc2, 0xbc, 0x17, 0x09, 0x3e, 0x2d, 0xc5, 0xdf, 0x54, 0x64, - 0x13, 0x29, 0x77, 0xd5, 0x05, 0x8c, 0x6b, 0x64, 0x37, 0x41, 0x4d, 0x3c, 0xe2, 0x6e, 0xa2, 0xdc, - 0xf4, 0x1d, 0x30, 0xf3, 0xb5, 0xa5, 0x6d, 0xd3, 0xca, 0xe2, 0x6c, 0xe3, 0x88, 0xf4, 0x71, 0xf2, - 0xe0, 0x91, 0x03, 0xc4, 0x23, 0xae, 0x93, 0xc1, 0x7b, 0xe0, 0x64, 0x82, 0xb9, 0xeb, 0xe1, 0x90, - 0xc4, 0xae, 0xaa, 0x58, 0xdd, 0x85, 0x4b, 0x63, 0x03, 0x6d, 0xa5, 0xb6, 0x0a, 0xf1, 0x89, 0x04, - 0xf3, 0xd1, 0x12, 0xde, 0x02, 0xa9, 0xc0, 0xc5, 0x71, 0xa0, 0x43, 0x1d, 0x95, 0xa1, 0x56, 0xc6, - 0x86, 0xba, 0x15, 0x07, 0x2a, 0x50, 0x2d, 0xc1, 0x3c, 0x5b, 0x98, 0x17, 0xe4, 0xc6, 0xab, 0xfe, - 0xa0, 0x99, 0x91, 0x2c, 0xea, 0x4d, 0x2e, 0x28, 0x5e, 0xdf, 0x26, 0x9f, 0x01, 0xa7, 0x77, 0xb0, - 0xd8, 0x1b, 0xc4, 0x3e, 0x89, 0xc3, 0x0c, 0x91, 0x05, 0x60, 0x5e, 0xa8, 0xd1, 0xd4, 0x41, 0x95, - 0x2b, 0x91, 0x04, 0x33, 0xe7, 0x64, 0x4b, 0xf3, 0xac, 0xb4, 0xbf, 0x4f, 0x03, 0x7c, 0x37, 0x6e, - 0xd3, 0x2c, 0xca, 0xcf, 0x06, 0x38, 0x53, 0x10, 0xeb, 0x38, 0xf7, 0xc0, 0xe9, 0x00, 0xb7, 0x51, - 0x2f, 0x12, 0x6e, 0x4c, 0x03, 0xec, 0x92, 0xb8, 0x4d, 0x75, 0x79, 0x4b, 0xf9, 0xf2, 0x58, 0x8b, - 0x59, 0xdb, 0xca, 0x70, 0x18, 0xe3, 0x64, 0x50, 0x14, 0x40, 0x07, 0x9c, 0x41, 0x8c, 0x45, 0xc4, - 0x97, 0x6d, 0xcb, 0xed, 0xe3, 0x84, 0x8f, 0x06, 0xe0, 0xca, 0x98, 0xd6, 0xa9, 0x8c, 0x64, 0x40, - 0x98, 0xf3, 0xd6, 0x72, 0xf3, 0x69, 0x05, 0xd4, 0x72, 0x36, 0xe9, 0xcd, 0x8c, 0x51, 0x17, 0xeb, - 0xd6, 0x27, 0xbf, 0xe1, 0x02, 0x98, 0x43, 0x8c, 0xb9, 0x52, 0x5e, 0xd1, 0x2d, 0x91, 0xb1, 0xfb, - 0xa9, 0xaa, 0x0e, 0xaa, 0x19, 0x8c, 0x19, 0xa5, 0xd1, 0x4b, 0x78, 0x11, 0x80, 0x90, 0x08, 0xd7, - 0xa7, 0xdd, 0x2e, 0x11, 0xf2, 0x18, 0xcd, 0x3b, 0xf3, 0x21, 0x11, 0x37, 0xa5, 0x20, 0x55, 0x7b, - 0x3d, 0x12, 0x05, 0xae, 0x40, 0x21, 0xaf, 0x1f, 0x53, 0x6a, 0x29, 0x79, 0x80, 0x42, 0x2e, 0xbd, - 0xe9, 0xb0, 0xc2, 0x59, 0xed, 0x4d, 0x35, 0x52, 0xf8, 0x7e, 0xe6, 0x1d, 0x60, 0xc6, 0xeb, 0x55, - 0x79, 0x6f, 0x16, 0xcb, 0x09, 0xf8, 0x98, 0x06, 0xbd, 0x08, 0xeb, 0xd8, 0xdb, 0x98, 0x71, 0x78, - 0x05, 0x9c, 0x8c, 0xbc, 0xae, 0xcb, 0x83, 0xfd, 0x61, 0x82, 0x39, 0x99, 0xe0, 0x44, 0xe4, 0x75, - 0xf7, 0x82, 0xfd, 0x8c, 0x9a, 0x3b, 0x60, 0x56, 0x39, 0xa7, 0xa4, 0x30, 0x24, 0x3a, 0x19, 0x29, - 0xe9, 0x77, 0xbe, 0xf2, 0x4a, 0xb1, 0xf2, 0x53, 0x60, 0x86, 0xf7, 0xba, 0x9a, 0x8f, 0xf4, 0xb3, - 0xf5, 0x23, 0x00, 0xd5, 0x3d, 0x9c, 0xf4, 0x89, 0x8f, 0xe1, 0x57, 0x06, 0xa8, 0xe5, 0x4e, 0x0a, - 0x5c, 0x2b, 0x87, 0x7d, 0xf8, 0x8c, 0x35, 0xde, 0x9e, 0xc2, 0x52, 0x1d, 0x3b, 0x73, 0xf5, 0x8b, - 0x3f, 0xff, 0xf9, 0xb6, 0xb2, 0x02, 0x97, 0xec, 0xd2, 0xc7, 0xea, 0xf0, 0x28, 0xc2, 0x2f, 0x0d, - 0x00, 0x46, 0xc7, 0x1f, 0xae, 0x8e, 0x4d, 0x51, 0xbc, 0x35, 0x8d, 0xb5, 0x97, 0x1b, 0x6a, 0x28, - 0x97, 0x25, 0x94, 0x25, 0x78, 0xb1, 0x1c, 0x8a, 0xbe, 0x56, 0xf0, 0xa9, 0x01, 0xde, 0x28, 0x76, - 0x06, 0xb8, 0x3e, 0x36, 0xc7, 0xe1, 0xc6, 0xd2, 0xb8, 0x36, 0x9d, 0xb1, 0x06, 0xb5, 0x2e, 0x41, - 0x5d, 0x86, 0x97, 0xca, 0x41, 0xc9, 0x76, 0xc1, 0xed, 0x48, 0x7a, 0xc2, 0xef, 0x0d, 0x70, 0xea, - 0xe0, 0x14, 0x85, 0x1b, 0x63, 0xf3, 0x95, 0x0d, 0xe8, 0x86, 0x35, 0xad, 0xb9, 0x06, 0xb8, 0x21, - 0x01, 0xae, 0xc2, 0xcb, 0x13, 0x01, 0x3e, 0x56, 0x73, 0xe4, 0x09, 0xfc, 0x4e, 0xb1, 0x97, 0x1b, - 0x9e, 0x13, 0xd8, 0x3b, 0x3c, 0x8f, 0x27, 0xb0, 0x57, 0x32, 0x8f, 0xcd, 0xab, 0x12, 0xdc, 0x5b, - 0xd0, 0x9c, 0x00, 0xce, 0x7e, 0x9c, 0x0e, 0xf5, 0x27, 0xf0, 0x17, 0x63, 0xf4, 0x6a, 0x39, 0x30, - 0x1e, 0xe1, 0x8d, 0xc9, 0x59, 0xcb, 0x07, 0x71, 0xe3, 0x9d, 0x57, 0xf4, 0xd2, 0xa0, 0xaf, 0x4b, - 0xd0, 0x1b, 0x70, 0x7d, 0x02, 0x68, 0x3d, 0x88, 0x47, 0xbc, 0xfe, 0x64, 0xe4, 0x06, 0x59, 0xfe, - 0xa1, 0x0b, 0x5b, 0x2f, 0x39, 0x6f, 0x25, 0xcf, 0xef, 0xc6, 0xf5, 0x57, 0xf2, 0xd1, 0xb8, 0x5b, - 0x12, 0xf7, 0x35, 0x78, 0xb5, 0x1c, 0xf7, 0xe8, 0x3d, 0x8c, 0xc5, 0xf0, 0xc4, 0xfe, 0xaa, 0x48, - 0x2f, 0xfb, 0x63, 0x33, 0x81, 0xf4, 0x09, 0x7f, 0xc5, 0x26, 0x90, 0x3e, 0xe9, 0xdf, 0x93, 0x79, - 0x43, 0x82, 0xb7, 0xe0, 0xb5, 0x69, 0xc0, 0x67, 0xac, 0x6f, 0xed, 0xfe, 0xf6, 0xbc, 0x69, 0x3c, - 0x7b, 0xde, 0x34, 0xfe, 0x7e, 0xde, 0x34, 0xbe, 0x7e, 0xd1, 0x3c, 0xf2, 0xec, 0x45, 0xf3, 0xc8, - 0x5f, 0x2f, 0x9a, 0x47, 0x3e, 0x7d, 0x37, 0x24, 0xa2, 0xd3, 0xf3, 0x2c, 0x9f, 0x76, 0xed, 0xdb, - 0x24, 0xe6, 0x7e, 0x87, 0x20, 0xbb, 0xad, 0x3f, 0x36, 0x78, 0xb0, 0x6f, 0xfb, 0x11, 0xc1, 0xb1, - 0xb0, 0xc3, 0x84, 0xf9, 0x36, 0xf5, 0xb9, 0x6a, 0xba, 0xde, 0xac, 0x7c, 0xa0, 0x5f, 0xff, 0x37, - 0x00, 0x00, 0xff, 0xff, 0xd1, 0x8e, 0xbc, 0x6c, 0xbc, 0x0f, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ServiceClient interface { - // GetNodeInfo queries the current node info. - GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) - // GetSyncing queries node syncing. - GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) - // GetLatestBlock returns the latest block. - GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) - // GetBlockByHash queries block for given hash. - GetBlockByHash(ctx context.Context, in *GetBlockByHashRequest, opts ...grpc.CallOption) (*GetBlockByHashResponse, error) - // GetBlockResultsByHeight queries block results for given height. - GetBlockResultsByHeight(ctx context.Context, in *GetBlockResultsByHeightRequest, opts ...grpc.CallOption) (*GetBlockResultsByHeightResponse, error) - // GetLatestValidatorSet queries latest validator-set. - GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) - // GetValidatorSetByHeight queries validator-set at a given height. - GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) -} - -type serviceClient struct { - cc grpc1.ClientConn -} - -func NewServiceClient(cc grpc1.ClientConn) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) GetNodeInfo(ctx context.Context, in *GetNodeInfoRequest, opts ...grpc.CallOption) (*GetNodeInfoResponse, error) { - out := new(GetNodeInfoResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetNodeInfo", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetSyncing(ctx context.Context, in *GetSyncingRequest, opts ...grpc.CallOption) (*GetSyncingResponse, error) { - out := new(GetSyncingResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetSyncing", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetLatestBlock(ctx context.Context, in *GetLatestBlockRequest, opts ...grpc.CallOption) (*GetLatestBlockResponse, error) { - out := new(GetLatestBlockResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetLatestBlock", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeightRequest, opts ...grpc.CallOption) (*GetBlockByHeightResponse, error) { - out := new(GetBlockByHeightResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetBlockByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetBlockByHash(ctx context.Context, in *GetBlockByHashRequest, opts ...grpc.CallOption) (*GetBlockByHashResponse, error) { - out := new(GetBlockByHashResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetBlockByHash", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetBlockResultsByHeight(ctx context.Context, in *GetBlockResultsByHeightRequest, opts ...grpc.CallOption) (*GetBlockResultsByHeightResponse, error) { - out := new(GetBlockResultsByHeightResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetBlockResultsByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetLatestValidatorSet(ctx context.Context, in *GetLatestValidatorSetRequest, opts ...grpc.CallOption) (*GetLatestValidatorSetResponse, error) { - out := new(GetLatestValidatorSetResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetLatestValidatorSet", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *serviceClient) GetValidatorSetByHeight(ctx context.Context, in *GetValidatorSetByHeightRequest, opts ...grpc.CallOption) (*GetValidatorSetByHeightResponse, error) { - out := new(GetValidatorSetByHeightResponse) - err := c.cc.Invoke(ctx, "/lbm.base.ostracon.v1.Service/GetValidatorSetByHeight", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceServer is the server API for Service service. -type ServiceServer interface { - // GetNodeInfo queries the current node info. - GetNodeInfo(context.Context, *GetNodeInfoRequest) (*GetNodeInfoResponse, error) - // GetSyncing queries node syncing. - GetSyncing(context.Context, *GetSyncingRequest) (*GetSyncingResponse, error) - // GetLatestBlock returns the latest block. - GetLatestBlock(context.Context, *GetLatestBlockRequest) (*GetLatestBlockResponse, error) - // GetBlockByHeight queries block for given height. - GetBlockByHeight(context.Context, *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) - // GetBlockByHash queries block for given hash. - GetBlockByHash(context.Context, *GetBlockByHashRequest) (*GetBlockByHashResponse, error) - // GetBlockResultsByHeight queries block results for given height. - GetBlockResultsByHeight(context.Context, *GetBlockResultsByHeightRequest) (*GetBlockResultsByHeightResponse, error) - // GetLatestValidatorSet queries latest validator-set. - GetLatestValidatorSet(context.Context, *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) - // GetValidatorSetByHeight queries validator-set at a given height. - GetValidatorSetByHeight(context.Context, *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) -} - -// UnimplementedServiceServer can be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (*UnimplementedServiceServer) GetNodeInfo(ctx context.Context, req *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetNodeInfo not implemented") -} -func (*UnimplementedServiceServer) GetSyncing(ctx context.Context, req *GetSyncingRequest) (*GetSyncingResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSyncing not implemented") -} -func (*UnimplementedServiceServer) GetLatestBlock(ctx context.Context, req *GetLatestBlockRequest) (*GetLatestBlockResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestBlock not implemented") -} -func (*UnimplementedServiceServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHeight not implemented") -} -func (*UnimplementedServiceServer) GetBlockByHash(ctx context.Context, req *GetBlockByHashRequest) (*GetBlockByHashResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockByHash not implemented") -} -func (*UnimplementedServiceServer) GetBlockResultsByHeight(ctx context.Context, req *GetBlockResultsByHeightRequest) (*GetBlockResultsByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockResultsByHeight not implemented") -} -func (*UnimplementedServiceServer) GetLatestValidatorSet(ctx context.Context, req *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetLatestValidatorSet not implemented") -} -func (*UnimplementedServiceServer) GetValidatorSetByHeight(ctx context.Context, req *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetValidatorSetByHeight not implemented") -} - -func RegisterServiceServer(s grpc1.Server, srv ServiceServer) { - s.RegisterService(&_Service_serviceDesc, srv) -} - -func _Service_GetNodeInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetNodeInfoRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetNodeInfo(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetNodeInfo", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetNodeInfo(ctx, req.(*GetNodeInfoRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetSyncing_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetSyncingRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetSyncing(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetSyncing", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetSyncing(ctx, req.(*GetSyncingRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetLatestBlock_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLatestBlockRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetLatestBlock(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetLatestBlock", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetLatestBlock(ctx, req.(*GetLatestBlockRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetBlockByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetBlockByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetBlockByHeight(ctx, req.(*GetBlockByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetBlockByHash_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockByHashRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetBlockByHash(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetBlockByHash", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetBlockByHash(ctx, req.(*GetBlockByHashRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetBlockResultsByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockResultsByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetBlockResultsByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetBlockResultsByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetBlockResultsByHeight(ctx, req.(*GetBlockResultsByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetLatestValidatorSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetLatestValidatorSetRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetLatestValidatorSet(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetLatestValidatorSet", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetLatestValidatorSet(ctx, req.(*GetLatestValidatorSetRequest)) - } - return interceptor(ctx, in, info, handler) -} - -func _Service_GetValidatorSetByHeight_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetValidatorSetByHeightRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetValidatorSetByHeight(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.base.ostracon.v1.Service/GetValidatorSetByHeight", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetValidatorSetByHeight(ctx, req.(*GetValidatorSetByHeightRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Service_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lbm.base.ostracon.v1.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetNodeInfo", - Handler: _Service_GetNodeInfo_Handler, - }, - { - MethodName: "GetSyncing", - Handler: _Service_GetSyncing_Handler, - }, - { - MethodName: "GetLatestBlock", - Handler: _Service_GetLatestBlock_Handler, - }, - { - MethodName: "GetBlockByHeight", - Handler: _Service_GetBlockByHeight_Handler, - }, - { - MethodName: "GetBlockByHash", - Handler: _Service_GetBlockByHash_Handler, - }, - { - MethodName: "GetBlockResultsByHeight", - Handler: _Service_GetBlockResultsByHeight_Handler, - }, - { - MethodName: "GetLatestValidatorSet", - Handler: _Service_GetLatestValidatorSet_Handler, - }, - { - MethodName: "GetValidatorSetByHeight", - Handler: _Service_GetValidatorSetByHeight_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lbm/base/ostracon/v1/query.proto", -} - -func (m *GetValidatorSetByHeightRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetValidatorSetByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetValidatorSetByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Height != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetValidatorSetByHeightResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetValidatorSetByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetValidatorSetByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetLatestValidatorSetRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetLatestValidatorSetRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetLatestValidatorSetRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetLatestValidatorSetResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetLatestValidatorSetResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetLatestValidatorSetResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.Validators) > 0 { - for iNdEx := len(m.Validators) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Validators[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.BlockHeight != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.BlockHeight)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *Validator) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Validator) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Validator) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ProposerPriority != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.ProposerPriority)) - i-- - dAtA[i] = 0x20 - } - if m.VotingPower != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.VotingPower)) - i-- - dAtA[i] = 0x18 - } - if m.PubKey != nil { - { - size, err := m.PubKey.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Address) > 0 { - i -= len(m.Address) - copy(dAtA[i:], m.Address) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Address))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetBlockByHeightRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetBlockByHeightResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockId != nil { - { - size, err := m.BlockId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetBlockByHashRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockByHashRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockByHashRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Hash) > 0 { - i -= len(m.Hash) - copy(dAtA[i:], m.Hash) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Hash))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetBlockByHashResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockByHashResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockByHashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockId != nil { - { - size, err := m.BlockId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetBlockResultsByHeightRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockResultsByHeightRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockResultsByHeightRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Height != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetBlockResultsByHeightResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockResultsByHeightResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockResultsByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ResEndBlock != nil { - { - size, err := m.ResEndBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.ResBeginBlock != nil { - { - size, err := m.ResBeginBlock.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if len(m.TxsResults) > 0 { - for iNdEx := len(m.TxsResults) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.TxsResults[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - } - if m.Height != 0 { - i = encodeVarintQuery(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetLatestBlockRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetLatestBlockRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetLatestBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GetLatestBlockResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetLatestBlockResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetLatestBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.BlockId != nil { - { - size, err := m.BlockId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *GetSyncingRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetSyncingRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetSyncingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GetSyncingResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetSyncingResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetSyncingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Syncing { - i-- - if m.Syncing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetNodeInfoRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetNodeInfoRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetNodeInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - return len(dAtA) - i, nil -} - -func (m *GetNodeInfoResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetNodeInfoResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetNodeInfoResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.ApplicationVersion != nil { - { - size, err := m.ApplicationVersion.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.DefaultNodeInfo != nil { - { - size, err := m.DefaultNodeInfo.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *VersionInfo) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *VersionInfo) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *VersionInfo) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.LbmSdkVersion) > 0 { - i -= len(m.LbmSdkVersion) - copy(dAtA[i:], m.LbmSdkVersion) - i = encodeVarintQuery(dAtA, i, uint64(len(m.LbmSdkVersion))) - i-- - dAtA[i] = 0x42 - } - if len(m.BuildDeps) > 0 { - for iNdEx := len(m.BuildDeps) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.BuildDeps[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintQuery(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x3a - } - } - if len(m.GoVersion) > 0 { - i -= len(m.GoVersion) - copy(dAtA[i:], m.GoVersion) - i = encodeVarintQuery(dAtA, i, uint64(len(m.GoVersion))) - i-- - dAtA[i] = 0x32 - } - if len(m.BuildTags) > 0 { - i -= len(m.BuildTags) - copy(dAtA[i:], m.BuildTags) - i = encodeVarintQuery(dAtA, i, uint64(len(m.BuildTags))) - i-- - dAtA[i] = 0x2a - } - if len(m.GitCommit) > 0 { - i -= len(m.GitCommit) - copy(dAtA[i:], m.GitCommit) - i = encodeVarintQuery(dAtA, i, uint64(len(m.GitCommit))) - i-- - dAtA[i] = 0x22 - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x1a - } - if len(m.AppName) > 0 { - i -= len(m.AppName) - copy(dAtA[i:], m.AppName) - i = encodeVarintQuery(dAtA, i, uint64(len(m.AppName))) - i-- - dAtA[i] = 0x12 - } - if len(m.Name) > 0 { - i -= len(m.Name) - copy(dAtA[i:], m.Name) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Name))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func (m *Module) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *Module) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *Module) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if len(m.Sum) > 0 { - i -= len(m.Sum) - copy(dAtA[i:], m.Sum) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Sum))) - i-- - dAtA[i] = 0x1a - } - if len(m.Version) > 0 { - i -= len(m.Version) - copy(dAtA[i:], m.Version) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Version))) - i-- - dAtA[i] = 0x12 - } - if len(m.Path) > 0 { - i -= len(m.Path) - copy(dAtA[i:], m.Path) - i = encodeVarintQuery(dAtA, i, uint64(len(m.Path))) - i-- - dAtA[i] = 0xa - } - return len(dAtA) - i, nil -} - -func encodeVarintQuery(dAtA []byte, offset int, v uint64) int { - offset -= sovQuery(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GetValidatorSetByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovQuery(uint64(m.Height)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetValidatorSetByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovQuery(uint64(m.BlockHeight)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetLatestValidatorSetRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetLatestValidatorSetResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockHeight != 0 { - n += 1 + sovQuery(uint64(m.BlockHeight)) - } - if len(m.Validators) > 0 { - for _, e := range m.Validators { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *Validator) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Address) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if m.PubKey != nil { - l = m.PubKey.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.VotingPower != 0 { - n += 1 + sovQuery(uint64(m.VotingPower)) - } - if m.ProposerPriority != 0 { - n += 1 + sovQuery(uint64(m.ProposerPriority)) - } - return n -} - -func (m *GetBlockByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovQuery(uint64(m.Height)) - } - return n -} - -func (m *GetBlockByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockId != nil { - l = m.BlockId.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetBlockByHashRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Hash) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetBlockByHashResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockId != nil { - l = m.BlockId.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetBlockResultsByHeightRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovQuery(uint64(m.Height)) - } - return n -} - -func (m *GetBlockResultsByHeightResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovQuery(uint64(m.Height)) - } - if len(m.TxsResults) > 0 { - for _, e := range m.TxsResults { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - if m.ResBeginBlock != nil { - l = m.ResBeginBlock.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.ResEndBlock != nil { - l = m.ResEndBlock.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetLatestBlockRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GetLatestBlockResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.BlockId != nil { - l = m.BlockId.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *GetSyncingRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GetSyncingResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Syncing { - n += 2 - } - return n -} - -func (m *GetNodeInfoRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - return n -} - -func (m *GetNodeInfoResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.DefaultNodeInfo != nil { - l = m.DefaultNodeInfo.Size() - n += 1 + l + sovQuery(uint64(l)) - } - if m.ApplicationVersion != nil { - l = m.ApplicationVersion.Size() - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *VersionInfo) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Name) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.AppName) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.GitCommit) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.BuildTags) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.GoVersion) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - if len(m.BuildDeps) > 0 { - for _, e := range m.BuildDeps { - l = e.Size() - n += 1 + l + sovQuery(uint64(l)) - } - } - l = len(m.LbmSdkVersion) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func (m *Module) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - l = len(m.Path) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Version) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - l = len(m.Sum) - if l > 0 { - n += 1 + l + sovQuery(uint64(l)) - } - return n -} - -func sovQuery(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozQuery(x uint64) (n int) { - return sovQuery(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GetValidatorSetByHeightRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetValidatorSetByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetValidatorSetByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetValidatorSetByHeightResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetValidatorSetByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetValidatorSetByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetLatestValidatorSetRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetLatestValidatorSetRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetLatestValidatorSetRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetLatestValidatorSetResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetLatestValidatorSetResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetLatestValidatorSetResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockHeight", wireType) - } - m.BlockHeight = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.BlockHeight |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Validators", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Validators = append(m.Validators, &Validator{}) - if err := m.Validators[len(m.Validators)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Validator) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: Validator: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Validator: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Address", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Address = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field PubKey", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.PubKey == nil { - m.PubKey = &types.Any{} - } - if err := m.PubKey.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field VotingPower", wireType) - } - m.VotingPower = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.VotingPower |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ProposerPriority", wireType) - } - m.ProposerPriority = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.ProposerPriority |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockByHeightRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockByHeightResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockId == nil { - m.BlockId = &types1.BlockID{} - } - if err := m.BlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &types2.Block{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockByHashRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockByHashRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockByHashRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Hash", wireType) - } - var byteLen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - byteLen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if byteLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + byteLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Hash = append(m.Hash[:0], dAtA[iNdEx:postIndex]...) - if m.Hash == nil { - m.Hash = []byte{} - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockByHashResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockByHashResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockByHashResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockId == nil { - m.BlockId = &types1.BlockID{} - } - if err := m.BlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &types2.Block{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockResultsByHeightRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockResultsByHeightRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockResultsByHeightRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockResultsByHeightResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockResultsByHeightResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockResultsByHeightResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field TxsResults", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.TxsResults = append(m.TxsResults, &types3.ResponseDeliverTx{}) - if err := m.TxsResults[len(m.TxsResults)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResBeginBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResBeginBlock == nil { - m.ResBeginBlock = &types3.ResponseBeginBlock{} - } - if err := m.ResBeginBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ResEndBlock", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ResEndBlock == nil { - m.ResEndBlock = &types3.ResponseEndBlock{} - } - if err := m.ResEndBlock.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetLatestBlockRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetLatestBlockRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetLatestBlockRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetLatestBlockResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetLatestBlockResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetLatestBlockResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockId == nil { - m.BlockId = &types1.BlockID{} - } - if err := m.BlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &types2.Block{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSyncingRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetSyncingRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSyncingRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetSyncingResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetSyncingResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetSyncingResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Syncing", wireType) - } - var v int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - v |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - m.Syncing = bool(v != 0) - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetNodeInfoRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetNodeInfoRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetNodeInfoRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetNodeInfoResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetNodeInfoResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetNodeInfoResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field DefaultNodeInfo", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.DefaultNodeInfo == nil { - m.DefaultNodeInfo = &p2p.DefaultNodeInfo{} - } - if err := m.DefaultNodeInfo.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field ApplicationVersion", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.ApplicationVersion == nil { - m.ApplicationVersion = &VersionInfo{} - } - if err := m.ApplicationVersion.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *VersionInfo) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: VersionInfo: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: VersionInfo: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Name", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Name = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field AppName", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.AppName = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GitCommit", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GitCommit = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 5: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildTags", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuildTags = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 6: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field GoVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.GoVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 7: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BuildDeps", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.BuildDeps = append(m.BuildDeps, &Module{}) - if err := m.BuildDeps[len(m.BuildDeps)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 8: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field LbmSdkVersion", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.LbmSdkVersion = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *Module) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: Module: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: Module: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Path", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Path = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Version", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Version = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Sum", wireType) - } - var stringLen uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowQuery - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - stringLen |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - intStringLen := int(stringLen) - if intStringLen < 0 { - return ErrInvalidLengthQuery - } - postIndex := iNdEx + intStringLen - if postIndex < 0 { - return ErrInvalidLengthQuery - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Sum = string(dAtA[iNdEx:postIndex]) - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipQuery(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthQuery - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipQuery(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowQuery - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthQuery - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupQuery - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthQuery - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthQuery = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowQuery = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupQuery = fmt.Errorf("proto: unexpected end of group") -) diff --git a/client/grpc/ocservice/query.pb.gw.go b/client/grpc/ocservice/query.pb.gw.go deleted file mode 100644 index 49b3c6d462..0000000000 --- a/client/grpc/ocservice/query.pb.gw.go +++ /dev/null @@ -1,762 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: lbm/base/ostracon/v1/query.proto - -/* -Package ocservice is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package ocservice - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -func request_Service_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNodeInfoRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetNodeInfo(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetNodeInfo_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetNodeInfoRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetNodeInfo(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Service_GetSyncing_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSyncingRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetSyncing(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetSyncing_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetSyncingRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetSyncing(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Service_GetLatestBlock_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLatestBlockRequest - var metadata runtime.ServerMetadata - - msg, err := client.GetLatestBlock(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetLatestBlock_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLatestBlockRequest - var metadata runtime.ServerMetadata - - msg, err := server.GetLatestBlock(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Service_GetBlockByHeight_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockByHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - msg, err := client.GetBlockByHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetBlockByHeight_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockByHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - msg, err := server.GetBlockByHeight(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Service_GetBlockByHash_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockByHashRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["hash"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "hash") - } - - protoReq.Hash, err = runtime.Bytes(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "hash", err) - } - - msg, err := client.GetBlockByHash(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetBlockByHash_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockByHashRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["hash"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "hash") - } - - protoReq.Hash, err = runtime.Bytes(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "hash", err) - } - - msg, err := server.GetBlockByHash(ctx, &protoReq) - return msg, metadata, err - -} - -func request_Service_GetBlockResultsByHeight_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockResultsByHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - msg, err := client.GetBlockResultsByHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetBlockResultsByHeight_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockResultsByHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - msg, err := server.GetBlockResultsByHeight(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Service_GetLatestValidatorSet_0 = &utilities.DoubleArray{Encoding: map[string]int{}, Base: []int(nil), Check: []int(nil)} -) - -func request_Service_GetLatestValidatorSet_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLatestValidatorSetRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetLatestValidatorSet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetLatestValidatorSet(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetLatestValidatorSet_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetLatestValidatorSetRequest - var metadata runtime.ServerMetadata - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetLatestValidatorSet_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetLatestValidatorSet(ctx, &protoReq) - return msg, metadata, err - -} - -var ( - filter_Service_GetValidatorSetByHeight_0 = &utilities.DoubleArray{Encoding: map[string]int{"height": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Service_GetValidatorSetByHeight_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorSetByHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetValidatorSetByHeight_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetValidatorSetByHeight(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetValidatorSetByHeight_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetValidatorSetByHeightRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetValidatorSetByHeight_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetValidatorSetByHeight(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterServiceHandlerServer registers the http handlers for service Service to "mux". -// UnaryRPC :call ServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. -func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { - - mux.Handle("GET", pattern_Service_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetNodeInfo_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetNodeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetSyncing_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetSyncing_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetSyncing_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetLatestBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetLatestBlock_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetLatestBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetBlockByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetBlockByHeight_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockByHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetBlockByHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetBlockByHash_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockByHash_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetBlockResultsByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetBlockResultsByHeight_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockResultsByHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetLatestValidatorSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetLatestValidatorSet_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetLatestValidatorSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetValidatorSetByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetValidatorSetByHeight_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetValidatorSetByHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterServiceHandler(ctx, mux, conn) -} - -// RegisterServiceHandler registers the http handlers for service Service to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterServiceHandlerClient(ctx, mux, NewServiceClient(conn)) -} - -// RegisterServiceHandlerClient registers the http handlers for service Service -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ServiceClient" to call the correct interceptors. -func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error { - - mux.Handle("GET", pattern_Service_GetNodeInfo_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetNodeInfo_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetNodeInfo_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetSyncing_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetSyncing_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetSyncing_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetLatestBlock_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetLatestBlock_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetLatestBlock_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetBlockByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetBlockByHeight_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockByHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetBlockByHash_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetBlockByHash_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockByHash_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetBlockResultsByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetBlockResultsByHeight_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockResultsByHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetLatestValidatorSet_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetLatestValidatorSet_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetLatestValidatorSet_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - mux.Handle("GET", pattern_Service_GetValidatorSetByHeight_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetValidatorSetByHeight_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetValidatorSetByHeight_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Service_GetNodeInfo_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"lbm", "base", "ostracon", "v1", "node_info"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Service_GetSyncing_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4}, []string{"lbm", "base", "ostracon", "v1", "syncing"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Service_GetLatestBlock_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"lbm", "base", "ostracon", "v1", "blocks", "latest"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Service_GetBlockByHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"lbm", "base", "ostracon", "v1", "blocks", "height"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Service_GetBlockByHash_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"lbm", "base", "ostracon", "v1", "block", "hash"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Service_GetBlockResultsByHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"lbm", "base", "ostracon", "v1", "blockresults", "height"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Service_GetLatestValidatorSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"lbm", "base", "ostracon", "v1", "validatorsets", "latest"}, "", runtime.AssumeColonVerbOpt(false))) - - pattern_Service_GetValidatorSetByHeight_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"lbm", "base", "ostracon", "v1", "validatorsets", "height"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Service_GetNodeInfo_0 = runtime.ForwardResponseMessage - - forward_Service_GetSyncing_0 = runtime.ForwardResponseMessage - - forward_Service_GetLatestBlock_0 = runtime.ForwardResponseMessage - - forward_Service_GetBlockByHeight_0 = runtime.ForwardResponseMessage - - forward_Service_GetBlockByHash_0 = runtime.ForwardResponseMessage - - forward_Service_GetBlockResultsByHeight_0 = runtime.ForwardResponseMessage - - forward_Service_GetLatestValidatorSet_0 = runtime.ForwardResponseMessage - - forward_Service_GetValidatorSetByHeight_0 = runtime.ForwardResponseMessage -) diff --git a/client/grpc/ocservice/service.go b/client/grpc/ocservice/service.go deleted file mode 100644 index 2ce793e5ff..0000000000 --- a/client/grpc/ocservice/service.go +++ /dev/null @@ -1,263 +0,0 @@ -package ocservice - -import ( - "context" - "crypto/sha256" - - gogogrpc "github.com/gogo/protobuf/grpc" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - abci "github.com/tendermint/tendermint/abci/types" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/Finschia/finschia-sdk/client" - "github.com/Finschia/finschia-sdk/client/grpc/tmservice" - "github.com/Finschia/finschia-sdk/client/rpc" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" - qtypes "github.com/Finschia/finschia-sdk/types/query" - "github.com/Finschia/finschia-sdk/version" -) - -// This is the struct that we will implement all the handlers on. -type queryServer struct { - clientCtx client.Context - interfaceRegistry codectypes.InterfaceRegistry -} - -var ( - _ ServiceServer = queryServer{} - _ codectypes.UnpackInterfacesMessage = &GetLatestValidatorSetResponse{} -) - -// NewQueryServer creates a new tendermint query server. -func NewQueryServer(clientCtx client.Context, interfaceRegistry codectypes.InterfaceRegistry) ServiceServer { - return queryServer{ - clientCtx: clientCtx, - interfaceRegistry: interfaceRegistry, - } -} - -// GetSyncing implements ServiceServer.GetSyncing -func (s queryServer) GetSyncing(ctx context.Context, _ *GetSyncingRequest) (*GetSyncingResponse, error) { - status, err := tmservice.GetNodeStatus(ctx, s.clientCtx) - if err != nil { - return nil, err - } - return &GetSyncingResponse{ - Syncing: status.SyncInfo.CatchingUp, - }, nil -} - -// GetLatestBlock implements ServiceServer.GetLatestBlock -func (s queryServer) GetLatestBlock(ctx context.Context, _ *GetLatestBlockRequest) (*GetLatestBlockResponse, error) { - status, err := tmservice.GetBlock(ctx, s.clientCtx, nil) - if err != nil { - return nil, err - } - - protoBlockID := status.BlockID.ToProto() - protoBlock, err := status.Block.ToProto() - if err != nil { - return nil, err - } - - return &GetLatestBlockResponse{ - BlockId: &protoBlockID, - Block: protoBlock, - }, nil -} - -// GetBlockByHeight implements ServiceServer.GetBlockByHeight -func (s queryServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeightRequest) (*GetBlockByHeightResponse, error) { - chainHeight, err := rpc.GetChainHeight(s.clientCtx) - if err != nil { - return nil, err - } - - if req.Height > chainHeight { - return nil, status.Error(codes.InvalidArgument, "requested block height is bigger then the chain length") - } - - protoBlockID, protoBlock, err := tmservice.GetProtoBlock(ctx, s.clientCtx, &req.Height) - if err != nil { - return nil, err - } - return &GetBlockByHeightResponse{ - BlockId: &protoBlockID, - Block: protoBlock, - }, nil -} - -// GetBlockByHash implements ServiceServer.GetBlockByHash -func (s queryServer) GetBlockByHash(_ context.Context, req *GetBlockByHashRequest) (*GetBlockByHashResponse, error) { - if n := len(req.Hash); n != sha256.Size { - if n == 0 { - return nil, status.Error(codes.InvalidArgument, "block hash cannot be empty") - } - return nil, status.Error(codes.InvalidArgument, "the length of block hash must be 32") - } - - res, err := tmservice.GetBlockByHash(s.clientCtx, req.Hash) - if err != nil { - return nil, err - } - protoBlockID := res.BlockID.ToProto() - protoBlock, err := res.Block.ToProto() - if err != nil { - return nil, err - } - return &GetBlockByHashResponse{ - BlockId: &protoBlockID, - Block: protoBlock, - }, nil -} - -// GetBlockResultsByHeight implements ServiceServer.GetBlockResultsByHeight -func (s queryServer) GetBlockResultsByHeight(_ context.Context, req *GetBlockResultsByHeightRequest) (*GetBlockResultsByHeightResponse, error) { - res, err := tmservice.GetBlockResultsByHeight(s.clientCtx, &req.Height) - if err != nil { - return nil, err - } - return &GetBlockResultsByHeightResponse{ - Height: res.Height, - TxsResults: res.TxsResults, - ResBeginBlock: &abci.ResponseBeginBlock{ - Events: res.BeginBlockEvents, - }, - ResEndBlock: &abci.ResponseEndBlock{ - ValidatorUpdates: res.ValidatorUpdates, - ConsensusParamUpdates: res.ConsensusParamUpdates, - Events: res.EndBlockEvents, - }, - }, nil -} - -// GetLatestValidatorSet implements ServiceServer.GetLatestValidatorSet -func (s queryServer) GetLatestValidatorSet(ctx context.Context, req *GetLatestValidatorSetRequest) (*GetLatestValidatorSetResponse, error) { - page, limit, err := qtypes.ParsePagination(req.Pagination) - if err != nil { - return nil, err - } - return validatorsOutput(ctx, s.clientCtx, nil, page, limit) -} - -func (m *GetLatestValidatorSetResponse) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { - var pubKey cryptotypes.PubKey - for _, val := range m.Validators { - err := unpacker.UnpackAny(val.PubKey, &pubKey) - if err != nil { - return err - } - } - return nil -} - -// GetValidatorSetByHeight implements ServiceServer.GetValidatorSetByHeight -func (s queryServer) GetValidatorSetByHeight(ctx context.Context, req *GetValidatorSetByHeightRequest) (*GetValidatorSetByHeightResponse, error) { - page, limit, err := qtypes.ParsePagination(req.Pagination) - if err != nil { - return nil, err - } - - chainHeight, err := rpc.GetChainHeight(s.clientCtx) - if err != nil { - return nil, status.Error(codes.Internal, "failed to parse chain height") - } - if req.Height > chainHeight { - return nil, status.Error(codes.InvalidArgument, "requested block height is bigger then the chain length") - } - r, err := validatorsOutput(ctx, s.clientCtx, &req.Height, page, limit) - if err != nil { - return nil, err - } - return &GetValidatorSetByHeightResponse{ - BlockHeight: r.BlockHeight, - Validators: r.Validators, - Pagination: r.Pagination, - }, nil -} - -func validatorsOutput(ctx context.Context, cctx client.Context, height *int64, page, limit int) (*GetLatestValidatorSetResponse, error) { - vs, err := rpc.GetValidators(ctx, cctx, height, &page, &limit) - if err != nil { - return nil, err - } - resp := GetLatestValidatorSetResponse{ - BlockHeight: vs.BlockHeight, - Validators: make([]*Validator, len(vs.Validators)), - Pagination: &qtypes.PageResponse{ - Total: vs.Total, - }, - } - for i, v := range vs.Validators { - anyPub, err := codectypes.NewAnyWithValue(v.PubKey) - if err != nil { - return nil, err - } - resp.Validators[i] = &Validator{ - Address: v.Address.String(), - ProposerPriority: v.ProposerPriority, - PubKey: anyPub, - VotingPower: v.VotingPower, - } - } - return &resp, nil -} - -// GetNodeInfo implements ServiceServer.GetNodeInfo -func (s queryServer) GetNodeInfo(ctx context.Context, req *GetNodeInfoRequest) (*GetNodeInfoResponse, error) { - status, err := tmservice.GetNodeStatus(ctx, s.clientCtx) - if err != nil { - return nil, err - } - - protoNodeInfo := status.NodeInfo.ToProto() - nodeInfo := version.NewInfo() - - deps := make([]*Module, len(nodeInfo.BuildDeps)) - - for i, dep := range nodeInfo.BuildDeps { - deps[i] = &Module{ - Path: dep.Path, - Sum: dep.Sum, - Version: dep.Version, - } - } - - resp := GetNodeInfoResponse{ - DefaultNodeInfo: protoNodeInfo, - ApplicationVersion: &VersionInfo{ - AppName: nodeInfo.AppName, - Name: nodeInfo.Name, - GitCommit: nodeInfo.GitCommit, - GoVersion: nodeInfo.GoVersion, - Version: nodeInfo.Version, - BuildTags: nodeInfo.BuildTags, - BuildDeps: deps, - LbmSdkVersion: nodeInfo.LbmSdkVersion, - }, - } - return &resp, nil -} - -// RegisterTendermintService registers the tendermint queries on the gRPC router. -func RegisterTendermintService( - qrt gogogrpc.Server, - clientCtx client.Context, - interfaceRegistry codectypes.InterfaceRegistry, -) { - RegisterServiceServer( - qrt, - NewQueryServer(clientCtx, interfaceRegistry), - ) -} - -// RegisterGRPCGatewayRoutes mounts the tendermint service's GRPC-gateway routes on the -// given Mux. -func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux) { - err := RegisterServiceHandlerClient(context.Background(), mux, NewServiceClient(clientConn)) - if err != nil { - panic(err) - } -} diff --git a/client/grpc/ocservice/service_test.go b/client/grpc/ocservice/service_test.go deleted file mode 100644 index 50c2029681..0000000000 --- a/client/grpc/ocservice/service_test.go +++ /dev/null @@ -1,340 +0,0 @@ -package ocservice_test - -import ( - "context" - "encoding/base64" - "fmt" - "testing" - - "github.com/stretchr/testify/suite" - - "github.com/Finschia/ostracon/libs/bytes" - - "github.com/Finschia/finschia-sdk/client/grpc/ocservice" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" - "github.com/Finschia/finschia-sdk/testutil/network" - "github.com/Finschia/finschia-sdk/testutil/rest" - qtypes "github.com/Finschia/finschia-sdk/types/query" - "github.com/Finschia/finschia-sdk/version" -) - -type IntegrationTestSuite struct { - suite.Suite - - cfg network.Config - network *network.Network - - queryClient ocservice.ServiceClient -} - -func (s *IntegrationTestSuite) SetupSuite() { - s.T().Log("setting up integration test suite") - - cfg := network.DefaultConfig() - cfg.NumValidators = 1 - - s.cfg = cfg - s.network = network.New(s.T(), cfg) - - s.Require().NotNil(s.network) - - _, err := s.network.WaitForHeight(1) - s.Require().NoError(err) - - s.queryClient = ocservice.NewServiceClient(s.network.Validators[0].ClientCtx) -} - -func (s *IntegrationTestSuite) TearDownSuite() { - s.T().Log("tearing down integration test suite") - s.network.Cleanup() -} - -func (s *IntegrationTestSuite) TestQueryNodeInfo() { - val := s.network.Validators[0] - - res, err := s.queryClient.GetNodeInfo(context.Background(), &ocservice.GetNodeInfoRequest{}) - s.Require().NoError(err) - s.Require().Equal(res.ApplicationVersion.AppName, version.NewInfo().AppName) - - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/node_info", val.APIAddress)) - s.Require().NoError(err) - var getInfoRes ocservice.GetNodeInfoResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &getInfoRes)) - s.Require().Equal(getInfoRes.ApplicationVersion.AppName, version.NewInfo().AppName) -} - -func (s *IntegrationTestSuite) TestQuerySyncing() { - val := s.network.Validators[0] - - _, err := s.queryClient.GetSyncing(context.Background(), &ocservice.GetSyncingRequest{}) - s.Require().NoError(err) - - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/syncing", val.APIAddress)) - s.Require().NoError(err) - var syncingRes ocservice.GetSyncingResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &syncingRes)) -} - -func (s *IntegrationTestSuite) TestQueryLatestBlock() { - val := s.network.Validators[0] - _, err := s.queryClient.GetLatestBlock(context.Background(), &ocservice.GetLatestBlockRequest{}) - s.Require().NoError(err) - - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/blocks/latest", val.APIAddress)) - s.Require().NoError(err) - var blockInfoRes ocservice.GetLatestBlockResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) -} - -func (s *IntegrationTestSuite) TestQueryBlockByHash() { - val := s.network.Validators[0] - node, _ := val.ClientCtx.GetNode() - blk, _ := node.Block(context.Background(), nil) - blkhash := blk.BlockID.Hash - - tcs := []struct { - hash bytes.HexBytes - isErr bool - err string - }{ - {blkhash, false, ""}, - {bytes.HexBytes("wrong hash"), true, "the length of block hash must be 32: invalid request"}, - {bytes.HexBytes(""), true, "block hash cannot be empty"}, - } - - for _, tc := range tcs { - _, err := s.queryClient.GetBlockByHash(context.Background(), &ocservice.GetBlockByHashRequest{Hash: tc.hash}) - if tc.isErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.err) - } else { - s.Require().NoError(err) - } - } - - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/block/%s", val.APIAddress, base64.URLEncoding.EncodeToString(blkhash))) - s.Require().NoError(err) - var blockInfoRes ocservice.GetBlockByHashResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) - blockId := blockInfoRes.GetBlockId() - s.Require().Equal(blkhash, bytes.HexBytes(blockId.Hash)) - - block := blockInfoRes.GetBlock() - s.Require().Equal(val.ClientCtx.ChainID, block.Header.ChainID) -} - -func (s *IntegrationTestSuite) TestGetLatestBlock() { - val := s.network.Validators[0] - latestHeight, err := s.network.LatestHeight() - s.Require().NoError(err) - - blockRes, err := s.queryClient.GetLatestBlock(context.Background(), &ocservice.GetLatestBlockRequest{}) - s.Require().NoError(err) - s.Require().NotNil(blockRes) - s.Require().Equal(latestHeight, blockRes.Block.Header.Height) - - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/blocks/latest", val.APIAddress)) - s.Require().NoError(err) - var blockInfoRes ocservice.GetLatestBlockResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) - s.Require().Equal(blockRes.Block.Header.Height, blockInfoRes.Block.Header.Height) -} - -func (s *IntegrationTestSuite) TestQueryBlockByHeight() { - val := s.network.Validators[0] - _, err := s.queryClient.GetBlockByHeight(context.Background(), &ocservice.GetBlockByHeightRequest{}) - s.Require().Error(err) - - _, err = s.queryClient.GetBlockByHeight(context.Background(), &ocservice.GetBlockByHeightRequest{Height: 1}) - s.Require().NoError(err) - - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/blocks/%d", val.APIAddress, 1)) - s.Require().NoError(err) - var blockInfoRes ocservice.GetBlockByHeightResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockInfoRes)) - - block := blockInfoRes.GetBlock() - s.Require().Equal(int64(1), block.Header.Height) -} - -func (s *IntegrationTestSuite) TestQueryBlockResultsByHeight() { - val := s.network.Validators[0] - _, err := s.queryClient.GetBlockResultsByHeight(context.Background(), &ocservice.GetBlockResultsByHeightRequest{Height: 1}) - s.Require().NoError(err) - - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/blockresults/%d", val.APIAddress, 1)) - s.Require().NoError(err) - var blockResultsRes ocservice.GetBlockResultsByHeightResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &blockResultsRes)) - - txResult := blockResultsRes.GetTxsResults() - s.Require().Equal(0, len(txResult)) - - beginBlock := blockResultsRes.GetResBeginBlock() - s.Require().Equal(6, len(beginBlock.Events)) // coinbase event (2) + transfer mintModule to feeCollectorName(3) + mint event - - endBlock := blockResultsRes.GetResEndBlock() - s.Require().Equal(0, len(endBlock.Events)) -} - -func (s *IntegrationTestSuite) TestQueryLatestValidatorSet() { - val := s.network.Validators[0] - - // nil pagination - res, err := s.queryClient.GetLatestValidatorSet(context.Background(), &ocservice.GetLatestValidatorSetRequest{ - Pagination: nil, - }) - s.Require().NoError(err) - s.Require().Equal(1, len(res.Validators)) - content, ok := res.Validators[0].PubKey.GetCachedValue().(cryptotypes.PubKey) - s.Require().Equal(true, ok) - s.Require().Equal(content, val.PubKey) - - // with pagination - _, err = s.queryClient.GetLatestValidatorSet(context.Background(), &ocservice.GetLatestValidatorSetRequest{Pagination: &qtypes.PageRequest{ - Offset: 0, - Limit: 10, - }}) - s.Require().NoError(err) - - // rest request without pagination - _, err = rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/latest", val.APIAddress)) - s.Require().NoError(err) - - // rest request with pagination - restRes, err := rest.GetRequest(fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/latest?pagination.offset=%d&pagination.limit=%d", val.APIAddress, 0, 1)) - s.Require().NoError(err) - var validatorSetRes ocservice.GetLatestValidatorSetResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(restRes, &validatorSetRes)) - s.Require().Equal(1, len(validatorSetRes.Validators)) - anyPub, err := codectypes.NewAnyWithValue(val.PubKey) - s.Require().NoError(err) - s.Require().Equal(validatorSetRes.Validators[0].PubKey, anyPub) -} - -func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPC() { - vals := s.network.Validators - testCases := []struct { - name string - req *ocservice.GetLatestValidatorSetRequest - expErr bool - expErrMsg string - }{ - {"nil request", nil, true, "cannot be nil"}, - {"no pagination", &ocservice.GetLatestValidatorSetRequest{}, false, ""}, - {"with pagination", &ocservice.GetLatestValidatorSetRequest{Pagination: &qtypes.PageRequest{Offset: 0, Limit: uint64(len(vals))}}, false, ""}, - } - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - grpcRes, err := s.queryClient.GetLatestValidatorSet(context.Background(), tc.req) - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrMsg) - } else { - s.Require().NoError(err) - s.Require().Len(grpcRes.Validators, len(vals)) - s.Require().Equal(grpcRes.Pagination.Total, uint64(len(vals))) - content, ok := grpcRes.Validators[0].PubKey.GetCachedValue().(cryptotypes.PubKey) - s.Require().Equal(true, ok) - s.Require().Equal(content, vals[0].PubKey) - } - }) - } -} - -func (s *IntegrationTestSuite) TestLatestValidatorSet_GRPCGateway() { - vals := s.network.Validators - testCases := []struct { - name string - url string - expErr bool - expErrMsg string - }{ - {"no pagination", fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/latest", vals[0].APIAddress), false, ""}, - {"pagination invalid fields", fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/latest?pagination.offset=-1&pagination.limit=-2", vals[0].APIAddress), true, "strconv.ParseUint"}, - {"with pagination", fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/latest?pagination.offset=0&pagination.limit=2", vals[0].APIAddress), false, ""}, - } - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - res, err := rest.GetRequest(tc.url) - s.Require().NoError(err) - if tc.expErr { - s.Require().Contains(string(res), tc.expErrMsg) - } else { - var result ocservice.GetLatestValidatorSetResponse - err = vals[0].ClientCtx.Codec.UnmarshalJSON(res, &result) - s.Require().NoError(err) - s.Require().Equal(uint64(len(vals)), result.Pagination.Total) - anyPub, err := codectypes.NewAnyWithValue(vals[0].PubKey) - s.Require().NoError(err) - s.Require().Equal(result.Validators[0].PubKey, anyPub) - } - }) - } -} - -func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPC() { - vals := s.network.Validators - testCases := []struct { - name string - req *ocservice.GetValidatorSetByHeightRequest - expErr bool - expErrMsg string - }{ - {"nil request", nil, true, "request cannot be nil"}, - {"empty request", &ocservice.GetValidatorSetByHeightRequest{}, true, "height must be greater than 0"}, - {"no pagination", &ocservice.GetValidatorSetByHeightRequest{Height: 1}, false, ""}, - {"with pagination", &ocservice.GetValidatorSetByHeightRequest{Height: 1, Pagination: &qtypes.PageRequest{Offset: 0, Limit: 1}}, false, ""}, - } - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - grpcRes, err := s.queryClient.GetValidatorSetByHeight(context.Background(), tc.req) - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrMsg) - } else { - s.Require().NoError(err) - s.Require().Len(grpcRes.Validators, len(vals)) - s.Require().Equal(grpcRes.Pagination.Total, uint64(len(vals))) - } - }) - } -} - -func (s *IntegrationTestSuite) TestValidatorSetByHeight_GRPCGateway() { - vals := s.network.Validators - testCases := []struct { - name string - url string - expErr bool - expErrMsg string - }{ - {"invalid height", fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/%d", vals[0].APIAddress, -1), true, "height must be greater than 0"}, - {"no pagination", fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/%d", vals[0].APIAddress, 1), false, ""}, - {"pagination invalid fields", fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/%d?pagination.offset=-1&pagination.limit=-2", vals[0].APIAddress, 1), true, "strconv.ParseUint"}, - {"with pagination", fmt.Sprintf("%s/lbm/base/ostracon/v1/validatorsets/%d?pagination.offset=0&pagination.limit=2", vals[0].APIAddress, 1), false, ""}, - } - for _, tc := range testCases { - tc := tc - s.Run(tc.name, func() { - res, err := rest.GetRequest(tc.url) - s.Require().NoError(err) - if tc.expErr { - s.Require().Contains(string(res), tc.expErrMsg) - } else { - var result ocservice.GetValidatorSetByHeightResponse - err = vals[0].ClientCtx.Codec.UnmarshalJSON(res, &result) - s.Require().NoError(err) - s.Require().Equal(uint64(len(vals)), result.Pagination.Total) - } - }) - } -} - -func TestIntegrationTestSuite(t *testing.T) { - suite.Run(t, new(IntegrationTestSuite)) -} diff --git a/client/grpc/tmservice/block.go b/client/grpc/tmservice/block.go index ae54290462..b45ea6cb10 100644 --- a/client/grpc/tmservice/block.go +++ b/client/grpc/tmservice/block.go @@ -4,9 +4,7 @@ import ( "context" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - ocproto "github.com/Finschia/ostracon/proto/ostracon/types" - ctypes "github.com/Finschia/ostracon/rpc/core/types" + ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/Finschia/finschia-sdk/client" ) @@ -41,7 +39,7 @@ func GetBlockResultsByHeight(clientCtx client.Context, height *int64) (*ctypes.R return node.BlockResults(context.Background(), height) } -func GetProtoBlock(ctx context.Context, clientCtx client.Context, height *int64) (tmproto.BlockID, *ocproto.Block, error) { +func GetProtoBlock(ctx context.Context, clientCtx client.Context, height *int64) (tmproto.BlockID, *tmproto.Block, error) { block, err := GetBlock(ctx, clientCtx, height) if err != nil { return tmproto.BlockID{}, nil, err diff --git a/client/grpc/tmservice/service.go b/client/grpc/tmservice/service.go index fa67ef4568..71323a186f 100644 --- a/client/grpc/tmservice/service.go +++ b/client/grpc/tmservice/service.go @@ -9,8 +9,6 @@ import ( "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - octypes "github.com/Finschia/ostracon/proto/ostracon/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/rpc" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -49,8 +47,8 @@ func (s queryServer) GetSyncing(ctx context.Context, _ *GetSyncingRequest) (*Get }, nil } -// ConvertOcProtoBlockToTmProtoBlock convert from ostracon proto block to tendermint proto block. -func ConvertOcProtoBlockToTmProtoBlock(block *octypes.Block) *tmtypes.Block { +// ConvertTmProtoBlockToTmProtoBlock convert from tendermint proto block to tendermint proto block. +func ConvertTmProtoBlockToTmProtoBlock(block *tmtypes.Block) *tmtypes.Block { return &tmtypes.Block{ Header: block.Header, Data: block.Data, @@ -74,7 +72,7 @@ func (s queryServer) GetLatestBlock(ctx context.Context, _ *GetLatestBlockReques return &GetLatestBlockResponse{ BlockId: &protoBlockID, - Block: ConvertOcProtoBlockToTmProtoBlock(protoBlock), + Block: protoBlock, }, nil } @@ -95,7 +93,7 @@ func (s queryServer) GetBlockByHeight(ctx context.Context, req *GetBlockByHeight } return &GetBlockByHeightResponse{ BlockId: &protoBlockID, - Block: ConvertOcProtoBlockToTmProtoBlock(protoBlock), + Block: protoBlock, }, nil } diff --git a/client/grpc/tmservice/status.go b/client/grpc/tmservice/status.go index b2975c188a..a5befa3cca 100644 --- a/client/grpc/tmservice/status.go +++ b/client/grpc/tmservice/status.go @@ -3,7 +3,7 @@ package tmservice import ( "context" - ctypes "github.com/Finschia/ostracon/rpc/core/types" + ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/Finschia/finschia-sdk/client" ) diff --git a/client/keys/add.go b/client/keys/add.go index 059d544c36..5b14ea8fd7 100644 --- a/client/keys/add.go +++ b/client/keys/add.go @@ -251,7 +251,7 @@ func runAddCmd(ctx client.Context, cmd *cobra.Command, args []string, inBuf *buf } if len(mnemonic) == 0 { - // read entropy seed straight from occrypto.Rand and convert to mnemonic + // read entropy seed straight from tmcrypto.Rand and convert to mnemonic entropySeed, err := bip39.NewEntropy(mnemonicEntropySize) if err != nil { return err diff --git a/client/keys/add_ledger_test.go b/client/keys/add_ledger_test.go index c32fdfaf40..31685d1ee9 100644 --- a/client/keys/add_ledger_test.go +++ b/client/keys/add_ledger_test.go @@ -11,8 +11,7 @@ import ( "testing" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/libs/cli" + "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" diff --git a/client/keys/add_test.go b/client/keys/add_test.go index 7550bae324..67233b3263 100644 --- a/client/keys/add_test.go +++ b/client/keys/add_test.go @@ -10,8 +10,7 @@ import ( "github.com/cosmos/go-bip39" "github.com/spf13/pflag" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/libs/cli" + "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" diff --git a/client/keys/import_test.go b/client/keys/import_test.go index 2d9d9c1c34..2a555c8a09 100644 --- a/client/keys/import_test.go +++ b/client/keys/import_test.go @@ -61,7 +61,7 @@ func Test_runImportCmd(t *testing.T) { }, } - armoredKey := `-----BEGIN OSTRACON PRIVATE KEY----- + armoredKey := `-----BEGIN TENDERMINT PRIVATE KEY----- kdf: bcrypt salt: A53F628182B827E07DD11A96EAB9D526 type: secp256k1 @@ -69,7 +69,7 @@ type: secp256k1 Ax9IQsSq+jOWkPRDJQ69a5/uUm4XliPim/CbYDVoXO6D3fts5IEXcUTmIa60ynC/ 8hzYAawzYMO95Kwi0NI8WW9wUv3TseSWFv6/RpU= =umYd ------END OSTRACON PRIVATE KEY-----` +-----END TENDERMINT PRIVATE KEY-----` for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { diff --git a/client/keys/parse.go b/client/keys/parse.go index d92f6648ad..4ccfef6b31 100644 --- a/client/keys/parse.go +++ b/client/keys/parse.go @@ -8,10 +8,9 @@ import ( "strings" "github.com/spf13/cobra" + "github.com/tendermint/tendermint/libs/cli" yaml "gopkg.in/yaml.v2" - "github.com/Finschia/ostracon/libs/cli" - sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/types/bech32" ) diff --git a/client/keys/root.go b/client/keys/root.go index 18e79cb592..47a426bb07 100644 --- a/client/keys/root.go +++ b/client/keys/root.go @@ -2,8 +2,7 @@ package keys import ( "github.com/spf13/cobra" - - "github.com/Finschia/ostracon/libs/cli" + "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" ) diff --git a/client/keys/show.go b/client/keys/show.go index a44abb1bf0..3106510413 100644 --- a/client/keys/show.go +++ b/client/keys/show.go @@ -5,8 +5,7 @@ import ( "fmt" "github.com/spf13/cobra" - - "github.com/Finschia/ostracon/libs/cli" + "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/crypto/keyring" diff --git a/client/pruning/main.go b/client/pruning/main.go index 4971c6db18..4c0419e61a 100644 --- a/client/pruning/main.go +++ b/client/pruning/main.go @@ -7,10 +7,9 @@ import ( "github.com/spf13/cobra" "github.com/spf13/viper" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/server" servertypes "github.com/Finschia/finschia-sdk/server/types" @@ -65,7 +64,7 @@ func PruningCmd(appCreator servertypes.AppCreator) *cobra.Command { return err } - logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) app := appCreator(logger, db, nil, vp) cms := app.CommitMultiStore() diff --git a/client/query.go b/client/query.go index 08f79ebbab..b37960df74 100644 --- a/client/query.go +++ b/client/query.go @@ -7,12 +7,11 @@ import ( "github.com/pkg/errors" abci "github.com/tendermint/tendermint/abci/types" + tmbytes "github.com/tendermint/tendermint/libs/bytes" + rpcclient "github.com/tendermint/tendermint/rpc/client" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" - ostbytes "github.com/Finschia/ostracon/libs/bytes" - rpcclient "github.com/Finschia/ostracon/rpc/client" - "github.com/Finschia/finschia-sdk/store/rootmulti" sdk "github.com/Finschia/finschia-sdk/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" @@ -45,7 +44,7 @@ func (ctx Context) QueryWithData(path string, data []byte) ([]byte, int64, error // QueryStore performs a query to a Tendermint node with the provided key and // store name. It returns the result and height of the query upon success // or an error if the query fails. -func (ctx Context) QueryStore(key ostbytes.HexBytes, storeName string) ([]byte, int64, error) { +func (ctx Context) QueryStore(key tmbytes.HexBytes, storeName string) ([]byte, int64, error) { return ctx.queryStore(key, storeName, "key") } @@ -124,7 +123,7 @@ func sdkErrorToGRPCError(resp abci.ResponseQuery) error { // query performs a query to a Tendermint node with the provided store name // and path. It returns the result and height of the query upon success // or an error if the query fails. -func (ctx Context) query(path string, key ostbytes.HexBytes) ([]byte, int64, error) { +func (ctx Context) query(path string, key tmbytes.HexBytes) ([]byte, int64, error) { resp, err := ctx.queryABCI(abci.RequestQuery{ Path: path, Data: key, @@ -140,7 +139,7 @@ func (ctx Context) query(path string, key ostbytes.HexBytes) ([]byte, int64, err // queryStore performs a query to a Tendermint node with the provided a store // name and path. It returns the result and height of the query upon success // or an error if the query fails. -func (ctx Context) queryStore(key ostbytes.HexBytes, storeName, endPath string) ([]byte, int64, error) { +func (ctx Context) queryStore(key tmbytes.HexBytes, storeName, endPath string) ([]byte, int64, error) { path := fmt.Sprintf("/store/%s/%s", storeName, endPath) return ctx.query(path, key) } diff --git a/client/rpc/status.go b/client/rpc/status.go index 7a89ed8d62..5fa4d5b527 100644 --- a/client/rpc/status.go +++ b/client/rpc/status.go @@ -4,10 +4,9 @@ import ( "context" "github.com/spf13/cobra" - - "github.com/Finschia/ostracon/libs/bytes" - "github.com/Finschia/ostracon/p2p" - ctypes "github.com/Finschia/ostracon/rpc/core/types" + "github.com/tendermint/tendermint/libs/bytes" + "github.com/tendermint/tendermint/p2p" + ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -15,7 +14,7 @@ import ( cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" ) -// ValidatorInfo is info about the node's validator, same as Ostracon, +// ValidatorInfo is info about the node's validator, same as Tendermint, // except that we use our own PubKey. type validatorInfo struct { Address bytes.HexBytes @@ -23,7 +22,7 @@ type validatorInfo struct { VotingPower int64 } -// ResultStatus is node's info, same as Ostracon, except that we use our own +// ResultStatus is node's info, same as Tendermint, except that we use our own // PubKey. type resultStatus struct { NodeInfo p2p.DefaultNodeInfo @@ -47,8 +46,8 @@ func StatusCommand() *cobra.Command { return err } - // `status` has OC pubkeys, we need to convert them to our pubkeys. - pk, err := cryptocodec.FromOcPubKeyInterface(status.ValidatorInfo.PubKey) + // `status` has TM pubkeys, we need to convert them to our pubkeys. + pk, err := cryptocodec.FromTmPubKeyInterface(status.ValidatorInfo.PubKey) if err != nil { return err } diff --git a/client/rpc/validators.go b/client/rpc/validators.go index ba2262ca6b..f339965ba5 100644 --- a/client/rpc/validators.go +++ b/client/rpc/validators.go @@ -7,8 +7,7 @@ import ( "strings" "github.com/spf13/cobra" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -23,8 +22,8 @@ import ( // ValidatorCommand returns the validator set for a given height func ValidatorCommand() *cobra.Command { cmd := &cobra.Command{ - Use: "ostracon-validator-set [height]", - Short: "Get the full ostracon validator set at given height", + Use: "tendermint-validator-set [height]", + Short: "Get the full tendermint validator set at given height", Args: cobra.MaximumNArgs(1), RunE: func(cmd *cobra.Command, args []string) error { clientCtx, err := client.GetClientQueryContext(cmd) @@ -102,8 +101,8 @@ func (rvo ResultValidatorsOutput) String() string { return b.String() } -func validatorOutput(validator *octypes.Validator) (ValidatorOutput, error) { - pk, err := cryptocodec.FromOcPubKeyInterface(validator.PubKey) +func validatorOutput(validator *tmtypes.Validator) (ValidatorOutput, error) { + pk, err := cryptocodec.FromTmPubKeyInterface(validator.PubKey) if err != nil { return ValidatorOutput{}, err } diff --git a/client/tx/legacy_test.go b/client/tx/legacy_test.go index 333fb8c193..f804b66e48 100644 --- a/client/tx/legacy_test.go +++ b/client/tx/legacy_test.go @@ -12,7 +12,7 @@ import ( "github.com/Finschia/finschia-sdk/simapp" "github.com/Finschia/finschia-sdk/simapp/params" "github.com/Finschia/finschia-sdk/testutil/testdata" - sdk "github.com/Finschia/finschia-sdk/types" + "github.com/Finschia/finschia-sdk/types" signing2 "github.com/Finschia/finschia-sdk/types/tx/signing" "github.com/Finschia/finschia-sdk/x/auth/legacy/legacytx" "github.com/Finschia/finschia-sdk/x/auth/tx" @@ -26,7 +26,7 @@ const ( ) var ( - fee = sdk.NewCoins(sdk.NewInt64Coin("bam", 100)) + fee = types.NewCoins(types.NewInt64Coin("bam", 100)) _, pub1, addr1 = testdata.KeyTestPubAddr() _, _, addr2 = testdata.KeyTestPubAddr() sig = signing2.SignatureV2{ @@ -36,8 +36,8 @@ var ( Signature: []byte("dummy"), }, } - msg0 = banktypes.NewMsgSend(addr1, addr2, sdk.NewCoins(sdk.NewInt64Coin("wack", 1))) - msg1 = banktypes.NewMsgSend(addr1, addr2, sdk.NewCoins(sdk.NewInt64Coin("wack", 2))) + msg0 = banktypes.NewMsgSend(addr1, addr2, types.NewCoins(types.NewInt64Coin("wack", 1))) + msg1 = banktypes.NewMsgSend(addr1, addr2, types.NewCoins(types.NewInt64Coin("wack", 2))) ) func buildTestTx(t *testing.T, builder client.TxBuilder) { diff --git a/client/utils.go b/client/utils.go index e8e4261a42..fb18c3923f 100644 --- a/client/utils.go +++ b/client/utils.go @@ -2,8 +2,7 @@ package client import ( "github.com/spf13/pflag" - - rpchttp "github.com/Finschia/ostracon/rpc/client/http" + rpchttp "github.com/tendermint/tendermint/rpc/client/http" "github.com/Finschia/finschia-sdk/client/flags" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" diff --git a/codec/amino.go b/codec/amino.go index e320d73c06..b291d3028f 100644 --- a/codec/amino.go +++ b/codec/amino.go @@ -8,8 +8,7 @@ import ( "io" amino "github.com/tendermint/go-amino" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/codec/types" ) @@ -31,8 +30,8 @@ func NewLegacyAmino() *LegacyAmino { // RegisterEvidences registers Tendermint evidence types with the provided Amino // codec. func RegisterEvidences(cdc *LegacyAmino) { - cdc.Amino.RegisterInterface((*octypes.Evidence)(nil), nil) - cdc.Amino.RegisterConcrete(&octypes.DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil) + cdc.Amino.RegisterInterface((*tmtypes.Evidence)(nil), nil) + cdc.Amino.RegisterConcrete(&tmtypes.DuplicateVoteEvidence{}, "tendermint/DuplicateVoteEvidence", nil) } // MarshalJSONIndent provides a utility for indented JSON encoding of an object diff --git a/crypto/armor.go b/crypto/armor.go index 58aee0b504..e88944bfa6 100644 --- a/crypto/armor.go +++ b/crypto/armor.go @@ -5,20 +5,20 @@ import ( "fmt" "github.com/tendermint/crypto/bcrypt" - - "github.com/Finschia/ostracon/crypto" - "github.com/Finschia/ostracon/crypto/armor" - "github.com/Finschia/ostracon/crypto/xsalsa20symmetric" + "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/armor" + "github.com/tendermint/tendermint/crypto/xsalsa20symmetric" "github.com/Finschia/finschia-sdk/codec/legacy" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" ) +// todo: need to check to migration cli keys. const ( - blockTypePrivKey = "OSTRACON PRIVATE KEY" - blockTypeKeyInfo = "OSTRACON KEY INFO" - blockTypePubKey = "OSTRACON PUBLIC KEY" + blockTypePrivKey = "TENDERMINT PRIVATE KEY" + blockTypeKeyInfo = "TENDERMINT KEY INFO" + blockTypePubKey = "TENDERMINT PUBLIC KEY" defaultAlgo = "secp256k1" diff --git a/crypto/armor_test.go b/crypto/armor_test.go index 4808226967..429ce8128b 100644 --- a/crypto/armor_test.go +++ b/crypto/armor_test.go @@ -9,10 +9,9 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/crypto/bcrypt" - - ostcrypto "github.com/Finschia/ostracon/crypto" - "github.com/Finschia/ostracon/crypto/armor" - "github.com/Finschia/ostracon/crypto/xsalsa20symmetric" + tmcrypto "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/armor" + "github.com/tendermint/tendermint/crypto/xsalsa20symmetric" "github.com/Finschia/finschia-sdk/codec/legacy" "github.com/Finschia/finschia-sdk/crypto" @@ -48,10 +47,10 @@ func TestArmorUnarmorPrivKey(t *testing.T) { // armor key manually encryptPrivKeyFn := func(privKey cryptotypes.PrivKey, passphrase string) (saltBytes, encBytes []byte) { - saltBytes = ostcrypto.CRandBytes(16) + saltBytes = tmcrypto.CRandBytes(16) key, err := bcrypt.GenerateFromPassword(saltBytes, []byte(passphrase), crypto.BcryptSecurityParameter) require.NoError(t, err) - key = ostcrypto.Sha256(key) // get 32 bytes + key = tmcrypto.Sha256(key) // get 32 bytes privKeyBytes := legacy.Cdc.Amino.MustMarshalBinaryBare(privKey) return saltBytes, xsalsa20symmetric.EncryptSymmetric(privKeyBytes, key) } @@ -63,7 +62,7 @@ func TestArmorUnarmorPrivKey(t *testing.T) { "salt": fmt.Sprintf("%X", saltBytes), "type": "secp256k", } - armored = armor.EncodeArmor("OSTRACON PRIVATE KEY", headerWrongKdf, encBytes) + armored = armor.EncodeArmor("TENDERMINT PRIVATE KEY", headerWrongKdf, encBytes) _, _, err = crypto.UnarmorDecryptPrivKey(armored, "passphrase") require.Error(t, err) require.Equal(t, "unrecognized KDF type: wrong", err.Error()) @@ -96,14 +95,14 @@ func TestArmorUnarmorPubKey(t *testing.T) { require.NoError(t, err) _, _, err = crypto.UnarmorPubKeyBytes(armored) require.Error(t, err) - require.Equal(t, `couldn't unarmor bytes: unrecognized armor type "OSTRACON PRIVATE KEY", expected: "OSTRACON PUBLIC KEY"`, err.Error()) + require.Equal(t, `couldn't unarmor bytes: unrecognized armor type "TENDERMINT PRIVATE KEY", expected: "TENDERMINT PUBLIC KEY"`, err.Error()) // armor pubkey manually header := map[string]string{ "version": "0.0.0", "type": "unknown", } - armored = armor.EncodeArmor("OSTRACON PUBLIC KEY", header, pubBytes) + armored = armor.EncodeArmor("TENDERMINT PUBLIC KEY", header, pubBytes) _, algo, err = crypto.UnarmorPubKeyBytes(armored) require.NoError(t, err) // return secp256k1 if version is 0.0.0 @@ -113,7 +112,7 @@ func TestArmorUnarmorPubKey(t *testing.T) { header = map[string]string{ "type": "unknown", } - armored = armor.EncodeArmor("OSTRACON PUBLIC KEY", header, pubBytes) + armored = armor.EncodeArmor("TENDERMINT PUBLIC KEY", header, pubBytes) bz, algo, err := crypto.UnarmorPubKeyBytes(armored) require.Nil(t, bz) require.Empty(t, algo) @@ -125,7 +124,7 @@ func TestArmorUnarmorPubKey(t *testing.T) { "type": "unknown", "version": "unknown", } - armored = armor.EncodeArmor("OSTRACON PUBLIC KEY", header, pubBytes) + armored = armor.EncodeArmor("TENDERMINT PUBLIC KEY", header, pubBytes) bz, algo, err = crypto.UnarmorPubKeyBytes(armored) require.Nil(t, bz) require.Empty(t, algo) @@ -152,7 +151,7 @@ func TestUnarmorInfoBytesErrors(t *testing.T) { "version": "0.0.1", } unarmoredBytes, err = crypto.UnarmorInfoBytes(armor.EncodeArmor( - "OSTRACON KEY INFO", header, []byte("plain-text"))) + "TENDERMINT KEY INFO", header, []byte("plain-text"))) require.Error(t, err) require.Equal(t, "unrecognized version: 0.0.1", err.Error()) require.Nil(t, unarmoredBytes) @@ -164,7 +163,7 @@ func BenchmarkBcryptGenerateFromPassword(b *testing.B) { param := securityParam b.Run(fmt.Sprintf("benchmark-security-param-%d", param), func(b *testing.B) { b.ReportAllocs() - saltBytes := ostcrypto.CRandBytes(16) + saltBytes := tmcrypto.CRandBytes(16) b.ResetTimer() for i := 0; i < b.N; i++ { _, err := bcrypt.GenerateFromPassword(saltBytes, passphrase, param) diff --git a/crypto/codec/amino.go b/crypto/codec/amino.go index 88c1d66760..49cecf65a6 100644 --- a/crypto/codec/amino.go +++ b/crypto/codec/amino.go @@ -1,7 +1,7 @@ package codec import ( - "github.com/Finschia/ostracon/crypto/sr25519" + "github.com/tendermint/tendermint/crypto/sr25519" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" diff --git a/crypto/codec/oc.go b/crypto/codec/tm.go similarity index 58% rename from crypto/codec/oc.go rename to crypto/codec/tm.go index 3087c8dfba..decb2d9804 100644 --- a/crypto/codec/oc.go +++ b/crypto/codec/tm.go @@ -1,19 +1,18 @@ package codec import ( + tmcrypto "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/encoding" tmprotocrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" - occrypto "github.com/Finschia/ostracon/crypto" - "github.com/Finschia/ostracon/crypto/encoding" - "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" sdkerrors "github.com/Finschia/finschia-sdk/types/errors" ) -// FromOcProtoPublicKey converts a OC's tmprotocrypto.PublicKey into our own PubKey. -func FromOcProtoPublicKey(protoPk tmprotocrypto.PublicKey) (cryptotypes.PubKey, error) { +// FromTmProtoPublicKey converts a TM's tmprotocrypto.PublicKey into our own PubKey. +func FromTmProtoPublicKey(protoPk tmprotocrypto.PublicKey) (cryptotypes.PubKey, error) { switch protoPk := protoPk.Sum.(type) { case *tmprotocrypto.PublicKey_Ed25519: return &ed25519.PubKey{ @@ -24,12 +23,12 @@ func FromOcProtoPublicKey(protoPk tmprotocrypto.PublicKey) (cryptotypes.PubKey, Key: protoPk.Secp256K1, }, nil default: - return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Ostracon public key", protoPk) + return nil, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v from Tendermint public key", protoPk) } } -// ToOcProtoPublicKey converts our own PubKey to OC's tmprotocrypto.PublicKey. -func ToOcProtoPublicKey(pk cryptotypes.PubKey) (tmprotocrypto.PublicKey, error) { +// ToTmProtoPublicKey converts our own PubKey to TM's tmprotocrypto.PublicKey. +func ToTmProtoPublicKey(pk cryptotypes.PubKey) (tmprotocrypto.PublicKey, error) { switch pk := pk.(type) { case *ed25519.PubKey: return tmprotocrypto.PublicKey{ @@ -44,26 +43,26 @@ func ToOcProtoPublicKey(pk cryptotypes.PubKey) (tmprotocrypto.PublicKey, error) }, }, nil default: - return tmprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Ostracon public key", pk) + return tmprotocrypto.PublicKey{}, sdkerrors.Wrapf(sdkerrors.ErrInvalidType, "cannot convert %v to Tendermint public key", pk) } } -// FromOcPubKeyInterface converts OC's occrypto.PubKey to our own PubKey. -func FromOcPubKeyInterface(tmPk occrypto.PubKey) (cryptotypes.PubKey, error) { - ocProtoPk, err := encoding.PubKeyToProto(tmPk) +// FromTmPubKeyInterface converts TM's tmcrypto.PubKey to our own PubKey. +func FromTmPubKeyInterface(tmPk tmcrypto.PubKey) (cryptotypes.PubKey, error) { + tmProtoPk, err := encoding.PubKeyToProto(tmPk) if err != nil { return nil, err } - return FromOcProtoPublicKey(ocProtoPk) + return FromTmProtoPublicKey(tmProtoPk) } -// ToOcPubKeyInterface converts our own PubKey to OC's occrypto.PubKey. -func ToOcPubKeyInterface(pk cryptotypes.PubKey) (occrypto.PubKey, error) { - ocProtoPk, err := ToOcProtoPublicKey(pk) +// ToTmPubKeyInterface converts our own PubKey to TM's tmcrypto.PubKey. +func ToTmPubKeyInterface(pk cryptotypes.PubKey) (tmcrypto.PubKey, error) { + tmProtoPk, err := ToTmProtoPublicKey(pk) if err != nil { return nil, err } - return encoding.PubKeyFromProto(&ocProtoPk) + return encoding.PubKeyFromProto(tmProtoPk) } diff --git a/crypto/hd/fundraiser_test.go b/crypto/hd/fundraiser_test.go index 25cf2f9ba8..7d8c151eae 100644 --- a/crypto/hd/fundraiser_test.go +++ b/crypto/hd/fundraiser_test.go @@ -9,8 +9,7 @@ import ( "github.com/cosmos/go-bip39" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/crypto/hd" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" diff --git a/crypto/keyring/keyring.go b/crypto/keyring/keyring.go index ceb8aec6e9..c7264099d1 100644 --- a/crypto/keyring/keyring.go +++ b/crypto/keyring/keyring.go @@ -14,8 +14,7 @@ import ( bip39 "github.com/cosmos/go-bip39" "github.com/pkg/errors" "github.com/tendermint/crypto/bcrypt" - - occrypto "github.com/Finschia/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/client/input" "github.com/Finschia/finschia-sdk/codec/legacy" @@ -749,7 +748,7 @@ func newRealPrompt(dir string, buf io.Reader) func(string) (string, error) { continue } - saltBytes := occrypto.CRandBytes(16) + saltBytes := tmcrypto.CRandBytes(16) passwordHash, err := bcrypt.GenerateFromPassword(saltBytes, []byte(pass), 2) if err != nil { fmt.Fprintln(os.Stderr, err) diff --git a/crypto/keys/ed25519/ed25519.go b/crypto/keys/ed25519/ed25519.go index 60a422c88e..b92160ae7a 100644 --- a/crypto/keys/ed25519/ed25519.go +++ b/crypto/keys/ed25519/ed25519.go @@ -7,9 +7,8 @@ import ( "io" "github.com/hdevalence/ed25519consensus" - - "github.com/Finschia/ostracon/crypto" - "github.com/Finschia/ostracon/crypto/tmhash" + "github.com/tendermint/tendermint/crypto" + "github.com/tendermint/tendermint/crypto/tmhash" "github.com/Finschia/finschia-sdk/codec" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" diff --git a/crypto/keys/ed25519/ed25519_test.go b/crypto/keys/ed25519/ed25519_test.go index b96d154a78..59913993db 100644 --- a/crypto/keys/ed25519/ed25519_test.go +++ b/crypto/keys/ed25519/ed25519_test.go @@ -7,9 +7,8 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/crypto" - osted25519 "github.com/Finschia/ostracon/crypto/ed25519" + "github.com/tendermint/tendermint/crypto" + tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/codec/types" @@ -188,7 +187,7 @@ func TestMarshalAmino(t *testing.T) { func TestMarshalAmino_BackwardsCompatibility(t *testing.T) { aminoCdc := codec.NewLegacyAmino() // Create Tendermint keys. - tmPrivKey := osted25519.GenPrivKey() + tmPrivKey := tmed25519.GenPrivKey() tmPubKey := tmPrivKey.PubKey() // Create our own keys, with the same private key as Tendermint's. privKey := &ed25519.PrivKey{Key: []byte(tmPrivKey)} diff --git a/crypto/keys/internal/ecdsa/privkey_internal_test.go b/crypto/keys/internal/ecdsa/privkey_internal_test.go index a666631ee9..2e935616c0 100644 --- a/crypto/keys/internal/ecdsa/privkey_internal_test.go +++ b/crypto/keys/internal/ecdsa/privkey_internal_test.go @@ -8,8 +8,7 @@ import ( "testing" "github.com/stretchr/testify/suite" - - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" ) func TestSKSuite(t *testing.T) { diff --git a/crypto/keys/internal/ecdsa/pubkey.go b/crypto/keys/internal/ecdsa/pubkey.go index bb65bebc19..816205165a 100644 --- a/crypto/keys/internal/ecdsa/pubkey.go +++ b/crypto/keys/internal/ecdsa/pubkey.go @@ -7,7 +7,7 @@ import ( "fmt" "math/big" - tmcrypto "github.com/Finschia/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/types/address" "github.com/Finschia/finschia-sdk/types/errors" diff --git a/crypto/keys/multisig/codec.go b/crypto/keys/multisig/codec.go index b3e4497fb3..2153acfb79 100644 --- a/crypto/keys/multisig/codec.go +++ b/crypto/keys/multisig/codec.go @@ -1,7 +1,7 @@ package multisig import ( - "github.com/Finschia/ostracon/crypto/sr25519" + "github.com/tendermint/tendermint/crypto/sr25519" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" diff --git a/crypto/keys/multisig/multisig.go b/crypto/keys/multisig/multisig.go index c2ab34be95..03ef509aa4 100644 --- a/crypto/keys/multisig/multisig.go +++ b/crypto/keys/multisig/multisig.go @@ -3,7 +3,7 @@ package multisig import ( fmt "fmt" - occrypto "github.com/Finschia/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/codec/types" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" @@ -36,7 +36,7 @@ func NewLegacyAminoPubKey(threshold int, pubKeys []cryptotypes.PubKey) *LegacyAm // Address implements cryptotypes.PubKey Address method func (m *LegacyAminoPubKey) Address() cryptotypes.Address { - return occrypto.AddressHash(m.Bytes()) + return tmcrypto.AddressHash(m.Bytes()) } // Bytes returns the proto encoded version of the LegacyAminoPubKey diff --git a/crypto/keys/secp256k1/secp256k1.go b/crypto/keys/secp256k1/secp256k1.go index 1d71b702bf..71b3a9d136 100644 --- a/crypto/keys/secp256k1/secp256k1.go +++ b/crypto/keys/secp256k1/secp256k1.go @@ -9,10 +9,9 @@ import ( "math/big" "github.com/decred/dcrd/dcrec/secp256k1/v4" + "github.com/tendermint/tendermint/crypto" "golang.org/x/crypto/ripemd160" //nolint: staticcheck // necessary for Bitcoin address format - "github.com/Finschia/ostracon/crypto" - "github.com/Finschia/finschia-sdk/codec" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" "github.com/Finschia/finschia-sdk/types/errors" diff --git a/crypto/keys/secp256k1/secp256k1_cgo.go b/crypto/keys/secp256k1/secp256k1_cgo.go index 2d13f618b4..b5e5230c73 100644 --- a/crypto/keys/secp256k1/secp256k1_cgo.go +++ b/crypto/keys/secp256k1/secp256k1_cgo.go @@ -4,7 +4,7 @@ package secp256k1 import ( - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1/internal/secp256k1" ) diff --git a/crypto/keys/secp256k1/secp256k1_nocgo.go b/crypto/keys/secp256k1/secp256k1_nocgo.go index 957fbb7d27..1e89d71d8b 100644 --- a/crypto/keys/secp256k1/secp256k1_nocgo.go +++ b/crypto/keys/secp256k1/secp256k1_nocgo.go @@ -8,8 +8,7 @@ import ( "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa" - - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" ) // Sign creates an ECDSA signature on curve Secp256k1, using SHA256 on the msg. diff --git a/crypto/keys/secp256k1/secp256k1_test.go b/crypto/keys/secp256k1/secp256k1_test.go index 6c46ec785b..86b1b2f5e8 100644 --- a/crypto/keys/secp256k1/secp256k1_test.go +++ b/crypto/keys/secp256k1/secp256k1_test.go @@ -12,9 +12,8 @@ import ( btcecdsa "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/crypto" - ostsecp256k1 "github.com/Finschia/ostracon/crypto/secp256k1" + "github.com/tendermint/tendermint/crypto" + tmsecp256k1 "github.com/tendermint/tendermint/crypto/secp256k1" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" @@ -401,11 +400,11 @@ func TestMarshalAmino(t *testing.T) { func TestMarshalAmino_BackwardsCompatibility(t *testing.T) { aminoCdc := codec.NewLegacyAmino() - // Create Ostracon keys. - ostPrivKey := ostsecp256k1.GenPrivKey() - ostPubKey := ostPrivKey.PubKey() + // Create tendermint keys. + tmPrivKey := tmsecp256k1.GenPrivKey() + tmPubKey := tmPrivKey.PubKey() // Create our own keys, with the same private key as Tendermint's. - privKey := &secp256k1.PrivKey{Key: []byte(ostPrivKey)} + privKey := &secp256k1.PrivKey{Key: []byte(tmPrivKey)} pubKey := privKey.PubKey().(*secp256k1.PubKey) testCases := []struct { @@ -416,25 +415,25 @@ func TestMarshalAmino_BackwardsCompatibility(t *testing.T) { }{ { "secp256k1 private key, binary", - ostPrivKey, + tmPrivKey, privKey, aminoCdc.Marshal, }, { "secp256k1 private key, JSON", - ostPrivKey, + tmPrivKey, privKey, aminoCdc.MarshalJSON, }, { "secp256k1 public key, binary", - ostPubKey, + tmPubKey, pubKey, aminoCdc.Marshal, }, { "secp256k1 public key, JSON", - ostPubKey, + tmPubKey, pubKey, aminoCdc.MarshalJSON, }, diff --git a/crypto/keys/secp256r1/privkey_internal_test.go b/crypto/keys/secp256r1/privkey_internal_test.go index f43de87771..894900ec89 100644 --- a/crypto/keys/secp256r1/privkey_internal_test.go +++ b/crypto/keys/secp256r1/privkey_internal_test.go @@ -5,8 +5,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/codec/types" diff --git a/crypto/keys/secp256r1/pubkey.go b/crypto/keys/secp256r1/pubkey.go index 6d02432839..2b72e506cb 100644 --- a/crypto/keys/secp256r1/pubkey.go +++ b/crypto/keys/secp256r1/pubkey.go @@ -2,8 +2,7 @@ package secp256r1 import ( "github.com/gogo/protobuf/proto" - - tmcrypto "github.com/Finschia/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" ecdsa "github.com/Finschia/finschia-sdk/crypto/keys/internal/ecdsa" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" diff --git a/crypto/ledger/ledger_mock.go b/crypto/ledger/ledger_mock.go index 189984036e..f65bc69e40 100644 --- a/crypto/ledger/ledger_mock.go +++ b/crypto/ledger/ledger_mock.go @@ -10,8 +10,7 @@ import ( "github.com/cosmos/go-bip39" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" "github.com/decred/dcrd/dcrec/secp256k1/v4/ecdsa" - - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/crypto/hd" csecp256k1 "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" @@ -79,7 +78,7 @@ func (mock LedgerSECP256K1Mock) GetAddressPubKeySECP256K1(derivationPath []uint3 compressedPublicKey := make([]byte, csecp256k1.PubKeySize) copy(compressedPublicKey, cmp.SerializeCompressed()) - // Generate the bech32 addr using existing ostcrypto/etc. + // Generate the bech32 addr using existing tmcrypto/etc. pub := &csecp256k1.PubKey{Key: compressedPublicKey} addr := sdk.AccAddress(pub.Address()).String() return pk, addr, err diff --git a/crypto/types/compact_bit_array_test.go b/crypto/types/compact_bit_array_test.go index c809dfd1fc..e3a84832a9 100644 --- a/crypto/types/compact_bit_array_test.go +++ b/crypto/types/compact_bit_array_test.go @@ -9,13 +9,12 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - ostrand "github.com/Finschia/ostracon/libs/rand" + tmrand "github.com/tendermint/tendermint/libs/rand" ) func randCompactBitArray(bits int) (*CompactBitArray, []byte) { numBytes := (bits + 7) / 8 - src := ostrand.Bytes((bits + 7) / 8) + src := tmrand.Bytes((bits + 7) / 8) bA := NewCompactBitArray(bits) for i := 0; i < numBytes-1; i++ { diff --git a/crypto/types/types.go b/crypto/types/types.go index 5519ee5e30..b2d6dd4013 100644 --- a/crypto/types/types.go +++ b/crypto/types/types.go @@ -2,8 +2,7 @@ package types import ( proto "github.com/gogo/protobuf/proto" - - occrypto "github.com/Finschia/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" ) // PubKey defines a public key and extends proto.Message. @@ -40,5 +39,5 @@ type PrivKey interface { } type ( - Address = occrypto.Address + Address = tmcrypto.Address ) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 181c8ed866..ec300aa7c5 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -608,29 +608,6 @@ - [lbm/bankplus/v1/bankplus.proto](#lbm/bankplus/v1/bankplus.proto) - [InactiveAddr](#lbm.bankplus.v1.InactiveAddr) -- [lbm/base/ostracon/v1/query.proto](#lbm/base/ostracon/v1/query.proto) - - [GetBlockByHashRequest](#lbm.base.ostracon.v1.GetBlockByHashRequest) - - [GetBlockByHashResponse](#lbm.base.ostracon.v1.GetBlockByHashResponse) - - [GetBlockByHeightRequest](#lbm.base.ostracon.v1.GetBlockByHeightRequest) - - [GetBlockByHeightResponse](#lbm.base.ostracon.v1.GetBlockByHeightResponse) - - [GetBlockResultsByHeightRequest](#lbm.base.ostracon.v1.GetBlockResultsByHeightRequest) - - [GetBlockResultsByHeightResponse](#lbm.base.ostracon.v1.GetBlockResultsByHeightResponse) - - [GetLatestBlockRequest](#lbm.base.ostracon.v1.GetLatestBlockRequest) - - [GetLatestBlockResponse](#lbm.base.ostracon.v1.GetLatestBlockResponse) - - [GetLatestValidatorSetRequest](#lbm.base.ostracon.v1.GetLatestValidatorSetRequest) - - [GetLatestValidatorSetResponse](#lbm.base.ostracon.v1.GetLatestValidatorSetResponse) - - [GetNodeInfoRequest](#lbm.base.ostracon.v1.GetNodeInfoRequest) - - [GetNodeInfoResponse](#lbm.base.ostracon.v1.GetNodeInfoResponse) - - [GetSyncingRequest](#lbm.base.ostracon.v1.GetSyncingRequest) - - [GetSyncingResponse](#lbm.base.ostracon.v1.GetSyncingResponse) - - [GetValidatorSetByHeightRequest](#lbm.base.ostracon.v1.GetValidatorSetByHeightRequest) - - [GetValidatorSetByHeightResponse](#lbm.base.ostracon.v1.GetValidatorSetByHeightResponse) - - [Module](#lbm.base.ostracon.v1.Module) - - [Validator](#lbm.base.ostracon.v1.Validator) - - [VersionInfo](#lbm.base.ostracon.v1.VersionInfo) - - - [Service](#lbm.base.ostracon.v1.Service) - - [lbm/collection/v1/collection.proto](#lbm/collection/v1/collection.proto) - [Attribute](#lbm.collection.v1.Attribute) - [Authorization](#lbm.collection.v1.Authorization) @@ -960,12 +937,6 @@ - [Msg](#lbm.token.v1.Msg) -- [lbm/tx/v1beta1/service.proto](#lbm/tx/v1beta1/service.proto) - - [GetBlockWithTxsRequest](#lbm.tx.v1beta1.GetBlockWithTxsRequest) - - [GetBlockWithTxsResponse](#lbm.tx.v1beta1.GetBlockWithTxsResponse) - - - [Service](#lbm.tx.v1beta1.Service) - - [Scalar Value Types](#scalar-value-types) @@ -3670,11 +3641,6 @@ VersionInfo is the type for the GetNodeInfoResponse message. ### Service Service defines the gRPC querier service for tendermint queries. -WARNING: For compatibility with cosmos-sdk API, the result converted from Ostracon block type -to tendermint block type without `entropy` is returned. -Therefore, verification fails with the tendermint block validation method. -For original information, please check `lbm/base/ostracon/v1/query.proto`. - | Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | | ----------- | ------------ | ------------- | ------------| ------- | -------- | | `GetNodeInfo` | [GetNodeInfoRequest](#cosmos.base.tendermint.v1beta1.GetNodeInfoRequest) | [GetNodeInfoResponse](#cosmos.base.tendermint.v1beta1.GetNodeInfoResponse) | GetNodeInfo queries the current node info. | GET|/cosmos/base/tendermint/v1beta1/node_info| @@ -8555,7 +8521,7 @@ Service defines a gRPC service for interacting with transactions. | `GetTxsEvent` | [GetTxsEventRequest](#cosmos.tx.v1beta1.GetTxsEventRequest) | [GetTxsEventResponse](#cosmos.tx.v1beta1.GetTxsEventResponse) | GetTxsEvent fetches txs by event. | GET|/cosmos/tx/v1beta1/txs| | `GetBlockWithTxs` | [GetBlockWithTxsRequest](#cosmos.tx.v1beta1.GetBlockWithTxsRequest) | [GetBlockWithTxsResponse](#cosmos.tx.v1beta1.GetBlockWithTxsResponse) | GetBlockWithTxs fetches a block with decoded txs. -Since: cosmos-sdk 0.45.2 WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type to tendermint block type without `entropy` is returned. Therefore, verification fails with the tendermint block validation method. For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`. | GET|/cosmos/tx/v1beta1/txs/block/{height}| +Since: cosmos-sdk 0.45.2 | GET|/cosmos/tx/v1beta1/txs/block/{height}| @@ -9017,333 +8983,6 @@ InactiveAddr models the blocked address for the bankplus module - -

Top

- -## lbm/base/ostracon/v1/query.proto - - - - - -### GetBlockByHashRequest -GetBlockByHashRequest is the request type for the Query/GetBlockByHash RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `hash` | [bytes](#bytes) | | | - - - - - - - - -### GetBlockByHashResponse -GetBlockByHashResponse is the response type for the Query/GetBlockByHash RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | -| `block` | [ostracon.types.Block](#ostracon.types.Block) | | | - - - - - - - - -### GetBlockByHeightRequest -GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | | - - - - - - - - -### GetBlockByHeightResponse -GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | -| `block` | [ostracon.types.Block](#ostracon.types.Block) | | | - - - - - - - - -### GetBlockResultsByHeightRequest -GetBlockResultsByHeightRequest is the request type for the Query/GetBlockResultsByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | | - - - - - - - - -### GetBlockResultsByHeightResponse -GetBlockResultsByHeightResponse is the response type for the Query/GetBlockResultsByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | | -| `txs_results` | [tendermint.abci.ResponseDeliverTx](#tendermint.abci.ResponseDeliverTx) | repeated | | -| `res_begin_block` | [tendermint.abci.ResponseBeginBlock](#tendermint.abci.ResponseBeginBlock) | | | -| `res_end_block` | [tendermint.abci.ResponseEndBlock](#tendermint.abci.ResponseEndBlock) | | | - - - - - - - - -### GetLatestBlockRequest -GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. - - - - - - - - -### GetLatestBlockResponse -GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | -| `block` | [ostracon.types.Block](#ostracon.types.Block) | | | - - - - - - - - -### GetLatestValidatorSetRequest -GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | - - - - - - - - -### GetLatestValidatorSetResponse -GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_height` | [int64](#int64) | | | -| `validators` | [Validator](#lbm.base.ostracon.v1.Validator) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | - - - - - - - - -### GetNodeInfoRequest -GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. - - - - - - - - -### GetNodeInfoResponse -GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `default_node_info` | [tendermint.p2p.DefaultNodeInfo](#tendermint.p2p.DefaultNodeInfo) | | | -| `application_version` | [VersionInfo](#lbm.base.ostracon.v1.VersionInfo) | | | - - - - - - - - -### GetSyncingRequest -GetSyncingRequest is the request type for the Query/GetSyncing RPC method. - - - - - - - - -### GetSyncingResponse -GetSyncingResponse is the response type for the Query/GetSyncing RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `syncing` | [bool](#bool) | | | - - - - - - - - -### GetValidatorSetByHeightRequest -GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | - - - - - - - - -### GetValidatorSetByHeightResponse -GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `block_height` | [int64](#int64) | | | -| `validators` | [Validator](#lbm.base.ostracon.v1.Validator) | repeated | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines an pagination for the response. | - - - - - - - - -### Module -Module is the type for VersionInfo - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `path` | [string](#string) | | module path | -| `version` | [string](#string) | | module version | -| `sum` | [string](#string) | | checksum | - - - - - - - - -### Validator -Validator is the type for the validator-set. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `address` | [string](#string) | | | -| `pub_key` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `voting_power` | [int64](#int64) | | | -| `proposer_priority` | [int64](#int64) | | | - - - - - - - - -### VersionInfo -VersionInfo is the type for the GetNodeInfoResponse message. - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `name` | [string](#string) | | | -| `app_name` | [string](#string) | | | -| `version` | [string](#string) | | | -| `git_commit` | [string](#string) | | | -| `build_tags` | [string](#string) | | | -| `go_version` | [string](#string) | | | -| `build_deps` | [Module](#lbm.base.ostracon.v1.Module) | repeated | | -| `lbm_sdk_version` | [string](#string) | | Since: cosmos-sdk 0.43 | - - - - - - - - - - - - - - -### Service -Service defines the gRPC querier service for ostracon queries. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `GetNodeInfo` | [GetNodeInfoRequest](#lbm.base.ostracon.v1.GetNodeInfoRequest) | [GetNodeInfoResponse](#lbm.base.ostracon.v1.GetNodeInfoResponse) | GetNodeInfo queries the current node info. | GET|/lbm/base/ostracon/v1/node_info| -| `GetSyncing` | [GetSyncingRequest](#lbm.base.ostracon.v1.GetSyncingRequest) | [GetSyncingResponse](#lbm.base.ostracon.v1.GetSyncingResponse) | GetSyncing queries node syncing. | GET|/lbm/base/ostracon/v1/syncing| -| `GetLatestBlock` | [GetLatestBlockRequest](#lbm.base.ostracon.v1.GetLatestBlockRequest) | [GetLatestBlockResponse](#lbm.base.ostracon.v1.GetLatestBlockResponse) | GetLatestBlock returns the latest block. | GET|/lbm/base/ostracon/v1/blocks/latest| -| `GetBlockByHeight` | [GetBlockByHeightRequest](#lbm.base.ostracon.v1.GetBlockByHeightRequest) | [GetBlockByHeightResponse](#lbm.base.ostracon.v1.GetBlockByHeightResponse) | GetBlockByHeight queries block for given height. | GET|/lbm/base/ostracon/v1/blocks/{height}| -| `GetBlockByHash` | [GetBlockByHashRequest](#lbm.base.ostracon.v1.GetBlockByHashRequest) | [GetBlockByHashResponse](#lbm.base.ostracon.v1.GetBlockByHashResponse) | GetBlockByHash queries block for given hash. | GET|/lbm/base/ostracon/v1/block/{hash}| -| `GetBlockResultsByHeight` | [GetBlockResultsByHeightRequest](#lbm.base.ostracon.v1.GetBlockResultsByHeightRequest) | [GetBlockResultsByHeightResponse](#lbm.base.ostracon.v1.GetBlockResultsByHeightResponse) | GetBlockResultsByHeight queries block results for given height. | GET|/lbm/base/ostracon/v1/blockresults/{height}| -| `GetLatestValidatorSet` | [GetLatestValidatorSetRequest](#lbm.base.ostracon.v1.GetLatestValidatorSetRequest) | [GetLatestValidatorSetResponse](#lbm.base.ostracon.v1.GetLatestValidatorSetResponse) | GetLatestValidatorSet queries latest validator-set. | GET|/lbm/base/ostracon/v1/validatorsets/latest| -| `GetValidatorSetByHeight` | [GetValidatorSetByHeightRequest](#lbm.base.ostracon.v1.GetValidatorSetByHeightRequest) | [GetValidatorSetByHeightResponse](#lbm.base.ostracon.v1.GetValidatorSetByHeightResponse) | GetValidatorSetByHeight queries validator-set at a given height. | GET|/lbm/base/ostracon/v1/validatorsets/{height}| - - - - -

Top

@@ -14210,73 +13849,6 @@ Msg defines the token Msg service. - -

Top

- -## lbm/tx/v1beta1/service.proto - - - - - -### GetBlockWithTxsRequest -GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -RPC method. - -Since: finschia-sdk 0.47.0 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `height` | [int64](#int64) | | height is the height of the block to query. | -| `pagination` | [cosmos.base.query.v1beta1.PageRequest](#cosmos.base.query.v1beta1.PageRequest) | | pagination defines a pagination for the request. | - - - - - - - - -### GetBlockWithTxsResponse -GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. - -Since: finschia-sdk 0.47.0 - - -| Field | Type | Label | Description | -| ----- | ---- | ----- | ----------- | -| `txs` | [cosmos.tx.v1beta1.Tx](#cosmos.tx.v1beta1.Tx) | repeated | txs are the transactions in the block. | -| `block_id` | [tendermint.types.BlockID](#tendermint.types.BlockID) | | | -| `block` | [ostracon.types.Block](#ostracon.types.Block) | | | -| `pagination` | [cosmos.base.query.v1beta1.PageResponse](#cosmos.base.query.v1beta1.PageResponse) | | pagination defines a pagination for the response. | - - - - - - - - - - - - - - -### Service -Service defines a gRPC service for interacting with transactions. - -| Method Name | Request Type | Response Type | Description | HTTP Verb | Endpoint | -| ----------- | ------------ | ------------- | ------------| ------- | -------- | -| `GetBlockWithTxs` | [GetBlockWithTxsRequest](#lbm.tx.v1beta1.GetBlockWithTxsRequest) | [GetBlockWithTxsResponse](#lbm.tx.v1beta1.GetBlockWithTxsResponse) | GetBlockWithTxs fetches a block with decoded txs. - -Since: finschia-sdk 0.47.0 | GET|/lbm/tx/v1beta1/txs/block/{height}| - - - - - ## Scalar Value Types | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | diff --git a/go.mod b/go.mod index c5c99fecdd..6d2490d3f4 100644 --- a/go.mod +++ b/go.mod @@ -4,7 +4,6 @@ module github.com/Finschia/finschia-sdk require ( github.com/99designs/keyring v1.1.6 - github.com/Finschia/ostracon v1.1.2 github.com/VictoriaMetrics/fastcache v1.12.1 github.com/armon/go-metrics v0.4.1 github.com/bgentry/speakeasy v0.1.0 @@ -28,7 +27,7 @@ require ( github.com/hashicorp/golang-lru v1.0.2 github.com/hdevalence/ed25519consensus v0.1.0 github.com/improbable-eng/grpc-web v0.15.0 - github.com/jhump/protoreflect v1.12.1-0.20220721211354-060cc04fc18b + github.com/jhump/protoreflect v1.15.3 github.com/magiconair/properties v1.8.7 github.com/mailru/easyjson v0.7.7 github.com/mattn/go-isatty v0.0.20 @@ -36,6 +35,7 @@ require ( github.com/prometheus/client_golang v1.17.0 github.com/prometheus/common v0.45.0 github.com/regen-network/cosmos-proto v0.3.1 + github.com/rs/zerolog v1.31.0 github.com/spf13/cast v1.5.1 github.com/spf13/cobra v1.8.0 github.com/spf13/pflag v1.0.5 @@ -49,7 +49,6 @@ require ( golang.org/x/exp v0.0.0-20230905200255-921286631fa9 google.golang.org/genproto/googleapis/api v0.0.0-20230920204549-e6e6cdab5c13 google.golang.org/grpc v1.59.0 - //google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 google.golang.org/protobuf v1.31.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -57,14 +56,14 @@ require ( require ( filippo.io/edwards25519 v1.0.0 // indirect github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d // indirect - github.com/Finschia/r2ishiguro_vrf v0.1.2 // indirect github.com/Workiva/go-datastructures v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/btcsuite/btcd v0.22.1 // indirect - github.com/cenkalti/backoff/v4 v4.1.3 // indirect + github.com/cenkalti/backoff/v4 v4.1.1 // indirect github.com/cespare/xxhash v1.1.0 // indirect github.com/cespare/xxhash/v2 v2.2.0 // indirect github.com/cosmos/gorocksdb v1.2.0 // indirect + github.com/creachadair/taskgroup v0.6.1 // indirect github.com/danieljoos/wincred v1.0.2 // indirect github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect github.com/desertbit/timer v0.0.0-20180107155436-c41aec40b27f // indirect @@ -79,7 +78,7 @@ require ( github.com/go-logfmt/logfmt v0.6.0 // indirect github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 // indirect github.com/golang/snappy v0.0.4 // indirect - github.com/google/btree v1.0.0 // indirect + github.com/google/btree v1.1.2 // indirect github.com/google/orderedcode v0.0.1 // indirect github.com/gorilla/websocket v1.5.0 // indirect github.com/gsterjov/go-libsecret v0.0.0-20161001094733-a6f4afe4910c // indirect @@ -100,8 +99,6 @@ require ( github.com/minio/highwayhash v1.0.2 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect github.com/mtibben/percent v0.2.1 // indirect - github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce // indirect - github.com/onsi/gomega v1.27.6 // indirect github.com/pelletier/go-toml/v2 v2.1.0 // indirect github.com/petermattis/goid v0.0.0-20180202154549-b0b1615b78e5 // indirect github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect @@ -109,7 +106,6 @@ require ( github.com/prometheus/procfs v0.11.1 // indirect github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect github.com/rs/cors v1.10.1 // indirect - github.com/rs/zerolog v1.31.0 // indirect github.com/sagikazarmark/locafero v0.3.0 // indirect github.com/sagikazarmark/slog-shim v0.1.0 // indirect github.com/sasha-s/go-deadlock v0.3.1 // indirect @@ -128,7 +124,6 @@ require ( google.golang.org/genproto v0.0.0-20231002182017-d307bd883b97 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20231009173412-8bfb1ae86b6c // indirect gopkg.in/ini.v1 v1.67.0 // indirect - gopkg.in/natefinch/lumberjack.v2 v2.2.1 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect nhooyr.io/websocket v1.8.6 // indirect ) diff --git a/go.sum b/go.sum index 154e69e1e4..4c63590fc6 100644 --- a/go.sum +++ b/go.sum @@ -38,18 +38,14 @@ cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3f dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= filippo.io/edwards25519 v1.0.0 h1:0wAIcmJUqRdI8IJ/3eGi5/HwXZWPujYXXlkrQogz0Ek= filippo.io/edwards25519 v1.0.0/go.mod h1:N1IkdkCkiLB6tki+MYJoSx2JTY9NUlxZE7eHn5EwJns= -github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 h1:L/gRVlceqvL25UVaW/CKtUDjefjrs0SPonmDGUVOYP0= +github.com/Azure/go-ansiterm v0.0.0-20210617225240-d185dfc1b5a1 h1:UQHMgLO+TxOElx5B5HZ4hJQsoJ/PvUvKRhJHDQXO8P8= github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU= github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d h1:nalkkPQcITbvhmL4+C4cKA87NW0tfm3Kl9VXRoPywFg= github.com/ChainSafe/go-schnorrkel v0.0.0-20200405005733-88cbf1b4c40d/go.mod h1:URdX5+vg25ts3aCh8H5IFZybJYKWhJHYMTnf+ULtoC4= github.com/DataDog/datadog-go v3.2.0+incompatible/go.mod h1:LButxg5PwREeZtORoXG3tL4fMGNddJ+vMq1mwgfaqoQ= -github.com/Finschia/ostracon v1.1.2 h1:JqP1RLTFHtCUr5I8njS698iJDz6YRXBsL06LnJy+8C8= -github.com/Finschia/ostracon v1.1.2/go.mod h1:eOAnifAmWFqCnB828FOlcrFzJ+Kt5Fgg+dswr7BSBDM= -github.com/Finschia/r2ishiguro_vrf v0.1.2 h1:lDBz6NQMx1pw5I3End6xFmXpM//7KcmTr3Ka983e7v8= -github.com/Finschia/r2ishiguro_vrf v0.1.2/go.mod h1:OHRtvzcJnfIrcJ0bvPNktJozRFAyZFuv56E9R3/qB+Y= github.com/Knetic/govaluate v3.0.1-0.20171022003610-9aa49832a739+incompatible/go.mod h1:r7JcOSlj0wfOMncg0iLm8Leh48TZaKVeNIfJntJ2wa0= -github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= +github.com/Microsoft/go-winio v0.6.0 h1:slsWYD/zyx7lCXoZVlvQrj0hPTM1HI4+v1sIda2yDvg= github.com/Nvveen/Gotty v0.0.0-20120604004816-cd527374f1e5 h1:TngWCqHvy9oXAN6lEVMRuU21PR1EtLVZJmdB18Gu3Rw= github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE= github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= @@ -61,7 +57,7 @@ github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrd github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.1.1 h1:9G5u1UqKt6ABseAffHGNfbNQd7omRlWE5QaxNruzhE0= github.com/Workiva/go-datastructures v1.1.1/go.mod h1:1yZL+zfsztete+ePzZz/Zb1/t5BnDuE2Ya2MMGhzP6A= -github.com/adlio/schema v1.3.4 h1:8K+41sfQkxfT6a79aLBxx+dBKcid6Raw2JPk5COqeqE= +github.com/adlio/schema v1.3.3 h1:oBJn8I02PyTB466pZO1UZEn1TV5XLlifBSyMrmHl/1I= github.com/afex/hystrix-go v0.0.0-20180502004556-fa1af6a1f4f5/go.mod h1:SkGFH1ia65gfNATL8TAiHDNxPzPdmEL5uirI2Uyuz6c= github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751/go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc= @@ -98,9 +94,8 @@ github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pY github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= github.com/cenkalti/backoff v2.2.1+incompatible h1:tNowT99t7UNflLxfYYSlKYsBpXdEet03Pg2g16Swow4= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= +github.com/cenkalti/backoff/v4 v4.1.1 h1:G2HAfAmvm/GcKan2oOQpBXOd2tT2G57ZnZGWa1PxPBQ= github.com/cenkalti/backoff/v4 v4.1.1/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= -github.com/cenkalti/backoff/v4 v4.1.3 h1:cFAlzYUlVYDysBEH2T5hyJZMh3+5+WCBvSnK6Q8UtC4= -github.com/cenkalti/backoff/v4 v4.1.3/go.mod h1:scbssz8iZGpm3xbr14ovlUdkxfGXNInqkPWOWmG2CLw= github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU= github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash v1.1.0/go.mod h1:XrSqR1VqqWfGrhpAt58auRo0WTKS1nRRg3ghfAqPWnc= @@ -148,6 +143,8 @@ 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/taskgroup v0.6.1 h1:KQfRG4VhSj2qoXPkzXrsTaT8oZsMCZD0+KRll2jbF78= +github.com/creachadair/taskgroup v0.6.1/go.mod h1:2vCkZ5a+HVcvDl3llMpox2lTw0+MSzrkGsddxRAHXOo= github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/danieljoos/wincred v1.0.2 h1:zf4bhty2iLuwgjgpraD2E9UbvO+fe54XXGJbOwe23fU= github.com/danieljoos/wincred v1.0.2/go.mod h1:SnuYRW9lp1oJrZX/dXJqr0cPK5gYXqx3EJbmjhLdK9U= @@ -280,8 +277,9 @@ github.com/golang/snappy v0.0.3/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEW github.com/golang/snappy v0.0.4 h1:yAGX7huGHXlcLOEtBnF4w7FQwA26wojNCwOYAEhLjQM= github.com/golang/snappy v0.0.4/go.mod h1:/XxbfmMg8lxefKM7IXC3fBNl/7bRcc72aCRzEWrmP2Q= github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= -github.com/google/btree v1.0.0 h1:0udJVsspx3VBr5FwtLhQQtuAsVc79tTq0ocGIPAU6qo= github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.1.2 h1:xf4v41cLI2Z6FxbKm+8Bu+m8ifhj15JuZ9sa0jZCMUU= +github.com/google/btree v1.1.2/go.mod h1:qOPhT0dTNdNzV6Z/lhRX0YXUafgPLFUh+gZMl761Gm4= github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5aqRK0M= github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= @@ -454,7 +452,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5 github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 h1:jWpvCLoY8Z/e3VKvlsiIGKtc+UG6U5vzxaoagmhXfyg= github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= -github.com/miekg/dns v1.1.56 h1:5imZaSeoRNvpM9SzWNhEcP9QliKiz20/dA2QabIGVnE= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 h1:QRUSJEgZn2Snx0EmT/QLXibWjSUDjKWvXIT19NBVp94= github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= @@ -492,8 +489,6 @@ github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OS github.com/nishanths/predeclared v0.0.0-20200524104333-86fad755b4d3/go.mod h1:nt3d53pc1VYcphSCIaYAJtnPYnr3Zyn8fMq2wvPGPso= github.com/nxadm/tail v1.4.4 h1:DQuhQpB1tVlglWS2hLQ5OV6B5r8aGxSrPc5Qo6uTN78= github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce h1:/pEpMk55wH0X+E5zedGEMOdLuWmV8P4+4W3+LZaM6kg= -github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce/go.mod h1:hVoHR2EVESiICEMbg137etN/Lx+lSrHPTD39Z/uE+2s= github.com/oklog/oklog v0.3.2/go.mod h1:FCV+B7mhrz4o+ueLpx+KqkyXRGMWOYEvfiXtdGtbWGs= github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA= github.com/olekukonko/tablewriter v0.0.0-20170122224234-a0225b3f23b5/go.mod h1:vsDQFd/mU46D+Z4whnwzcISnGGzXWMclvtLoiIKAKIo= @@ -504,13 +499,12 @@ github.com/onsi/ginkgo v1.14.0 h1:2mOpI4JVVPBN+WQRa0WKH2eXR+Ey+uK4n7Zj0aYpIQA= github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= +github.com/onsi/gomega v1.10.1 h1:o0+MgICZLuZ7xjH7Vx6zS/zcu93/BEp1VwkIW1mEXCE= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= -github.com/onsi/gomega v1.27.6 h1:ENqfyGeS5AX/rlXDd/ETokDz93u0YufY1Pgxuy/PvWE= -github.com/onsi/gomega v1.27.6/go.mod h1:PIQNjfQwkP3aQAH7lf7j87O/5FiNr+ZR8+ipb+qQlhg= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= -github.com/opencontainers/image-spec v1.1.0-rc5 h1:Ygwkfw9bpDvs+c9E34SdgGOj41dX/cbdlwvlWt0pnFI= -github.com/opencontainers/runc v1.1.5 h1:L44KXEpKmfWDcS02aeGm8QNTFXTo2D+8MYGDIJ/GDEs= +github.com/opencontainers/image-spec v1.1.0-rc2 h1:2zx/Stx4Wc5pIPDvIxHXvXtQFW/7XWJGmnM7r3wg034= +github.com/opencontainers/runc v1.1.3 h1:vIXrkId+0/J2Ymu2m7VjGvbSlAId9XNRPhn2p4b+d8w= github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go.mod h1:Ngi6UdF0k5OKD5t5wlmGhe/EDKPoUM3BXZSSfIuJbis= github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= @@ -610,7 +604,7 @@ github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPx github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE= github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrfsX/uA88= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ= +github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA= github.com/soheilhy/cmux v0.1.4/go.mod h1:IM3LyeVVIOuxMH7sFAkER9+bJ4dT7Ms6E4xg4kGIyLM= @@ -682,7 +676,6 @@ github.com/urfave/cli v1.20.0/go.mod h1:70zkFmudgCuE/ngEzBv17Jvp/497gISqfk5gWijb github.com/urfave/cli v1.22.1/go.mod h1:Gos4lmkARVdJ6EkW0WaNv/tZAAMe9V7XWyB60NtXRu0= github.com/xiang90/probing v0.0.0-20190116061207-43a291ad63a2/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q= -github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673 h1:PSg2cEFd+9Ae/r5x5iO8cJ3VmTbZNQp6X8tHDmVJAbA= github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.27/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= @@ -991,7 +984,7 @@ golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8T golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= -gonum.org/v1/gonum v0.14.0 h1:2NiG67LD1tEH0D7kM+ps2V+fXmsAnpUeec7n8tcr4S0= +golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk= google.golang.org/api v0.3.1/go.mod h1:6wY9I6uQWHQ8EM57III9mq/AjF+i8G65rmVagqKMtkk= google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= @@ -1120,8 +1113,6 @@ gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMy gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA= gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= -gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/resty.v1 v1.12.0/go.mod h1:mDo4pnntr5jdWRML875a/NmxYqAlA73dVijT2AXvQQo= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ= gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw= diff --git a/proto/cosmos/base/tendermint/v1beta1/query.proto b/proto/cosmos/base/tendermint/v1beta1/query.proto index 9ef3a3ecde..0b3f4094eb 100644 --- a/proto/cosmos/base/tendermint/v1beta1/query.proto +++ b/proto/cosmos/base/tendermint/v1beta1/query.proto @@ -13,10 +13,6 @@ option go_package = "github.com/Finschia/finschia-sdk/client/grpc/tmservice"; // Service defines the gRPC querier service for tendermint queries. // -// WARNING: For compatibility with cosmos-sdk API, the result converted from Ostracon block type -// to tendermint block type without `entropy` is returned. -// Therefore, verification fails with the tendermint block validation method. -// For original information, please check `lbm/base/ostracon/v1/query.proto`. service Service { // GetNodeInfo queries the current node info. rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { diff --git a/proto/cosmos/evidence/v1beta1/query.proto b/proto/cosmos/evidence/v1beta1/query.proto index 1eb157d57c..0026bbecb3 100644 --- a/proto/cosmos/evidence/v1beta1/query.proto +++ b/proto/cosmos/evidence/v1beta1/query.proto @@ -24,7 +24,7 @@ service Query { // QueryEvidenceRequest is the request type for the Query/Evidence RPC method. message QueryEvidenceRequest { // evidence_hash defines the hash of the requested evidence. - bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/Finschia/ostracon/libs/bytes.HexBytes"]; + bytes evidence_hash = 1 [(gogoproto.casttype) = "github.com/tendermint/tendermint/libs/bytes.HexBytes"]; } // QueryEvidenceResponse is the response type for the Query/Evidence RPC method. diff --git a/proto/cosmos/tx/v1beta1/service.proto b/proto/cosmos/tx/v1beta1/service.proto index 7507f473bb..ccd10fae49 100644 --- a/proto/cosmos/tx/v1beta1/service.proto +++ b/proto/cosmos/tx/v1beta1/service.proto @@ -39,10 +39,6 @@ service Service { // GetBlockWithTxs fetches a block with decoded txs. // // Since: cosmos-sdk 0.45.2 - // WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type - // to tendermint block type without `entropy` is returned. - // Therefore, verification fails with the tendermint block validation method. - // For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`. rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) { option (google.api.http).get = "/cosmos/tx/v1beta1/txs/block/{height}"; } diff --git a/proto/lbm/base/ostracon/v1/query.proto b/proto/lbm/base/ostracon/v1/query.proto deleted file mode 100644 index d17518dc66..0000000000 --- a/proto/lbm/base/ostracon/v1/query.proto +++ /dev/null @@ -1,172 +0,0 @@ -syntax = "proto3"; -package lbm.base.ostracon.v1; - -import "google/protobuf/any.proto"; -import "google/api/annotations.proto"; -import "ostracon/types/block.proto"; -import "ostracon/types/types.proto"; -import "ostracon/abci/types.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "tendermint/p2p/types.proto"; -import "tendermint/types/types.proto"; -import "tendermint/abci/types.proto"; - -option go_package = "github.com/Finschia/finschia-sdk/client/grpc/ocservice"; - -// Service defines the gRPC querier service for ostracon queries. -service Service { - // GetNodeInfo queries the current node info. - rpc GetNodeInfo(GetNodeInfoRequest) returns (GetNodeInfoResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/node_info"; - } - // GetSyncing queries node syncing. - rpc GetSyncing(GetSyncingRequest) returns (GetSyncingResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/syncing"; - } - // GetLatestBlock returns the latest block. - rpc GetLatestBlock(GetLatestBlockRequest) returns (GetLatestBlockResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/blocks/latest"; - } - // GetBlockByHeight queries block for given height. - rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/blocks/{height}"; - } - // GetBlockByHash queries block for given hash. - rpc GetBlockByHash(GetBlockByHashRequest) returns (GetBlockByHashResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/block/{hash}"; - } - // GetBlockResultsByHeight queries block results for given height. - rpc GetBlockResultsByHeight(GetBlockResultsByHeightRequest) returns (GetBlockResultsByHeightResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/blockresults/{height}"; - } - - // GetLatestValidatorSet queries latest validator-set. - rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/validatorsets/latest"; - } - // GetValidatorSetByHeight queries validator-set at a given height. - rpc GetValidatorSetByHeight(GetValidatorSetByHeightRequest) returns (GetValidatorSetByHeightResponse) { - option (google.api.http).get = "/lbm/base/ostracon/v1/validatorsets/{height}"; - } -} - -// GetValidatorSetByHeightRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightRequest { - int64 height = 1; - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetValidatorSetByHeightResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// GetLatestValidatorSetRequest is the request type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetRequest { - // pagination defines an pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 1; -} - -// GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. -message GetLatestValidatorSetResponse { - int64 block_height = 1; - repeated Validator validators = 2; - // pagination defines an pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 3; -} - -// Validator is the type for the validator-set. -message Validator { - string address = 1; - google.protobuf.Any pub_key = 2; - int64 voting_power = 3; - int64 proposer_priority = 4; -} - -// GetBlockByHeightRequest is the request type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightRequest { - int64 height = 1; -} - -// GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. -message GetBlockByHeightResponse { - .tendermint.types.BlockID block_id = 1; - .ostracon.types.Block block = 2; -} - -// GetBlockByHashRequest is the request type for the Query/GetBlockByHash RPC method. -message GetBlockByHashRequest { - bytes hash = 1; -} - -// GetBlockByHashResponse is the response type for the Query/GetBlockByHash RPC method. -message GetBlockByHashResponse { - .tendermint.types.BlockID block_id = 1; - .ostracon.types.Block block = 2; -} - -// GetBlockResultsByHeightRequest is the request type for the Query/GetBlockResultsByHeight RPC method. -message GetBlockResultsByHeightRequest { - int64 height = 1; -} - -// GetBlockResultsByHeightResponse is the response type for the Query/GetBlockResultsByHeight RPC method. -message GetBlockResultsByHeightResponse { - int64 height = 1; - repeated .tendermint.abci.ResponseDeliverTx txs_results = 2; - .tendermint.abci.ResponseBeginBlock res_begin_block = 3; - .tendermint.abci.ResponseEndBlock res_end_block = 4; -} - -// GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. -message GetLatestBlockRequest {} - -// GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. -message GetLatestBlockResponse { - .tendermint.types.BlockID block_id = 1; - .ostracon.types.Block block = 2; -} - -// GetSyncingRequest is the request type for the Query/GetSyncing RPC method. -message GetSyncingRequest {} - -// GetSyncingResponse is the response type for the Query/GetSyncing RPC method. -message GetSyncingResponse { - bool syncing = 1; -} - -// GetNodeInfoRequest is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoRequest {} - -// GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. -message GetNodeInfoResponse { - .tendermint.p2p.DefaultNodeInfo default_node_info = 1; - VersionInfo application_version = 2; -} - -// VersionInfo is the type for the GetNodeInfoResponse message. -message VersionInfo { - string name = 1; - string app_name = 2; - string version = 3; - string git_commit = 4; - string build_tags = 5; - string go_version = 6; - repeated Module build_deps = 7; - // Since: cosmos-sdk 0.43 - string lbm_sdk_version = 8; -} - -// Module is the type for VersionInfo -message Module { - // module path - string path = 1; - // module version - string version = 2; - // checksum - string sum = 3; -} diff --git a/proto/lbm/tx/v1beta1/service.proto b/proto/lbm/tx/v1beta1/service.proto deleted file mode 100644 index 63d4789fe0..0000000000 --- a/proto/lbm/tx/v1beta1/service.proto +++ /dev/null @@ -1,46 +0,0 @@ -syntax = "proto3"; -package lbm.tx.v1beta1; - -import "google/api/annotations.proto"; -import "gogoproto/gogo.proto"; -import "cosmos/tx/v1beta1/tx.proto"; -import "cosmos/base/query/v1beta1/pagination.proto"; -import "ostracon/types/block.proto"; -import "ostracon/types/types.proto"; -import "tendermint/types/types.proto"; - -option (gogoproto.goproto_registration) = true; -option go_package = "github.com/Finschia/finschia-sdk/types/tx2"; - -// Service defines a gRPC service for interacting with transactions. -service Service { - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: finschia-sdk 0.47.0 - rpc GetBlockWithTxs(GetBlockWithTxsRequest) returns (GetBlockWithTxsResponse) { - option (google.api.http).get = "/lbm/tx/v1beta1/txs/block/{height}"; - } -} - -// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -// RPC method. -// -// Since: finschia-sdk 0.47.0 -message GetBlockWithTxsRequest { - // height is the height of the block to query. - int64 height = 1; - // pagination defines a pagination for the request. - cosmos.base.query.v1beta1.PageRequest pagination = 2; -} - -// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. -// -// Since: finschia-sdk 0.47.0 -message GetBlockWithTxsResponse { - // txs are the transactions in the block. - repeated cosmos.tx.v1beta1.Tx txs = 1; - .tendermint.types.BlockID block_id = 2; - .ostracon.types.Block block = 3; - // pagination defines a pagination for the response. - cosmos.base.query.v1beta1.PageResponse pagination = 4; -} diff --git a/server/api/server.go b/server/api/server.go index 11e004212c..e5febbfd7c 100644 --- a/server/api/server.go +++ b/server/api/server.go @@ -12,9 +12,8 @@ import ( "github.com/gorilla/handlers" "github.com/gorilla/mux" "github.com/grpc-ecosystem/grpc-gateway/runtime" - - "github.com/Finschia/ostracon/libs/log" - ostrpcserver "github.com/Finschia/ostracon/rpc/jsonrpc/server" + "github.com/tendermint/tendermint/libs/log" + tmrpcserver "github.com/tendermint/tendermint/rpc/jsonrpc/server" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec/legacy" @@ -89,14 +88,13 @@ func New(clientCtx client.Context, logger log.Logger) *Server { func (s *Server) Start(cfg config.Config) error { s.mtx.Lock() - ostCfg := ostrpcserver.DefaultConfig() - ostCfg.MaxOpenConnections = int(cfg.API.MaxOpenConnections) - ostCfg.ReadTimeout = time.Duration(cfg.API.RPCReadTimeout) * time.Second - ostCfg.WriteTimeout = time.Duration(cfg.API.RPCWriteTimeout) * time.Second - ostCfg.IdleTimeout = time.Duration(cfg.API.RPCIdleTimeout) * time.Second - ostCfg.MaxBodyBytes = int64(cfg.API.RPCMaxBodyBytes) + tmCfg := tmrpcserver.DefaultConfig() + tmCfg.MaxOpenConnections = int(cfg.API.MaxOpenConnections) + tmCfg.ReadTimeout = time.Duration(cfg.API.RPCReadTimeout) * time.Second + tmCfg.WriteTimeout = time.Duration(cfg.API.RPCWriteTimeout) * time.Second + tmCfg.MaxBodyBytes = int64(cfg.API.RPCMaxBodyBytes) - listener, err := ostrpcserver.Listen(cfg.API.Address, ostCfg) + listener, err := tmrpcserver.Listen(cfg.API.Address, tmCfg) if err != nil { s.mtx.Unlock() return err @@ -110,11 +108,11 @@ func (s *Server) Start(cfg config.Config) error { if cfg.API.EnableUnsafeCORS { allowAllCORS := handlers.CORS(handlers.AllowedHeaders([]string{"Content-Type"})) - return ostrpcserver.Serve(s.listener, allowAllCORS(h), s.logger, ostCfg) + return tmrpcserver.Serve(s.listener, allowAllCORS(h), s.logger, tmCfg) } s.logger.Info("starting API server...") - return ostrpcserver.Serve(s.listener, s.Router, s.logger, ostCfg) + return tmrpcserver.Serve(s.listener, s.Router, s.logger, tmCfg) } // Close closes the API server. diff --git a/server/cmd/execute.go b/server/cmd/execute.go index acd4ecbd84..453b3356cf 100644 --- a/server/cmd/execute.go +++ b/server/cmd/execute.go @@ -3,10 +3,10 @@ package cmd import ( "context" + "github.com/rs/zerolog" "github.com/spf13/cobra" - - ostcfg "github.com/Finschia/ostracon/config" - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcfg "github.com/tendermint/tendermint/config" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -33,9 +33,9 @@ func Execute(rootCmd *cobra.Command, defaultHome string) error { ctx = context.WithValue(ctx, client.ClientContextKey, &client.Context{}) ctx = context.WithValue(ctx, server.ServerContextKey, srvCtx) - rootCmd.PersistentFlags().String(flags.FlagLogLevel, ostcfg.DefaultPackageLogLevels(), "The logging level by modules (debug|info|error|none)") - rootCmd.PersistentFlags().String(flags.FlagLogFormat, ostcfg.LogFormatPlain, "The logging format (json|plain)") + rootCmd.PersistentFlags().String(flags.FlagLogLevel, zerolog.InfoLevel.String(), "The logging level (trace|debug|info|warn|error|fatal|panic)") + rootCmd.PersistentFlags().String(flags.FlagLogFormat, tmcfg.LogFormatPlain, "The logging format (json|plain)") - executor := ostcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome) + executor := tmcli.PrepareBaseCmd(rootCmd, envPrefix, defaultHome) return executor.ExecuteContext(ctx) } diff --git a/server/config/config.go b/server/config/config.go index a1a8630ba7..20f1cfa6e5 100644 --- a/server/config/config.go +++ b/server/config/config.go @@ -24,9 +24,6 @@ const ( // DefaultGRPCWebAddress defines the default address to bind the gRPC-web server to. DefaultGRPCWebAddress = "0.0.0.0:9091" - // DefaultChanCheckTxSize defines the default size of channel check tx in Baseapp - DefaultChanCheckTxSize = 10000 - // DefaultGRPCMaxRecvMsgSize defines the default gRPC max message size in // bytes the server can receive. DefaultGRPCMaxRecvMsgSize = 1024 * 1024 * 10 @@ -96,9 +93,6 @@ type BaseConfig struct { // When true, Prometheus metrics are served under /metrics on prometheus_listen_addr in config.toml. // It works when tendermint's prometheus option (config.toml) is set to true. Prometheus bool `mapstructure:"prometheus"` - - // ChanCheckTxSize is the size of RequestCheckTxAsync of BaseApp - ChanCheckTxSize uint `mapstructure:"chan-check-tx-size"` } // APIConfig defines the API listener configuration. @@ -118,16 +112,13 @@ type APIConfig struct { // MaxOpenConnections defines the number of maximum open connections MaxOpenConnections uint `mapstructure:"max-open-connections"` - // RPCReadTimeout defines the Ostracon RPC read timeout (in seconds) + // RPCReadTimeout defines the Tendermint RPC read timeout (in seconds) RPCReadTimeout uint `mapstructure:"rpc-read-timeout"` - // RPCWriteTimeout defines the Ostracon RPC write timeout (in seconds) + // RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds) RPCWriteTimeout uint `mapstructure:"rpc-write-timeout"` - // RPCIdleTimeout defines the Ostracon RPC idle timeout (in seconds) - RPCIdleTimeout uint `mapstructure:"rpc-idle-timeout"` - - // RPCMaxBodyBytes defines the Ostracon maximum response body (in bytes) + // RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes) RPCMaxBodyBytes uint `mapstructure:"rpc-max-body-bytes"` // TODO: TLS/Proxy configuration. @@ -253,7 +244,6 @@ func DefaultConfig() *Config { InterBlockCacheSize: cache.DefaultCommitKVStoreCacheSize, IAVLCacheSize: iavl.DefaultIAVLCacheSize, IAVLDisableFastNode: true, - ChanCheckTxSize: DefaultChanCheckTxSize, }, Telemetry: telemetry.Config{ Enabled: false, @@ -266,7 +256,6 @@ func DefaultConfig() *Config { MaxOpenConnections: 1000, RPCReadTimeout: 10, RPCWriteTimeout: 10, - RPCIdleTimeout: 60, RPCMaxBodyBytes: 1000000, }, GRPC: GRPCConfig{ @@ -326,7 +315,6 @@ func GetConfig(v *viper.Viper) (Config, error) { MinRetainBlocks: v.GetUint64("min-retain-blocks"), IAVLDisableFastNode: v.GetBool("iavl-disable-fastnode"), IAVLCacheSize: v.GetUint64("iavl-cache-size"), - ChanCheckTxSize: v.GetUint("chan-check-tx-size"), }, Telemetry: telemetry.Config{ ServiceName: v.GetString("telemetry.service-name"), @@ -344,7 +332,6 @@ func GetConfig(v *viper.Viper) (Config, error) { MaxOpenConnections: v.GetUint("api.max-open-connections"), RPCReadTimeout: v.GetUint("api.rpc-read-timeout"), RPCWriteTimeout: v.GetUint("api.rpc-write-timeout"), - RPCIdleTimeout: v.GetUint("api.rpc-idle-timeout"), RPCMaxBodyBytes: v.GetUint("api.rpc-max-body-bytes"), EnableUnsafeCORS: v.GetBool("api.enabled-unsafe-cors"), }, diff --git a/server/config/toml.go b/server/config/toml.go index 4f3f7adfc1..ff05e58eca 100644 --- a/server/config/toml.go +++ b/server/config/toml.go @@ -5,8 +5,7 @@ import ( "text/template" "github.com/spf13/viper" - - ostos "github.com/Finschia/ostracon/libs/os" + tmos "github.com/tendermint/tendermint/libs/os" ) const DefaultConfigTemplate = `# This is a TOML config file. @@ -87,10 +86,6 @@ index-events = {{ .BaseConfig.IndexEvents }} # It works when tendermint's prometheus option (config.toml) is set to true. prometheus = {{ .BaseConfig.Prometheus }} -# ChanCheckTxSize is the size of RequestCheckTxAsync of BaseApp. -# ChanCheckTxSize should be equals to or greater than the mempool size set in config.toml of Ostracon. -chan-check-tx-size = {{ .BaseConfig.ChanCheckTxSize }} - ############################################################################### ### Telemetry Configuration ### ############################################################################### @@ -144,16 +139,13 @@ address = "{{ .API.Address }}" # MaxOpenConnections defines the number of maximum open connections. max-open-connections = {{ .API.MaxOpenConnections }} -# RPCReadTimeout defines the Ostracon RPC read timeout (in seconds). +# RPCReadTimeout defines the Tendermint RPC read timeout (in seconds). rpc-read-timeout = {{ .API.RPCReadTimeout }} -# RPCWriteTimeout defines the Ostracon RPC write timeout (in seconds). +# RPCWriteTimeout defines the Tendermint RPC write timeout (in seconds). rpc-write-timeout = {{ .API.RPCWriteTimeout }} -# RPCIdleTimeout defines the Ostracon RPC idle timeout (in seconds). -rpc-idle-timeout = {{ .API.RPCIdleTimeout }} - -# RPCMaxBodyBytes defines the Ostracon maximum response body (in bytes). +# RPCMaxBodyBytes defines the Tendermint maximum response body (in bytes). rpc-max-body-bytes = {{ .API.RPCMaxBodyBytes }} # EnableUnsafeCORS defines if CORS should be enabled (unsafe - use it at your own risk). @@ -277,5 +269,5 @@ func WriteConfigFile(configFilePath string, config interface{}) { panic(err) } - ostos.MustWriteFile(configFilePath, buffer.Bytes(), 0o644) + tmos.MustWriteFile(configFilePath, buffer.Bytes(), 0o644) } diff --git a/server/export.go b/server/export.go index fd9bbfeb3f..8824be663e 100644 --- a/server/export.go +++ b/server/export.go @@ -7,10 +7,9 @@ import ( "os" "github.com/spf13/cobra" + tmjson "github.com/tendermint/tendermint/libs/json" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - ostjson "github.com/Finschia/ostracon/libs/json" - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/server/types" @@ -73,7 +72,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com return fmt.Errorf("error exporting state: %v", err) } - doc, err := octypes.GenesisDocFromFile(serverCtx.Config.GenesisFile()) + doc, err := tmtypes.GenesisDocFromFile(serverCtx.Config.GenesisFile()) if err != nil { return err } @@ -100,7 +99,7 @@ func ExportCmd(appExporter types.AppExporter, defaultNodeHome string) *cobra.Com // NOTE: Tendermint uses a custom JSON decoder for GenesisDoc // (except for stuff inside AppState). Inside AppState, we're free // to encode as protobuf or amino. - encoded, err := ostjson.Marshal(doc) + encoded, err := tmjson.Marshal(doc) if err != nil { return err } diff --git a/server/export_test.go b/server/export_test.go index 526dde07de..82749249f1 100644 --- a/server/export_test.go +++ b/server/export_test.go @@ -13,14 +13,12 @@ import ( "github.com/spf13/cobra" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + tmjson "github.com/tendermint/tendermint/libs/json" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - ostjson "github.com/Finschia/ostracon/libs/json" - "github.com/Finschia/ostracon/libs/log" - octypes "github.com/Finschia/ostracon/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/codec" @@ -41,8 +39,8 @@ func TestExportCmd_ConsensusParams(t *testing.T) { cmd.SetArgs([]string{fmt.Sprintf("--%s=%s", flags.FlagHome, tempDir)}) require.NoError(t, cmd.ExecuteContext(ctx)) - var exportedGenDoc octypes.GenesisDoc - err := ostjson.Unmarshal(output.Bytes(), &exportedGenDoc) + var exportedGenDoc tmtypes.GenesisDoc + err := tmjson.Unmarshal(output.Bytes(), &exportedGenDoc) if err != nil { t.Fatalf("error unmarshaling exported genesis doc: %s", err) } @@ -101,7 +99,7 @@ func TestExportCmd_Height(t *testing.T) { // Fast forward to block `tc.fastForward`. for i := int64(2); i <= tc.fastForward; i++ { - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) app.Commit() } @@ -111,8 +109,8 @@ func TestExportCmd_Height(t *testing.T) { cmd.SetArgs(args) require.NoError(t, cmd.ExecuteContext(ctx)) - var exportedGenDoc octypes.GenesisDoc - err := ostjson.Unmarshal(output.Bytes(), &exportedGenDoc) + var exportedGenDoc tmtypes.GenesisDoc + err := tmjson.Unmarshal(output.Bytes(), &exportedGenDoc) if err != nil { t.Fatalf("error unmarshaling exported genesis doc: %s", err) } @@ -122,13 +120,13 @@ func TestExportCmd_Height(t *testing.T) { } } -func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *octypes.GenesisDoc, *cobra.Command) { +func setupApp(t *testing.T, tempDir string) (*simapp.SimApp, context.Context, *tmtypes.GenesisDoc, *cobra.Command) { t.Helper() if err := createConfigFolder(tempDir); err != nil { t.Fatalf("error creating config folder: %s", err) } - logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) db := dbm.NewMemDB() encCfg := simapp.MakeTestEncodingConfig() app := simapp.NewSimApp(logger, db, nil, true, map[int64]bool{}, tempDir, 0, encCfg, simapp.EmptyAppOptions{}) @@ -178,7 +176,7 @@ func createConfigFolder(dir string) error { return os.Mkdir(path.Join(dir, "config"), 0o700) } -func newDefaultGenesisDoc(cdc codec.Codec) *octypes.GenesisDoc { +func newDefaultGenesisDoc(cdc codec.Codec) *tmtypes.GenesisDoc { genesisState := simapp.NewDefaultGenesisState(cdc) stateBytes, err := json.MarshalIndent(genesisState, "", " ") @@ -186,7 +184,7 @@ func newDefaultGenesisDoc(cdc codec.Codec) *octypes.GenesisDoc { panic(err) } - genDoc := &octypes.GenesisDoc{} + genDoc := &tmtypes.GenesisDoc{} genDoc.ChainID = "theChainId" genDoc.Validators = nil genDoc.AppState = stateBytes @@ -194,7 +192,7 @@ func newDefaultGenesisDoc(cdc codec.Codec) *octypes.GenesisDoc { return genDoc } -func saveGenesisFile(genDoc *octypes.GenesisDoc, dir string) error { +func saveGenesisFile(genDoc *tmtypes.GenesisDoc, dir string) error { err := genutil.ExportGenesisFile(genDoc, dir) if err != nil { return errors.Wrap(err, "error creating file") diff --git a/server/grpc/grpc_web_test.go b/server/grpc/grpc_web_test.go index 1739fc7bd5..1c88422ccf 100644 --- a/server/grpc/grpc_web_test.go +++ b/server/grpc/grpc_web_test.go @@ -65,7 +65,7 @@ func (s *GRPCWebTestSuite) Test_Latest_Validators() { val := s.network.Validators[0] for _, contentType := range []string{grpcWebContentType} { headers, trailers, responses, err := s.makeGrpcRequest( - "/lbm.base.ostracon.v1.Service/GetLatestValidatorSet", + "/cosmos.base.tendermint.v1beta1.Service/GetLatestValidatorSet", headerWithFlag(), serializeProtoMessages([]proto.Message{&tmservice.GetLatestValidatorSetRequest{}}), false) diff --git a/server/logger.go b/server/logger.go new file mode 100644 index 0000000000..e6f6f8c111 --- /dev/null +++ b/server/logger.go @@ -0,0 +1,55 @@ +package server + +import ( + "github.com/rs/zerolog" + tmlog "github.com/tendermint/tendermint/libs/log" +) + +var _ tmlog.Logger = (*ZeroLogWrapper)(nil) + +// ZeroLogWrapper provides a wrapper around a zerolog.Logger instance. It implements +// Tendermint's Logger interface. +type ZeroLogWrapper struct { + zerolog.Logger +} + +// Info implements Tendermint's Logger interface and logs with level INFO. A set +// of key/value tuples may be provided to add context to the log. The number of +// tuples must be even and the key of the tuple must be a string. +func (z ZeroLogWrapper) Info(msg string, keyVals ...interface{}) { + z.Logger.Info().Fields(getLogFields(keyVals...)).Msg(msg) +} + +// Error implements Tendermint's Logger interface and logs with level ERR. A set +// of key/value tuples may be provided to add context to the log. The number of +// tuples must be even and the key of the tuple must be a string. +func (z ZeroLogWrapper) Error(msg string, keyVals ...interface{}) { + z.Logger.Error().Fields(getLogFields(keyVals...)).Msg(msg) +} + +// Debug implements Tendermint's Logger interface and logs with level DEBUG. A set +// of key/value tuples may be provided to add context to the log. The number of +// tuples must be even and the key of the tuple must be a string. +func (z ZeroLogWrapper) Debug(msg string, keyVals ...interface{}) { + z.Logger.Debug().Fields(getLogFields(keyVals...)).Msg(msg) +} + +// With returns a new wrapped logger with additional context provided by a set +// of key/value tuples. The number of tuples must be even and the key of the +// tuple must be a string. +func (z ZeroLogWrapper) With(keyVals ...interface{}) tmlog.Logger { + return ZeroLogWrapper{z.Logger.With().Fields(getLogFields(keyVals...)).Logger()} +} + +func getLogFields(keyVals ...interface{}) map[string]interface{} { + if len(keyVals)%2 != 0 { + return nil + } + + fields := make(map[string]interface{}) + for i := 0; i < len(keyVals); i += 2 { + fields[keyVals[i].(string)] = keyVals[i+1] + } + + return fields +} diff --git a/server/mock/app.go b/server/mock/app.go index 545005b49c..c8b328a9e0 100644 --- a/server/mock/app.go +++ b/server/mock/app.go @@ -8,10 +8,8 @@ import ( "path/filepath" abci "github.com/tendermint/tendermint/abci/types" - - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/ostracon/types" + "github.com/tendermint/tendermint/libs/log" + "github.com/tendermint/tendermint/types" bam "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/codec" @@ -22,7 +20,7 @@ import ( // NewApp creates a simple mock kvstore app for testing. It should work // similar to a real app. Make sure rootDir is empty before running the test, // in order to guarantee consistent results -func NewApp(rootDir string, logger log.Logger) (ocabci.Application, error) { +func NewApp(rootDir string, logger log.Logger) (abci.Application, error) { db, err := sdk.NewLevelDB("mock", filepath.Join(rootDir, "data")) if err != nil { return nil, err diff --git a/server/mock/app_test.go b/server/mock/app_test.go index fc5e27dfdd..94362c8870 100644 --- a/server/mock/app_test.go +++ b/server/mock/app_test.go @@ -6,9 +6,7 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/types" + "github.com/tendermint/tendermint/types" ) // TestInitApp makes sure we can initialize this thing without an error @@ -62,7 +60,7 @@ func TestDeliverTx(t *testing.T) { AppHash: []byte("apphash"), Height: 1, } - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) dres := app.DeliverTx(abci.RequestDeliverTx{Tx: txBytes}) require.Equal(t, uint32(0), dres.Code, dres.Log) app.EndBlock(abci.RequestEndBlock{}) diff --git a/server/mock/helpers.go b/server/mock/helpers.go index 9de642e4eb..334a21d9fd 100644 --- a/server/mock/helpers.go +++ b/server/mock/helpers.go @@ -4,14 +4,14 @@ import ( "fmt" "os" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" ) // SetupApp returns an application as well as a clean-up function // to be used to quickly setup a test case with an app -func SetupApp() (ocabci.Application, func(), error) { - logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)). +func SetupApp() (abci.Application, func(), error) { + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)). With("module", "mock") rootDir, err := os.MkdirTemp("", "mock-sdk") if err != nil { diff --git a/server/rollback.go b/server/rollback.go index 0d144d21a0..86f7f8536e 100644 --- a/server/rollback.go +++ b/server/rollback.go @@ -4,8 +4,7 @@ import ( "fmt" "github.com/spf13/cobra" - - ostcmd "github.com/Finschia/ostracon/cmd/ostracon/commands" + tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/server/types" @@ -34,7 +33,7 @@ application. } app := appCreator(ctx.Logger, db, nil, ctx.Viper) // rollback tendermint state - height, hash, err := ostcmd.RollbackState(ctx.Config) + height, hash, err := tmcmd.RollbackState(ctx.Config) if err != nil { return fmt.Errorf("failed to rollback tendermint state: %w", err) } diff --git a/server/rosetta/client_online.go b/server/rosetta/client_online.go index bd81c0c2ca..744d584d05 100644 --- a/server/rosetta/client_online.go +++ b/server/rosetta/client_online.go @@ -13,13 +13,12 @@ import ( rosettatypes "github.com/coinbase/rosetta-sdk-go/types" abci "github.com/tendermint/tendermint/abci/types" + tmrpc "github.com/tendermint/tendermint/rpc/client" + "github.com/tendermint/tendermint/rpc/client/http" "google.golang.org/grpc" "google.golang.org/grpc/credentials/insecure" "google.golang.org/grpc/metadata" - ocrpc "github.com/Finschia/ostracon/rpc/client" - "github.com/Finschia/ostracon/rpc/client/http" - crgerrs "github.com/Finschia/finschia-sdk/server/rosetta/lib/errors" crgtypes "github.com/Finschia/finschia-sdk/server/rosetta/lib/types" sdk "github.com/Finschia/finschia-sdk/types" @@ -46,7 +45,7 @@ type Client struct { auth auth.QueryClient bank bank.QueryClient - tmRPC ocrpc.Client + tmRPC tmrpc.Client version string diff --git a/server/rosetta/converter.go b/server/rosetta/converter.go index 181553ac01..0a227adf59 100644 --- a/server/rosetta/converter.go +++ b/server/rosetta/converter.go @@ -9,10 +9,9 @@ import ( rosettatypes "github.com/coinbase/rosetta-sdk-go/types" secp "github.com/decred/dcrd/dcrec/secp256k1/v4" abci "github.com/tendermint/tendermint/abci/types" - - "github.com/Finschia/ostracon/crypto" - ostcoretypes "github.com/Finschia/ostracon/rpc/core/types" - octypes "github.com/Finschia/ostracon/types" + "github.com/tendermint/tendermint/crypto" + tmcoretypes "github.com/tendermint/tendermint/rpc/core/types" + tmtypes "github.com/tendermint/tendermint/types" sdkclient "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" @@ -50,7 +49,7 @@ type Converter interface { // tendermint types to rosetta known types type ToRosettaConverter interface { // BlockResponse returns a block response given a result block - BlockResponse(block *ostcoretypes.ResultBlock) crgtypes.BlockResponse + BlockResponse(block *tmcoretypes.ResultBlock) crgtypes.BlockResponse // BeginBlockToTx converts the given begin block hash to rosetta transaction hash BeginBlockTxHash(blockHash []byte) string // EndBlockTxHash converts the given endblock hash to rosetta transaction hash @@ -68,15 +67,15 @@ type ToRosettaConverter interface { // SigningComponents returns rosetta's components required to build a signable transaction SigningComponents(tx authsigning.Tx, metadata *ConstructionMetadata, rosPubKeys []*rosettatypes.PublicKey) (txBytes []byte, payloadsToSign []*rosettatypes.SigningPayload, err error) // Tx converts a tendermint transaction and tx result if provided to a rosetta tx - Tx(rawTx octypes.Tx, txResult *abci.ResponseDeliverTx) (*rosettatypes.Transaction, error) + Tx(rawTx tmtypes.Tx, txResult *abci.ResponseDeliverTx) (*rosettatypes.Transaction, error) // TxIdentifiers converts a tendermint tx to transaction identifiers - TxIdentifiers(txs []octypes.Tx) []*rosettatypes.TransactionIdentifier + TxIdentifiers(txs []tmtypes.Tx) []*rosettatypes.TransactionIdentifier // BalanceOps converts events to balance operations BalanceOps(status string, events []abci.Event) []*rosettatypes.Operation // SyncStatus converts a tendermint status to sync status - SyncStatus(status *ostcoretypes.ResultStatus) *rosettatypes.SyncStatus + SyncStatus(status *tmcoretypes.ResultStatus) *rosettatypes.SyncStatus // Peers converts tendermint peers to rosetta - Peers(peers []ostcoretypes.Peer) []*rosettatypes.Peer + Peers(peers []tmcoretypes.Peer) []*rosettatypes.Peer } // ToSDKConverter is an interface that exposes @@ -259,7 +258,7 @@ func (c converter) Ops(status string, msg sdk.Msg) ([]*rosettatypes.Operation, e } // Tx converts a tendermint raw transaction and its result (if provided) to a rosetta transaction -func (c converter) Tx(rawTx octypes.Tx, txResult *abci.ResponseDeliverTx) (*rosettatypes.Transaction, error) { +func (c converter) Tx(rawTx tmtypes.Tx, txResult *abci.ResponseDeliverTx) (*rosettatypes.Transaction, error) { // decode tx tx, err := c.txDecode(rawTx) if err != nil { @@ -501,7 +500,7 @@ func (c converter) HashToTxType(hashBytes []byte) (txType TransactionType, realH } // StatusToSyncStatus converts a tendermint status to rosetta sync status -func (c converter) SyncStatus(status *ostcoretypes.ResultStatus) *rosettatypes.SyncStatus { +func (c converter) SyncStatus(status *tmcoretypes.ResultStatus) *rosettatypes.SyncStatus { // determine sync status stage := StatusPeerSynced if status.SyncInfo.CatchingUp { @@ -516,7 +515,7 @@ func (c converter) SyncStatus(status *ostcoretypes.ResultStatus) *rosettatypes.S } // TxIdentifiers converts a tendermint raw transactions into an array of rosetta tx identifiers -func (c converter) TxIdentifiers(txs []octypes.Tx) []*rosettatypes.TransactionIdentifier { +func (c converter) TxIdentifiers(txs []tmtypes.Tx) []*rosettatypes.TransactionIdentifier { converted := make([]*rosettatypes.TransactionIdentifier, len(txs)) for i, tx := range txs { converted[i] = &rosettatypes.TransactionIdentifier{Hash: fmt.Sprintf("%X", tx.Hash())} @@ -526,7 +525,7 @@ func (c converter) TxIdentifiers(txs []octypes.Tx) []*rosettatypes.TransactionId } // tmResultBlockToRosettaBlockResponse converts a tendermint result block to block response -func (c converter) BlockResponse(block *ostcoretypes.ResultBlock) crgtypes.BlockResponse { +func (c converter) BlockResponse(block *tmcoretypes.ResultBlock) crgtypes.BlockResponse { var parentBlock *rosettatypes.BlockIdentifier switch block.Block.Height { @@ -553,7 +552,7 @@ func (c converter) BlockResponse(block *ostcoretypes.ResultBlock) crgtypes.Block } // Peers converts tm peers to rosetta peers -func (c converter) Peers(peers []ostcoretypes.Peer) []*rosettatypes.Peer { +func (c converter) Peers(peers []tmcoretypes.Peer) []*rosettatypes.Peer { converted := make([]*rosettatypes.Peer, len(peers)) for i, peer := range peers { diff --git a/server/start.go b/server/start.go index 88796e4659..8313fe41ee 100644 --- a/server/start.go +++ b/server/start.go @@ -11,18 +11,17 @@ import ( "time" "github.com/spf13/cobra" + "github.com/tendermint/tendermint/abci/server" + tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" + "github.com/tendermint/tendermint/config" + tmos "github.com/tendermint/tendermint/libs/os" + "github.com/tendermint/tendermint/node" + "github.com/tendermint/tendermint/p2p" + pvm "github.com/tendermint/tendermint/privval" + "github.com/tendermint/tendermint/proxy" + "github.com/tendermint/tendermint/rpc/client/local" "google.golang.org/grpc" - "github.com/Finschia/ostracon/abci/server" - ostcmd "github.com/Finschia/ostracon/cmd/ostracon/commands" - "github.com/Finschia/ostracon/config" - ostos "github.com/Finschia/ostracon/libs/os" - "github.com/Finschia/ostracon/node" - "github.com/Finschia/ostracon/p2p" - pvm "github.com/Finschia/ostracon/privval" - "github.com/Finschia/ostracon/proxy" - "github.com/Finschia/ostracon/rpc/client/local" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/codec" @@ -38,9 +37,9 @@ import ( "github.com/Finschia/finschia-sdk/telemetry" ) -// Ostracon full-node start flags +// Tendermint full-node start flags const ( - flagWithOstracon = "with-ostracon" + flagWithTendermint = "with-tendermint" flagAddress = "address" flagTransport = "transport" flagTraceStore = "trace-store" @@ -54,7 +53,6 @@ const ( FlagTrace = "trace" FlagInvCheckPeriod = "inv-check-period" FlagPrometheus = "prometheus" - FlagChanCheckTxSize = "chan-check-tx-size" FlagPruning = "pruning" FlagPruningKeepRecent = "pruning-keep-recent" @@ -78,13 +76,13 @@ const ( ) // StartCmd runs the service passed in, either stand-alone or in-process with -// Ostracon. +// Tendermint. func StartCmd(appCreator types.AppCreator, defaultNodeHome string) *cobra.Command { cmd := &cobra.Command{ Use: "start", Short: "Run the full node", - Long: `Run the full node application with Ostracon in or out of process. By -default, the application will run with Ostracon in process. + Long: `Run the full node application with Tendermint in or out of process. By +default, the application will run with Tendermint in process. Pruning options can be provided via the '--pruning' flag or alternatively with '--pruning-keep-recent', 'pruning-keep-every', and 'pruning-interval' together. @@ -129,13 +127,13 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. return err } - withOST, _ := cmd.Flags().GetBool(flagWithOstracon) - if !withOST { - serverCtx.Logger.Info("starting ABCI without Ostracon") + withTM, _ := cmd.Flags().GetBool(flagWithTendermint) + if !withTM { + serverCtx.Logger.Info("starting ABCI without Tendermint") return startStandAlone(serverCtx, appCreator) } - serverCtx.Logger.Info("starting ABCI with Ostracon") + serverCtx.Logger.Info("starting ABCI with Tendermint") // amino is needed here for backwards compatibility of REST routes err = startInProcess(serverCtx, clientCtx, appCreator) @@ -150,7 +148,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. } cmd.Flags().String(flags.FlagHome, defaultNodeHome, "The application home directory") - cmd.Flags().Bool(flagWithOstracon, true, "Run abci app embedded in-process with ostracon") + cmd.Flags().Bool(flagWithTendermint, true, "Run abci app embedded in-process with tendermint") cmd.Flags().String(flagAddress, "tcp://0.0.0.0:26658", "Listen address") cmd.Flags().String(flagTransport, "socket", "Transport protocol: socket, grpc") cmd.Flags().String(flagTraceStore, "", "Enable KVStore tracing to an output file") @@ -168,7 +166,7 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. cmd.Flags().Uint64(FlagPruningKeepEvery, 0, "Offset heights to keep on disk after 'keep-every' (ignored if pruning is not 'custom')") cmd.Flags().Uint64(FlagPruningInterval, 0, "Height interval at which pruned heights are removed from disk (ignored if pruning is not 'custom')") cmd.Flags().Uint(FlagInvCheckPeriod, 0, "Assert registered invariants every N blocks") - cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Ostracon blocks") + cmd.Flags().Uint64(FlagMinRetainBlocks, 0, "Minimum block height offset during ABCI commit to prune Tendermint blocks") cmd.Flags().Bool(flagGRPCOnly, false, "Start the node in gRPC query only mode (no Tendermint process is started)") cmd.Flags().Bool(flagGRPCEnable, true, "Define if the gRPC server should be enabled") @@ -184,10 +182,8 @@ is performed. Note, when enabled, gRPC will also be automatically enabled. cmd.Flags().Bool(FlagPrometheus, false, "Enable prometheus metric for app") - cmd.Flags().Uint(FlagChanCheckTxSize, serverconfig.DefaultChanCheckTxSize, "The size of the channel check tx") - - // add support for all Ostracon-specific command line options - ostcmd.AddNodeFlags(cmd) + // add support for all Tendermint-specific command line options + tmcmd.AddNodeFlags(cmd) return cmd } @@ -228,12 +224,12 @@ func startStandAlone(ctx *Context, appCreator types.AppCreator) error { err = svr.Start() if err != nil { - ostos.Exit(err.Error()) + tmos.Exit(err.Error()) } defer func() { if err = svr.Stop(); err != nil { - ostos.Exit(err.Error()) + tmos.Exit(err.Error()) } }() @@ -296,19 +292,19 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App genDocProvider := node.DefaultGenesisDocProviderFunc(cfg) var ( - ocNode *node.Node + tmNode *node.Node gRPCOnly = ctx.Viper.GetBool(flagGRPCOnly) ) if gRPCOnly { - ctx.Logger.Info("starting node in gRPC only mode; Ostracon is disabled") + ctx.Logger.Info("starting node in gRPC only mode; Tendermint is disabled") config.GRPC.Enable = true } else { - ctx.Logger.Info("starting node with ABCI Ostracon in-process") + ctx.Logger.Info("starting node with ABCI Tendermint in-process") pv := genPvFileOnlyWhenKmsAddressEmpty(cfg) - ocNode, err = node.NewNode( + tmNode, err = node.NewNode( cfg, pv, nodeKey, @@ -321,18 +317,18 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App if err != nil { return err } - ctx.Logger.Debug("initialization: ocNode created") - if err := ocNode.Start(); err != nil { + ctx.Logger.Debug("initialization: tmNode created") + if err := tmNode.Start(); err != nil { return err } - ctx.Logger.Debug("initialization: ocNode started") + ctx.Logger.Debug("initialization: tmNode started") } // Add the tx service to the gRPC router. We only need to register this // service if API or gRPC is enabled, and avoid doing so in the general - // case, because it spawns a new local ostracon RPC client. - if (config.API.Enable || config.GRPC.Enable) && ocNode != nil { - clientCtx = clientCtx.WithClient(local.New(ocNode)) + // case, because it spawns a new local tendermint RPC client. + if (config.API.Enable || config.GRPC.Enable) && tmNode != nil { + clientCtx = clientCtx.WithClient(local.New(tmNode)) app.RegisterTxService(clientCtx) app.RegisterTendermintService(clientCtx) @@ -447,8 +443,8 @@ func startInProcess(ctx *Context, clientCtx client.Context, appCreator types.App } defer func() { - if ocNode.IsRunning() { - _ = ocNode.Stop() + if tmNode.IsRunning() { + _ = tmNode.Stop() } if cpuProfileCleanup != nil { diff --git a/server/start_test.go b/server/start_test.go index ae7a1f5be9..0f7a38eccf 100644 --- a/server/start_test.go +++ b/server/start_test.go @@ -5,8 +5,7 @@ import ( "testing" "github.com/stretchr/testify/assert" - - "github.com/Finschia/ostracon/config" + "github.com/tendermint/tendermint/config" ) func TestGenPvFileOnlyWhenKmsAddressEmptyGenerateFiles(t *testing.T) { diff --git a/server/test_helpers.go b/server/test_helpers.go index e26632c10e..15ed9aa8f1 100644 --- a/server/test_helpers.go +++ b/server/test_helpers.go @@ -7,7 +7,7 @@ import ( sdkerrors "github.com/Finschia/finschia-sdk/types/errors" ) -// Get a free address for a test ostracon server +// Get a free address for a test tendermint server // protocol is either tcp, http, etc func FreeTCPAddr() (addr, port string, err error) { l, err := net.Listen("tcp", "localhost:0") diff --git a/server/oc_cmds.go b/server/tm_cmds.go similarity index 56% rename from server/oc_cmds.go rename to server/tm_cmds.go index 79a16ce8e8..e05b52e4ab 100644 --- a/server/oc_cmds.go +++ b/server/tm_cmds.go @@ -6,21 +6,20 @@ import ( "fmt" "github.com/spf13/cobra" + cfg "github.com/tendermint/tendermint/config" + tmjson "github.com/tendermint/tendermint/libs/json" + tmos "github.com/tendermint/tendermint/libs/os" + "github.com/tendermint/tendermint/node" + "github.com/tendermint/tendermint/p2p" + pvm "github.com/tendermint/tendermint/privval" + "github.com/tendermint/tendermint/types" + tmversion "github.com/tendermint/tendermint/version" yaml "gopkg.in/yaml.v2" - cfg "github.com/Finschia/ostracon/config" - osjson "github.com/Finschia/ostracon/libs/json" - ostos "github.com/Finschia/ostracon/libs/os" - "github.com/Finschia/ostracon/node" - "github.com/Finschia/ostracon/p2p" - pvm "github.com/Finschia/ostracon/privval" - "github.com/Finschia/ostracon/types" - ostversion "github.com/Finschia/ostracon/version" - sdk "github.com/Finschia/finschia-sdk/types" ) -// ShowNodeIDCmd - ported from Ostracon, dump node ID to stdout +// ShowNodeIDCmd - ported from tendermint, dump node ID to stdout func ShowNodeIDCmd() *cobra.Command { return &cobra.Command{ Use: "show-node-id", @@ -39,48 +38,52 @@ func ShowNodeIDCmd() *cobra.Command { } } -// ShowValidatorCmd - ported from Ostracon, show this node's validator info +// ShowValidatorCmd - ported from tendermint, show this node's validator info func ShowValidatorCmd() *cobra.Command { cmd := cobra.Command{ Use: "show-validator", - Short: "Show this node's ostracon validator info", + Short: "Show this node's tendermint validator info", RunE: func(cmd *cobra.Command, args []string) error { serverCtx := GetServerContextFromCmd(cmd) - cfg := serverCtx.Config - return showValidator(cmd, cfg) + config := serverCtx.Config + return showValidator(cmd, config) }, } return &cmd } -func showValidator(cmd *cobra.Command, config *cfg.Config) error { +func showValidator(_ *cobra.Command, config *cfg.Config) error { var pv types.PrivValidator - if config.PrivValidatorListenAddr != "" { - chainID, err := loadChainID(config) - if err != nil { - return err - } - serverCtx := GetServerContextFromCmd(cmd) - log := serverCtx.Logger - pv, err = node.CreateAndStartPrivValidatorSocketClient(config, chainID, log) - if err != nil { - return err - } - } else { - keyFilePath := config.PrivValidatorKeyFile() - if !ostos.FileExists(keyFilePath) { - return fmt.Errorf("private validator file %s does not exist", keyFilePath) - } - pv = pvm.LoadFilePV(keyFilePath, config.PrivValidatorStateFile()) + //nolint:gocritic + // todo: need to fix it when node.createAndStartPrivValidatorSocketClient change to public function in cometbft + // This changes is applied in finschia-sdk.https://github.com/Finschia/finschia-sdk/pull/821 + //if config.PrivValidatorListenAddr != "" { + // chainID, err := loadChainID(config) + // if err != nil { + // return err + // } + // serverCtx := GetServerContextFromCmd(cmd) + // log := serverCtx.Logger + // node. + // pv, err = node.CreateAndStartPrivValidatorSocketClient(config, chainID, log) + // if err != nil { + // return err + // } + //} else { + keyFilePath := config.PrivValidatorKeyFile() + if !tmos.FileExists(keyFilePath) { + return fmt.Errorf("private validator file %s does not exist", keyFilePath) } + pv = pvm.LoadFilePV(keyFilePath, config.PrivValidatorStateFile()) + //} pubKey, err := pv.GetPubKey() if err != nil { return fmt.Errorf("can't get pubkey: %w", err) } - bz, err := osjson.Marshal(pubKey) + bz, err := tmjson.Marshal(pubKey) if err != nil { return fmt.Errorf("failed to marshal private validator pubkey: %w", err) } @@ -109,7 +112,7 @@ func loadChainID(config *cfg.Config) (string, error) { func ShowAddressCmd() *cobra.Command { cmd := &cobra.Command{ Use: "show-address", - Short: "Shows this node's ostracon validator consensus address", + Short: "Shows this node's tendermint validator consensus address", RunE: func(cmd *cobra.Command, args []string) error { serverCtx := GetServerContextFromCmd(cmd) cfg := serverCtx.Config @@ -124,25 +127,25 @@ func ShowAddressCmd() *cobra.Command { return cmd } -// VersionCmd prints ostracon and ABCI version numbers. +// VersionCmd prints tendermint and ABCI version numbers. func VersionCmd() *cobra.Command { return &cobra.Command{ Use: "version", - Short: "Print ostracon libraries' version", + Short: "Print tendermint libraries' version", Long: `Print protocols' and libraries' version numbers against which this app has been compiled. `, RunE: func(cmd *cobra.Command, args []string) error { bs, err := yaml.Marshal(&struct { - Ostracon string + Tendermint string ABCI string BlockProtocol uint64 P2PProtocol uint64 }{ - Ostracon: ostversion.OCCoreSemVer, - ABCI: ostversion.ABCIVersion, - BlockProtocol: ostversion.BlockProtocol, - P2PProtocol: ostversion.P2PProtocol, + Tendermint: tmversion.TMCoreSemVer, + ABCI: tmversion.ABCIVersion, + BlockProtocol: tmversion.BlockProtocol, + P2PProtocol: tmversion.P2PProtocol, }) if err != nil { return err diff --git a/server/oc_cmds_test.go b/server/tm_cmds_test.go similarity index 70% rename from server/oc_cmds_test.go rename to server/tm_cmds_test.go index 99813ee0cc..efb67fb7fc 100644 --- a/server/oc_cmds_test.go +++ b/server/tm_cmds_test.go @@ -3,26 +3,23 @@ package server import ( "bytes" "context" - "errors" "fmt" "os" "testing" "github.com/stretchr/testify/require" - - cfg "github.com/Finschia/ostracon/config" - "github.com/Finschia/ostracon/crypto" - tmjson "github.com/Finschia/ostracon/libs/json" - "github.com/Finschia/ostracon/libs/log" - tmos "github.com/Finschia/ostracon/libs/os" - tmrand "github.com/Finschia/ostracon/libs/rand" - "github.com/Finschia/ostracon/p2p" - "github.com/Finschia/ostracon/privval" - "github.com/Finschia/ostracon/types" - tmtime "github.com/Finschia/ostracon/types/time" + cfg "github.com/tendermint/tendermint/config" + tmjson "github.com/tendermint/tendermint/libs/json" + "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" + tmrand "github.com/tendermint/tendermint/libs/rand" + "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/privval" + "github.com/tendermint/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" ) -var logger = log.NewOCLogger(log.NewSyncWriter(os.Stdout)) +var logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)) func TestShowValidator(t *testing.T) { testCommon := newPrecedenceCommon(t) @@ -34,7 +31,7 @@ func TestShowValidator(t *testing.T) { t.Fatalf("function failed with [%T] %v", err, err) } - // ostracon init & create the server config file + // tendermint init & create the server config file err := initFilesWithConfig(serverCtx.Config) require.NoError(t, err) output := captureStdout(t, func() { @@ -49,47 +46,6 @@ func TestShowValidator(t *testing.T) { require.Equal(t, string(bz), output) } -func TestShowValidatorWithKMS(t *testing.T) { - testCommon := newPrecedenceCommon(t) - - serverCtx := &Context{} - ctx := context.WithValue(context.Background(), ServerContextKey, serverCtx) - - if err := testCommon.cmd.ExecuteContext(ctx); !errors.Is(err, errCancelledInPreRun) { - t.Fatalf("function failed with [%T] %v", err, err) - } - - // ostracon init & create the server config file - serverCtx.Config.PrivValidatorRemoteAddresses = append(serverCtx.Config.PrivValidatorRemoteAddresses, "127.0.0.1") - err := initFilesWithConfig(serverCtx.Config) - require.NoError(t, err) - - chainID, err := loadChainID(serverCtx.Config) - require.NoError(t, err) - - // remove config file - if tmos.FileExists(serverCtx.Config.PrivValidatorKeyFile()) { - err := os.Remove(serverCtx.Config.PrivValidatorKeyFile()) - require.NoError(t, err) - } - - privval.WithMockKMS(t, t.TempDir(), chainID, func(addr string, privKey crypto.PrivKey) { - serverCtx.Config.PrivValidatorListenAddr = addr - require.NoFileExists(t, serverCtx.Config.PrivValidatorKeyFile()) - output := captureStdout(t, func() { - err := ShowValidatorCmd().ExecuteContext(ctx) - require.NoError(t, err) - }) - require.NoError(t, err) - - // output must contains the KMS public key - bz, err := tmjson.Marshal(privKey.PubKey()) - require.NoError(t, err) - expected := string(bz) - require.Contains(t, output, expected) - }) -} - func TestShowValidatorWithInefficientKMSAddress(t *testing.T) { testCommon := newPrecedenceCommon(t) @@ -100,7 +56,7 @@ func TestShowValidatorWithInefficientKMSAddress(t *testing.T) { t.Fatalf("function failed with [%T] %v", err, err) } - // ostracon init & create the server config file + // tendermint init & create the server config file err := initFilesWithConfig(serverCtx.Config) require.NoError(t, err) diff --git a/server/types/app.go b/server/types/app.go index 66669ff79f..397d2c1030 100644 --- a/server/types/app.go +++ b/server/types/app.go @@ -8,12 +8,10 @@ import ( "github.com/gogo/protobuf/grpc" "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - octypes "github.com/Finschia/ostracon/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/server/api" "github.com/Finschia/finschia-sdk/server/config" @@ -40,7 +38,7 @@ type ( // The interface defines the necessary contracts to be implemented in order // to fully bootstrap and start an application. Application interface { - ocabci.Application + abci.Application RegisterAPIRoutes(*api.Server, config.APIConfig) @@ -52,7 +50,7 @@ type ( // simulation, fetching txs by hash...). RegisterTxService(client.Context) - // RegisterTendermintService registers the gRPC Query service for ostracon queries. + // RegisterTendermintService registers the gRPC Query service for tendermint queries. RegisterTendermintService(client.Context) // CommitMultiStore Returns the multistore instance @@ -82,7 +80,7 @@ type ( // AppState is the application state as JSON. AppState json.RawMessage // Validators is the exported validator set. - Validators []octypes.GenesisValidator + Validators []tmtypes.GenesisValidator // Height is the app's latest block height. Height int64 // ConsensusParams are the exported consensus params for ABCI. diff --git a/server/util.go b/server/util.go index 9158513a31..78fa9fb670 100644 --- a/server/util.go +++ b/server/util.go @@ -14,15 +14,16 @@ import ( "syscall" "time" + "github.com/rs/zerolog" + "github.com/rs/zerolog/log" "github.com/spf13/cobra" "github.com/spf13/pflag" "github.com/spf13/viper" + tmcmd "github.com/tendermint/tendermint/cmd/tendermint/commands" + tmcfg "github.com/tendermint/tendermint/config" + tmlog "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - ostcmd "github.com/Finschia/ostracon/cmd/ostracon/commands" - ostcfg "github.com/Finschia/ostracon/config" - ostlog "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/server/config" "github.com/Finschia/finschia-sdk/server/types" @@ -39,8 +40,8 @@ const ServerContextKey = sdk.ContextKey("server.context") // server context type Context struct { Viper *viper.Viper - Config *ostcfg.Config - Logger ostlog.Logger + Config *tmcfg.Config + Logger tmlog.Logger } // ErrorCode contains the exit code for server exit. @@ -55,12 +56,12 @@ func (e ErrorCode) Error() string { func NewDefaultContext() *Context { return NewContext( viper.New(), - ostcfg.DefaultConfig(), - ostlog.ZeroLogWrapper{}, + tmcfg.DefaultConfig(), + ZeroLogWrapper{log.Logger}, ) } -func NewContext(v *viper.Viper, config *ostcfg.Config, logger ostlog.Logger) *Context { +func NewContext(v *viper.Viper, config *tmcfg.Config, logger tmlog.Logger) *Context { return &Context{v, config, logger} } @@ -131,42 +132,33 @@ func InterceptConfigsPreRunHandler(cmd *cobra.Command, customAppConfigTemplate s serverCtx.Viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_", "-", "_")) serverCtx.Viper.AutomaticEnv() + var logWriter io.Writer + if strings.ToLower(serverCtx.Viper.GetString(flags.FlagLogFormat)) == tmcfg.LogFormatPlain { + logWriter = zerolog.ConsoleWriter{Out: os.Stderr} + } else { + logWriter = os.Stderr + } + + logLvlStr := serverCtx.Viper.GetString(flags.FlagLogLevel) + logLvl, err := zerolog.ParseLevel(logLvlStr) + if err != nil { + return fmt.Errorf("failed to parse log level (%s): %w", logLvlStr, err) + } + + serverCtx.Logger = ZeroLogWrapper{zerolog.New(logWriter).Level(logLvl).With().Timestamp().Logger()} + // intercept configuration files, using both Viper instances separately config, err := interceptConfigs(serverCtx.Viper, customAppConfigTemplate, customAppConfig) if err != nil { return err } - // return value is a ostracon configuration object + // return value is a tendermint configuration object serverCtx.Config = config if err = bindFlags(basename, cmd, serverCtx.Viper); err != nil { return err } - isLogPlain := false - if strings.ToLower(serverCtx.Viper.GetString(flags.FlagLogFormat)) == ostcfg.LogFormatPlain { - isLogPlain = true - } - - logLevel := serverCtx.Viper.GetString(flags.FlagLogLevel) - if logLevel == "" { - logLevel = ostcfg.DefaultPackageLogLevels() - } - - zerologCfg := ostlog.NewZeroLogConfig( - isLogPlain, - logLevel, - serverCtx.Viper.GetString(flags.FlagLogPath), - serverCtx.Viper.GetInt(flags.FlagLogMaxAge), - serverCtx.Viper.GetInt(flags.FlagLogMaxSize), - serverCtx.Viper.GetInt(flags.FlagLogMaxBackups), - ) - - serverCtx.Logger, err = ostlog.NewZeroLogLogger(zerologCfg, os.Stderr) - if err != nil { - return fmt.Errorf("failed to initialize logger: %w", err) - } - return SetCmdServerContext(cmd, serverCtx) } @@ -199,16 +191,16 @@ func SetCmdServerContext(cmd *cobra.Command, serverCtx *Context) error { // configuration file. The Tendermint configuration file is parsed given a root // Viper object, whereas the application is parsed with the private package-aware // viperCfg object. -func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customConfig interface{}) (*ostcfg.Config, error) { +func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customConfig interface{}) (*tmcfg.Config, error) { rootDir := rootViper.GetString(flags.FlagHome) configPath := filepath.Join(rootDir, "config") tmCfgFile := filepath.Join(configPath, "config.toml") - conf := ostcfg.DefaultConfig() + conf := tmcfg.DefaultConfig() switch _, err := os.Stat(tmCfgFile); { case os.IsNotExist(err): - ostcfg.EnsureRoot(rootDir) + tmcfg.EnsureRoot(rootDir) if err = conf.ValidateBasic(); err != nil { return nil, fmt.Errorf("error in config file: %v", err) @@ -217,13 +209,8 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo conf.RPC.PprofListenAddress = "localhost:6060" conf.P2P.RecvRate = 5120000 conf.P2P.SendRate = 5120000 - conf.P2P.PexRecvBufSize = 10000 - conf.P2P.MempoolRecvBufSize = 100000 - conf.P2P.EvidenceRecvBufSize = 10000 - conf.P2P.ConsensusRecvBufSize = 10000 - conf.P2P.BlockchainRecvBufSize = 10000 conf.Consensus.TimeoutCommit = 5 * time.Second - ostcfg.WriteConfigFile(tmCfgFile, conf) + tmcfg.WriteConfigFile(tmCfgFile, conf) case err != nil: return nil, err @@ -280,18 +267,18 @@ func interceptConfigs(rootViper *viper.Viper, customAppTemplate string, customCo // add server commands func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator types.AppCreator, appExport types.AppExporter, addStartFlags types.ModuleInitFlags) { - ostraconCmd := &cobra.Command{ - Use: "ostracon", - Short: "Ostracon subcommands", + tendermintCmd := &cobra.Command{ + Use: "tendermint", + Short: "Tendermint subcommands", } - ostraconCmd.AddCommand( + tendermintCmd.AddCommand( ShowNodeIDCmd(), ShowValidatorCmd(), ShowAddressCmd(), VersionCmd(), - ostcmd.ResetAllCmd, - ostcmd.ResetStateCmd, + tmcmd.ResetAllCmd, + tmcmd.ResetStateCmd, ) startCmd := StartCmd(appCreator, defaultNodeHome) @@ -299,7 +286,7 @@ func AddCommands(rootCmd *cobra.Command, defaultNodeHome string, appCreator type rootCmd.AddCommand( startCmd, - ostraconCmd, + tendermintCmd, ExportCmd(appExport, defaultNodeHome), version.NewVersionCommand(), NewRollbackCmd(appCreator, defaultNodeHome), diff --git a/server/util_test.go b/server/util_test.go index aa1124a9cd..02931b6183 100644 --- a/server/util_test.go +++ b/server/util_test.go @@ -58,9 +58,9 @@ func TestInterceptConfigsPreRunHandlerCreatesConfigFilesWhenMissing(t *testing.T t.Fatal("config.toml created as empty file") } - // Test that ostracon config is initialized + // Test that tendermint config is initialized if serverCtx.Config == nil { - t.Fatal("ostracon config not created") + t.Fatal("tendermint config not created") } // Test that app.toml is created @@ -171,7 +171,7 @@ func TestInterceptConfigsPreRunHandlerReadsFlags(t *testing.T) { t.Fatalf("Could not set home flag [%T] %v", err, err) } - // This flag is added by ostracon + // This flag is added by tendermint if err := cmd.Flags().Set("rpc.laddr", testAddr); err != nil { t.Fatalf("Could not set address flag [%T] %v", err, err) } @@ -204,7 +204,7 @@ func TestInterceptConfigsPreRunHandlerReadsEnvVars(t *testing.T) { } basename := path.Base(executableName) basename = strings.ReplaceAll(basename, ".", "_") - // This is added by ostracon + // This is added by tendermint envVarName := fmt.Sprintf("%s_RPC_LADDR", strings.ToUpper(basename)) os.Setenv(envVarName, testAddr) t.Cleanup(func() { @@ -259,7 +259,7 @@ func newPrecedenceCommon(t *testing.T) precedenceCommon { // Store the name of the env. var. retval.envVarName = fmt.Sprintf("%s_RPC_LADDR", strings.ToUpper(basename)) - // Store the flag name. This flag is added by ostracon + // Store the flag name. This flag is added by tendermint retval.flagName = "rpc.laddr" // Create a tempdir and create './config' under that diff --git a/simapp/app.go b/simapp/app.go index 06aba8fbae..c3e1f44cfe 100644 --- a/simapp/app.go +++ b/simapp/app.go @@ -11,18 +11,15 @@ import ( "github.com/gorilla/mux" "github.com/spf13/cast" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - ostos "github.com/Finschia/ostracon/libs/os" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/docs" nodeservice "github.com/Finschia/finschia-sdk/client/grpc/node" - "github.com/Finschia/finschia-sdk/client/grpc/ocservice" "github.com/Finschia/finschia-sdk/client/grpc/tmservice" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/codec/types" @@ -40,7 +37,6 @@ import ( authkeeper "github.com/Finschia/finschia-sdk/x/auth/keeper" authsims "github.com/Finschia/finschia-sdk/x/auth/simulation" authtx "github.com/Finschia/finschia-sdk/x/auth/tx" - authtx2 "github.com/Finschia/finschia-sdk/x/auth/tx2" authtypes "github.com/Finschia/finschia-sdk/x/auth/types" "github.com/Finschia/finschia-sdk/x/auth/vesting" vestingtypes "github.com/Finschia/finschia-sdk/x/auth/vesting/types" @@ -262,7 +258,7 @@ func NewSimApp( // configure state listening capabilities using AppOptions // we are doing nothing with the returned streamingServices and waitGroup in this case if _, _, err := streaming.LoadStreamingServices(bApp, appOpts, appCodec, keys); err != nil { - ostos.Exit(err.Error()) + tmos.Exit(err.Error()) } app := &SimApp{ @@ -512,7 +508,7 @@ func NewSimApp( if loadLatest { if err := app.LoadLatestVersion(); err != nil { - ostos.Exit(err.Error()) + tmos.Exit(err.Error()) } ctx := app.BaseApp.NewUncachedContext(true, tmproto.Header{}) @@ -526,7 +522,7 @@ func NewSimApp( func (app *SimApp) Name() string { return app.BaseApp.Name() } // BeginBlocker application updates every begin block -func (app *SimApp) BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock) abci.ResponseBeginBlock { +func (app *SimApp) BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { return app.mm.BeginBlock(ctx, req) } @@ -648,10 +644,8 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon // Register new tx routes from grpc-gateway. authtx.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - authtx2.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register new tendermint queries routes from grpc-gateway. tmservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) - ocservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) // Register node gRPC service for grpc-gateway. nodeservice.RegisterGRPCGatewayRoutes(clientCtx, apiSvr.GRPCGatewayRouter) @@ -668,13 +662,11 @@ func (app *SimApp) RegisterAPIRoutes(apiSvr *api.Server, apiConfig config.APICon // RegisterTxService implements the Application.RegisterTxService method. func (app *SimApp) RegisterTxService(clientCtx client.Context) { authtx.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.BaseApp.Simulate, app.interfaceRegistry) - authtx2.RegisterTxService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) } // RegisterTendermintService implements the Application.RegisterTendermintService method. func (app *SimApp) RegisterTendermintService(clientCtx client.Context) { tmservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) - ocservice.RegisterTendermintService(app.BaseApp.GRPCQueryRouter(), clientCtx, app.interfaceRegistry) } func (app *SimApp) RegisterNodeService(clientCtx client.Context) { diff --git a/simapp/app_test.go b/simapp/app_test.go index b1e34532a2..14bfa53ece 100644 --- a/simapp/app_test.go +++ b/simapp/app_test.go @@ -8,11 +8,10 @@ import ( "github.com/golang/mock/gomock" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/tests/mocks" sdk "github.com/Finschia/finschia-sdk/types" @@ -41,7 +40,7 @@ import ( func TestSimAppExportAndBlockedAddrs(t *testing.T) { encCfg := MakeTestEncodingConfig() db := dbm.NewMemDB() - app := NewSimApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) + app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) for acc := range maccPerms { require.Equal(t, !allowedReceivingModAcc[acc], app.BankKeeper.BlockedAddr(app.AccountKeeper.GetModuleAddress(acc)), @@ -62,7 +61,7 @@ func TestSimAppExportAndBlockedAddrs(t *testing.T) { app.Commit() // Making a new app object with the db, so that initchain hasn't been called - app2 := NewSimApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) + app2 := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) _, err = app2.ExportAppStateAndValidators(false, []string{}) require.NoError(t, err, "ExportAppStateAndValidators should not have an error") } @@ -75,7 +74,7 @@ func TestGetMaccPerms(t *testing.T) { func TestRunMigrations(t *testing.T) { db := dbm.NewMemDB() encCfg := MakeTestEncodingConfig() - logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) // Create a new baseapp and configurator for the purpose of this test. @@ -201,7 +200,7 @@ func TestRunMigrations(t *testing.T) { func TestInitGenesisOnMigration(t *testing.T) { db := dbm.NewMemDB() encCfg := MakeTestEncodingConfig() - logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) app := NewSimApp(logger, db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) ctx := app.NewContext(true, tmproto.Header{Height: app.LastBlockHeight()}) @@ -247,7 +246,7 @@ func TestInitGenesisOnMigration(t *testing.T) { func TestUpgradeStateOnGenesis(t *testing.T) { encCfg := MakeTestEncodingConfig() db := dbm.NewMemDB() - app := NewSimApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) + app := NewSimApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, true, map[int64]bool{}, DefaultNodeHome, 0, encCfg, EmptyAppOptions{}) genesisState := NewDefaultGenesisState(encCfg.Marshaler) stateBytes, err := json.MarshalIndent(genesisState, "", " ") require.NoError(t, err) diff --git a/simapp/genesis_account_test.go b/simapp/genesis_account_test.go index a0897141e2..1100e49459 100644 --- a/simapp/genesis_account_test.go +++ b/simapp/genesis_account_test.go @@ -5,8 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" "github.com/Finschia/finschia-sdk/simapp" diff --git a/simapp/sim_test.go b/simapp/sim_test.go index a809a7c590..605041a85b 100644 --- a/simapp/sim_test.go +++ b/simapp/sim_test.go @@ -9,11 +9,10 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/simapp/helpers" "github.com/Finschia/finschia-sdk/store" diff --git a/simapp/simd/cmd/genaccounts_test.go b/simapp/simd/cmd/genaccounts_test.go index 0501939e3f..154a4e0abe 100644 --- a/simapp/simd/cmd/genaccounts_test.go +++ b/simapp/simd/cmd/genaccounts_test.go @@ -7,8 +7,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" diff --git a/simapp/simd/cmd/root.go b/simapp/simd/cmd/root.go index e93874afe5..ec26123320 100644 --- a/simapp/simd/cmd/root.go +++ b/simapp/simd/cmd/root.go @@ -9,11 +9,10 @@ import ( "github.com/spf13/cast" "github.com/spf13/cobra" "github.com/spf13/viper" + tmcli "github.com/tendermint/tendermint/libs/cli" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - ostcli "github.com/Finschia/ostracon/libs/cli" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/config" @@ -132,7 +131,7 @@ func initRootCmd(rootCmd *cobra.Command, encodingConfig params.EncodingConfig) { genutilcli.MigrateGenesisCmd(), genutilcli.ValidateGenesisCmd(simapp.ModuleBasics), AddGenesisAccountCmd(simapp.DefaultNodeHome), - ostcli.NewCompletionCmd(rootCmd, true), + tmcli.NewCompletionCmd(rootCmd, true), testnetCmd(simapp.ModuleBasics, banktypes.GenesisBalancesIterator{}), debug.Cmd(), config.Cmd(), @@ -260,7 +259,6 @@ func (a appCreator) newApp(logger log.Logger, db dbm.DB, traceStore io.Writer, a baseapp.SetSnapshotKeepRecent(cast.ToUint32(appOpts.Get(server.FlagStateSyncSnapshotKeepRecent))), baseapp.SetIAVLCacheSize(cast.ToInt(appOpts.Get(server.FlagIAVLCacheSize))), baseapp.SetIAVLDisableFastNode(cast.ToBool(appOpts.Get(server.FlagIAVLFastNode))), - baseapp.SetChanCheckTxSize(cast.ToUint(appOpts.Get(server.FlagChanCheckTxSize))), ) } diff --git a/simapp/simd/cmd/root_test.go b/simapp/simd/cmd/root_test.go index 9644c1051f..d45a66e6cb 100644 --- a/simapp/simd/cmd/root_test.go +++ b/simapp/simd/cmd/root_test.go @@ -7,11 +7,10 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" + tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - octypes "github.com/Finschia/ostracon/types" - "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/server" "github.com/Finschia/finschia-sdk/simapp" @@ -26,13 +25,13 @@ func TestNewApp(t *testing.T) { ctx := server.NewDefaultContext() ctx.Viper.Set(flags.FlagHome, tempDir) ctx.Viper.Set(server.FlagPruning, types.PruningOptionNothing) - app := a.newApp(log.NewOCLogger(log.NewSyncWriter(os.Stdout)), db, nil, ctx.Viper) + app := a.newApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil, ctx.Viper) require.NotNil(t, app) } func TestAppExport(t *testing.T) { encodingConfig := simapp.MakeTestEncodingConfig() - logger := log.NewOCLogger(log.NewSyncWriter(os.Stdout)) + logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)) a := appCreator{encodingConfig} db := dbm.NewMemDB() tempDir := t.TempDir() @@ -45,7 +44,7 @@ func TestAppExport(t *testing.T) { genesisState := simapp.NewDefaultGenesisState(encodingConfig.Marshaler) stateBytes, err := json.MarshalIndent(genesisState, "", " ") require.NoError(t, err) - genDoc := &octypes.GenesisDoc{} + genDoc := &tmtypes.GenesisDoc{} genDoc.ChainID = "theChainId" genDoc.Validators = nil genDoc.AppState = stateBytes diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index c70b73084e..3b4bc0cc2b 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -11,12 +11,11 @@ import ( "path/filepath" "github.com/spf13/cobra" - - ostconfig "github.com/Finschia/ostracon/config" - ostos "github.com/Finschia/ostracon/libs/os" - ostrand "github.com/Finschia/ostracon/libs/rand" - "github.com/Finschia/ostracon/types" - osttime "github.com/Finschia/ostracon/types/time" + tmconfig "github.com/tendermint/tendermint/config" + tmos "github.com/tendermint/tendermint/libs/os" + tmrand "github.com/tendermint/tendermint/libs/rand" + "github.com/tendermint/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -44,7 +43,7 @@ var ( flagStartingIPAddress = "starting-ip-address" ) -// get cmd to initialize all files for ostracon testnet and application +// get cmd to initialize all files for tendermint testnet and application func testnetCmd(mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator) *cobra.Command { cmd := &cobra.Command{ Use: "testnet", @@ -102,7 +101,7 @@ const nodeDirPerm = 0o755 func InitTestnet( clientCtx client.Context, cmd *cobra.Command, - nodeConfig *ostconfig.Config, + nodeConfig *tmconfig.Config, mbm module.BasicManager, genBalIterator banktypes.GenesisBalancesIterator, outputDir, @@ -116,7 +115,7 @@ func InitTestnet( numValidators int, ) error { if chainID == "" { - chainID = "chain-" + ostrand.NewRand().Str(6) + chainID = "chain-" + tmrand.NewRand().Str(6) } nodeIDs := make([]string, numValidators) @@ -316,12 +315,12 @@ func initGenFiles( } func collectGenFiles( - clientCtx client.Context, nodeConfig *ostconfig.Config, chainID string, + clientCtx client.Context, nodeConfig *tmconfig.Config, chainID string, nodeIDs []string, valPubKeys []cryptotypes.PubKey, numValidators int, outputDir, nodeDirPrefix, nodeDaemonHome string, genBalIterator banktypes.GenesisBalancesIterator, ) error { var appState json.RawMessage - genTime := osttime.Now() + genTime := tmtime.Now() for i := 0; i < numValidators; i++ { nodeDirName := fmt.Sprintf("%s%d", nodeDirPrefix, i) @@ -388,12 +387,12 @@ func writeFile(name, dir string, contents []byte) error { writePath := filepath.Join(dir) //nolint:gocritic file := filepath.Join(writePath, name) - err := ostos.EnsureDir(writePath, 0o755) + err := tmos.EnsureDir(writePath, 0o755) if err != nil { return err } - err = ostos.WriteFile(file, contents, 0o644) + err = tmos.WriteFile(file, contents, 0o644) if err != nil { return err } diff --git a/simapp/simd/cmd/testnet_test.go b/simapp/simd/cmd/testnet_test.go index ced64412ab..d3d76fde9c 100644 --- a/simapp/simd/cmd/testnet_test.go +++ b/simapp/simd/cmd/testnet_test.go @@ -7,8 +7,7 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" diff --git a/simapp/state.go b/simapp/state.go index d8a75aa737..3662c3bb95 100644 --- a/simapp/state.go +++ b/simapp/state.go @@ -8,8 +8,8 @@ import ( "os" "time" - ostjson "github.com/Finschia/ostracon/libs/json" - octypes "github.com/Finschia/ostracon/types" + tmjson "github.com/tendermint/tendermint/libs/json" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" @@ -182,15 +182,15 @@ func AppStateRandomizedFn( // AppStateFromGenesisFileFn util function to generate the genesis AppState // from a genesis.json file. -func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (octypes.GenesisDoc, []simtypes.Account) { +func AppStateFromGenesisFileFn(r io.Reader, cdc codec.JSONCodec, genesisFile string) (tmtypes.GenesisDoc, []simtypes.Account) { bytes, err := os.ReadFile(genesisFile) if err != nil { panic(err) } - var genesis octypes.GenesisDoc + var genesis tmtypes.GenesisDoc // NOTE: Tendermint uses a custom JSON decoder for GenesisDoc - err = ostjson.Unmarshal(bytes, &genesis) + err = tmjson.Unmarshal(bytes, &genesis) if err != nil { panic(err) } diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index 45182d17db..8c5e2f0e88 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -15,13 +15,11 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" + tmtypes "github.com/tendermint/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - octypes "github.com/Finschia/ostracon/types" - bam "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" @@ -49,7 +47,7 @@ var DefaultConsensusParams = &abci.ConsensusParams{ }, Validator: &tmproto.ValidatorParams{ PubKeyTypes: []string{ - octypes.ABCIPubKeyTypeEd25519, + tmtypes.ABCIPubKeyTypeEd25519, }, }, } @@ -98,7 +96,7 @@ func Setup(isCheckTx bool) *SimApp { // that also act as delegators. For simplicity, each validator is bonded with a delegation // of one consensus engine unit (10^6) in the default token of the simapp from first genesis // account. A Nop logger is set in SimApp. -// func SetupWithGenesisValSet(t *testing.T, valSet *octypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { +// func SetupWithGenesisValSet(t *testing.T, valSet *tmtypes.ValidatorSet, genAccs []authtypes.GenesisAccount, balances ...banktypes.Balance) *SimApp { // app, genesisState := setup(true, 5) // // set genesis accounts // authGenesis := authtypes.NewGenesisState(authtypes.DefaultParams(), genAccs) @@ -204,7 +202,7 @@ func SetupWithGenesisAccounts(genAccs []authtypes.GenesisAccount, balances ...ba ) app.Commit() - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) return app } @@ -411,7 +409,7 @@ func SignCheckDeliver( } // Simulate a sending a transaction and committing a block and recheck - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) gInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx) if expPass { @@ -425,9 +423,6 @@ func SignCheckDeliver( app.EndBlock(abci.RequestEndBlock{}) app.Commit() - app.BeginRecheckTx(ocabci.RequestBeginRecheckTx{Header: header}) - app.EndRecheckTx(ocabci.RequestEndRecheckTx{}) - return gInfo, res, err } @@ -451,7 +446,7 @@ func SignAndDeliver( require.NoError(t, err) // Simulate a sending a transaction and committing a block - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) gInfo, res, err := app.Deliver(txCfg.TxEncoder(), tx) if expPass { diff --git a/simapp/types.go b/simapp/types.go index d1d641f788..d072d5a236 100644 --- a/simapp/types.go +++ b/simapp/types.go @@ -3,8 +3,6 @@ package simapp import ( abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/server/types" sdk "github.com/Finschia/finschia-sdk/types" @@ -22,7 +20,7 @@ type App interface { LegacyAmino() *codec.LegacyAmino // Application updates every begin block. - BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock) abci.ResponseBeginBlock + BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // Application updates every end block. EndBlocker(ctx sdk.Context, req abci.RequestEndBlock) abci.ResponseEndBlock diff --git a/simapp/utils.go b/simapp/utils.go index 5d03f4b8a7..4560ce3595 100644 --- a/simapp/utils.go +++ b/simapp/utils.go @@ -5,10 +5,9 @@ import ( "fmt" "os" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/simapp/helpers" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/store/cachekv/store.go b/store/cachekv/store.go index dcfe546547..2a084edfc9 100644 --- a/store/cachekv/store.go +++ b/store/cachekv/store.go @@ -7,10 +7,9 @@ import ( "sync" "time" + "github.com/tendermint/tendermint/libs/math" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/math" - "github.com/Finschia/finschia-sdk/internal/conv" "github.com/Finschia/finschia-sdk/store/listenkv" "github.com/Finschia/finschia-sdk/store/tracekv" diff --git a/store/cachekv/store_test.go b/store/cachekv/store_test.go index 96c8951127..2d69ddc896 100644 --- a/store/cachekv/store_test.go +++ b/store/cachekv/store_test.go @@ -5,10 +5,9 @@ import ( "testing" "github.com/stretchr/testify/require" + tmrand "github.com/tendermint/tendermint/libs/rand" dbm "github.com/tendermint/tm-db" - ostrand "github.com/Finschia/ostracon/libs/rand" - "github.com/Finschia/finschia-sdk/store/cachekv" "github.com/Finschia/finschia-sdk/store/dbadapter" "github.com/Finschia/finschia-sdk/store/types" @@ -321,7 +320,7 @@ const ( ) func randInt(n int) int { - return ostrand.NewRand().Int() % n + return tmrand.NewRand().Int() % n } // useful for replaying a error case if we find one diff --git a/store/iavl/store.go b/store/iavl/store.go index 147591a8b9..2900588c9d 100644 --- a/store/iavl/store.go +++ b/store/iavl/store.go @@ -9,11 +9,10 @@ import ( ics23 "github.com/confio/ics23/go" "github.com/cosmos/iavl" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/cachekv" "github.com/Finschia/finschia-sdk/store/listenkv" "github.com/Finschia/finschia-sdk/store/tracekv" diff --git a/store/iavl/store_test.go b/store/iavl/store_test.go index 3393e00c0e..fcdcbc50da 100644 --- a/store/iavl/store_test.go +++ b/store/iavl/store_test.go @@ -8,10 +8,9 @@ import ( "github.com/cosmos/iavl" "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/cachekv" "github.com/Finschia/finschia-sdk/store/types" "github.com/Finschia/finschia-sdk/types/kv" diff --git a/store/internal/maps/maps.go b/store/internal/maps/maps.go index bef70d55fb..605a39b571 100644 --- a/store/internal/maps/maps.go +++ b/store/internal/maps/maps.go @@ -3,11 +3,10 @@ package maps import ( "encoding/binary" + "github.com/tendermint/tendermint/crypto/merkle" + "github.com/tendermint/tendermint/crypto/tmhash" tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" - "github.com/Finschia/ostracon/crypto/merkle" - "github.com/Finschia/ostracon/crypto/tmhash" - "github.com/Finschia/finschia-sdk/types/kv" ) diff --git a/store/internal/proofs/helpers.go b/store/internal/proofs/helpers.go index 24c0fe13fd..75910194bb 100644 --- a/store/internal/proofs/helpers.go +++ b/store/internal/proofs/helpers.go @@ -3,10 +3,9 @@ package proofs import ( "sort" + "github.com/tendermint/tendermint/libs/rand" tmcrypto "github.com/tendermint/tendermint/proto/tendermint/crypto" - "github.com/Finschia/ostracon/libs/rand" - sdkmaps "github.com/Finschia/finschia-sdk/store/internal/maps" ) diff --git a/store/rootmulti/proof.go b/store/rootmulti/proof.go index 5437a5df0b..4786a5d675 100644 --- a/store/rootmulti/proof.go +++ b/store/rootmulti/proof.go @@ -1,7 +1,7 @@ package rootmulti import ( - "github.com/Finschia/ostracon/crypto/merkle" + "github.com/tendermint/tendermint/crypto/merkle" storetypes "github.com/Finschia/finschia-sdk/store/types" ) diff --git a/store/rootmulti/proof_test.go b/store/rootmulti/proof_test.go index f44e6f706c..fee1dab64a 100644 --- a/store/rootmulti/proof_test.go +++ b/store/rootmulti/proof_test.go @@ -5,10 +5,9 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/iavl" "github.com/Finschia/finschia-sdk/store/types" ) diff --git a/store/rootmulti/rollback_test.go b/store/rootmulti/rollback_test.go index 4b1d4fb7a6..5156b61e9d 100644 --- a/store/rootmulti/rollback_test.go +++ b/store/rootmulti/rollback_test.go @@ -7,12 +7,10 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/simapp" ) @@ -60,7 +58,7 @@ func TestRollback(t *testing.T) { Height: ver0 + i, AppHash: app.LastCommitID().Hash, } - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) ctx := app.NewContext(false, header) store := ctx.KVStore(app.GetKey("bank")) store.Set([]byte("key"), []byte(fmt.Sprintf("value%d", i))) @@ -88,7 +86,7 @@ func TestRollback(t *testing.T) { Height: ver0 + i, AppHash: app.LastCommitID().Hash, } - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) ctx := app.NewContext(false, header) store := ctx.KVStore(app.GetKey("bank")) store.Set([]byte("key"), []byte(fmt.Sprintf("VALUE%d", i))) diff --git a/store/rootmulti/snapshot_test.go b/store/rootmulti/snapshot_test.go index 8f0df40681..14d0374fee 100644 --- a/store/rootmulti/snapshot_test.go +++ b/store/rootmulti/snapshot_test.go @@ -12,10 +12,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/snapshots" snapshottypes "github.com/Finschia/finschia-sdk/snapshots/types" "github.com/Finschia/finschia-sdk/store/iavl" diff --git a/store/rootmulti/store.go b/store/rootmulti/store.go index d87f5462df..7f8d20fa10 100644 --- a/store/rootmulti/store.go +++ b/store/rootmulti/store.go @@ -14,11 +14,10 @@ import ( gogotypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/proto/tendermint/crypto" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - snapshottypes "github.com/Finschia/finschia-sdk/snapshots/types" "github.com/Finschia/finschia-sdk/store/cachemulti" "github.com/Finschia/finschia-sdk/store/dbadapter" diff --git a/store/rootmulti/store_test.go b/store/rootmulti/store_test.go index c2711c8f31..da1c90842a 100644 --- a/store/rootmulti/store_test.go +++ b/store/rootmulti/store_test.go @@ -8,10 +8,9 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec" codecTypes "github.com/Finschia/finschia-sdk/codec/types" "github.com/Finschia/finschia-sdk/store/cachemulti" diff --git a/store/store.go b/store/store.go index 858e63509b..3d0255e25b 100644 --- a/store/store.go +++ b/store/store.go @@ -1,10 +1,9 @@ package store import ( + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/cache" "github.com/Finschia/finschia-sdk/store/rootmulti" "github.com/Finschia/finschia-sdk/store/types" diff --git a/store/streaming/file/service.go b/store/streaming/file/service.go index 4ef1affe0a..018edbac6d 100644 --- a/store/streaming/file/service.go +++ b/store/streaming/file/service.go @@ -10,8 +10,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/store/types" @@ -89,7 +87,7 @@ func (fss *StreamingService) Listeners() map[types.StoreKey][]types.WriteListene // ListenBeginBlock satisfies the baseapp.ABCIListener interface // It writes the received BeginBlock request and response and the resulting state changes // out to a file as described in the above the naming schema -func (fss *StreamingService) ListenBeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock, res abci.ResponseBeginBlock) error { +func (fss *StreamingService) ListenBeginBlock(ctx sdk.Context, req abci.RequestBeginBlock, res abci.ResponseBeginBlock) error { // generate the new file dstFile, err := fss.openBeginBlockFile(req) if err != nil { @@ -127,7 +125,7 @@ func (fss *StreamingService) ListenBeginBlock(ctx sdk.Context, req ocabci.Reques return dstFile.Close() } -func (fss *StreamingService) openBeginBlockFile(req ocabci.RequestBeginBlock) (*os.File, error) { +func (fss *StreamingService) openBeginBlockFile(req abci.RequestBeginBlock) (*os.File, error) { fss.currentBlockNumber = req.GetHeader().Height fss.currentTxIndex = 0 fileName := fmt.Sprintf("block-%d-begin", fss.currentBlockNumber) diff --git a/store/streaming/file/service_test.go b/store/streaming/file/service_test.go index 9414422007..fab2607c33 100644 --- a/store/streaming/file/service_test.go +++ b/store/streaming/file/service_test.go @@ -12,8 +12,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/codec" codecTypes "github.com/Finschia/finschia-sdk/codec/types" "github.com/Finschia/finschia-sdk/store/types" @@ -29,7 +27,7 @@ var ( // test abci message types mockHash = []byte{1, 2, 3, 4, 5, 6, 7, 8, 9} - testBeginBlockReq = ocabci.RequestBeginBlock{ + testBeginBlockReq = abci.RequestBeginBlock{ Header: tmproto.Header{ Height: 1, }, diff --git a/store/types/iterator_test.go b/store/types/iterator_test.go index 2ce1344006..9e3be06fe3 100644 --- a/store/types/iterator_test.go +++ b/store/types/iterator_test.go @@ -4,10 +4,9 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/iavl" "github.com/Finschia/finschia-sdk/store/types" ) diff --git a/store/types/proof.go b/store/types/proof.go index 10f3a787e7..f9cd10179f 100644 --- a/store/types/proof.go +++ b/store/types/proof.go @@ -2,10 +2,9 @@ package types import ( ics23 "github.com/confio/ics23/go" + "github.com/tendermint/tendermint/crypto/merkle" tmmerkle "github.com/tendermint/tendermint/proto/tendermint/crypto" - "github.com/Finschia/ostracon/crypto/merkle" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" ) diff --git a/store/types/store.go b/store/types/store.go index b61b74899f..9bd1cbe326 100644 --- a/store/types/store.go +++ b/store/types/store.go @@ -5,10 +5,9 @@ import ( "io" abci "github.com/tendermint/tendermint/abci/types" + tmstrings "github.com/tendermint/tendermint/libs/strings" dbm "github.com/tendermint/tm-db" - oststrings "github.com/Finschia/ostracon/libs/strings" - snapshottypes "github.com/Finschia/finschia-sdk/snapshots/types" "github.com/Finschia/finschia-sdk/types/kv" ) @@ -71,7 +70,7 @@ func (s *StoreUpgrades) IsAdded(key string) bool { if s == nil { return false } - return oststrings.StringInSlice(key, s.Added) + return tmstrings.StringInSlice(key, s.Added) } // IsDeleted returns true if the given key should be deleted diff --git a/store/types/utils_test.go b/store/types/utils_test.go index 2e0ff5e78c..563c46d79a 100644 --- a/store/types/utils_test.go +++ b/store/types/utils_test.go @@ -5,10 +5,9 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/rootmulti" "github.com/Finschia/finschia-sdk/store/types" ) diff --git a/tests/mocks/tendermint_tendermint_libs_log_DB.go b/tests/mocks/tendermint_tendermint_libs_log_DB.go index c486d56eed..929ab059b5 100644 --- a/tests/mocks/tendermint_tendermint_libs_log_DB.go +++ b/tests/mocks/tendermint_tendermint_libs_log_DB.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: github.com/Finschia/ostracon/libs/log (interfaces: Logger) +// Source: github.com/tendermint/tendermint/libs/log (interfaces: Logger) // Package mocks is a generated GoMock package. package mocks @@ -8,7 +8,7 @@ import ( reflect "reflect" gomock "github.com/golang/mock/gomock" - log "github.com/Finschia/ostracon/libs/log" + log "github.com/tendermint/tendermint/libs/log" ) // MockLogger is a mock of Logger interface. diff --git a/tests/mocks/types_module_module.go b/tests/mocks/types_module_module.go index cff731f73c..790b793f4f 100644 --- a/tests/mocks/types_module_module.go +++ b/tests/mocks/types_module_module.go @@ -15,7 +15,6 @@ import ( types "github.com/Finschia/finschia-sdk/codec/types" types0 "github.com/Finschia/finschia-sdk/types" module "github.com/Finschia/finschia-sdk/types/module" - ocabci "github.com/Finschia/ostracon/abci/types" cobra "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" ) @@ -330,7 +329,7 @@ func (m *MockAppModule) EXPECT() *MockAppModuleMockRecorder { } // BeginBlock mocks base method. -func (m *MockAppModule) BeginBlock(arg0 types0.Context, arg1 ocabci.RequestBeginBlock) { +func (m *MockAppModule) BeginBlock(arg0 types0.Context, arg1 abci.RequestBeginBlock) { m.ctrl.T.Helper() m.ctrl.Call(m, "BeginBlock", arg0, arg1) } diff --git a/testutil/context.go b/testutil/context.go index 03d61acac3..faa7e3d1a3 100644 --- a/testutil/context.go +++ b/testutil/context.go @@ -1,11 +1,10 @@ package testutil import ( + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store" sdk "github.com/Finschia/finschia-sdk/types" ) diff --git a/testutil/network/network.go b/testutil/network/network.go index ad1e771f5d..ef35d20924 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -15,15 +15,15 @@ import ( "time" "github.com/stretchr/testify/require" + tmcfg "github.com/tendermint/tendermint/config" + tmflags "github.com/tendermint/tendermint/libs/cli/flags" + "github.com/tendermint/tendermint/libs/log" + tmrand "github.com/tendermint/tendermint/libs/rand" + "github.com/tendermint/tendermint/node" + tmclient "github.com/tendermint/tendermint/rpc/client" dbm "github.com/tendermint/tm-db" "google.golang.org/grpc" - ostcfg "github.com/Finschia/ostracon/config" - "github.com/Finschia/ostracon/libs/log" - ostrand "github.com/Finschia/ostracon/libs/rand" - "github.com/Finschia/ostracon/node" - ostclient "github.com/Finschia/ostracon/rpc/client" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/tx" @@ -109,7 +109,7 @@ func DefaultConfig() Config { GenesisState: simapp.ModuleBasics.DefaultGenesis(encCfg.Marshaler), // 2 second confirm may make some tests to be failed with `tx already in mempool` TimeoutCommit: 1 * time.Second, - ChainID: "chain-" + ostrand.NewRand().Str(6), + ChainID: "chain-" + tmrand.NewRand().Str(6), NumValidators: 4, BondDenom: sdk.DefaultBondDenom, MinGasPrices: fmt.Sprintf("0.000006%s", sdk.DefaultBondDenom), @@ -158,7 +158,7 @@ type ( P2PAddress string Address sdk.AccAddress ValAddress sdk.ValAddress - RPCClient ostclient.Client + RPCClient tmclient.Client tmNode *node.Node api *api.Server @@ -210,7 +210,6 @@ func New(t *testing.T, cfg Config) *Network { ctx := server.NewDefaultContext() tmCfg := ctx.Config - tmCfg.PrivValidatorRemoteAddresses = append(tmCfg.PrivValidatorRemoteAddresses, "127.0.0.1") tmCfg.Consensus.TimeoutCommit = cfg.TimeoutCommit // Only allow the first validator to expose an RPC, API and gRPC @@ -245,8 +244,8 @@ func New(t *testing.T, cfg Config) *Network { logger := log.NewNopLogger() if cfg.EnableLogging { - logger = log.NewOCLogger(log.NewSyncWriter(os.Stdout)) - logger, _ = log.ParseLogLevel("info", logger, ostcfg.DefaultLogLevel) + logger = log.NewTMLogger(log.NewSyncWriter(os.Stdout)) + logger, _ = tmflags.ParseLogLevel("info", logger, tmcfg.DefaultLogLevel) } ctx.Logger = logger @@ -273,7 +272,6 @@ func New(t *testing.T, cfg Config) *Network { tmCfg.P2P.ListenAddress = p2pAddr tmCfg.P2P.AddrBookStrict = false tmCfg.P2P.AllowDuplicateIP = true - tmCfg.PrivValidatorRemoteAddresses = append(tmCfg.PrivValidatorRemoteAddresses, "127.0.0.1") nodeID, pubKey, err := genutil.InitializeNodeValidatorFiles(tmCfg) require.NoError(t, err) diff --git a/testutil/network/util.go b/testutil/network/util.go index 46ec2b7b2b..c599a59ec3 100644 --- a/testutil/network/util.go +++ b/testutil/network/util.go @@ -5,14 +5,14 @@ import ( "path/filepath" "time" - ostos "github.com/Finschia/ostracon/libs/os" - "github.com/Finschia/ostracon/node" - "github.com/Finschia/ostracon/p2p" - pvm "github.com/Finschia/ostracon/privval" - "github.com/Finschia/ostracon/proxy" - "github.com/Finschia/ostracon/rpc/client/local" - "github.com/Finschia/ostracon/types" - osttime "github.com/Finschia/ostracon/types/time" + tmos "github.com/tendermint/tendermint/libs/os" + "github.com/tendermint/tendermint/node" + "github.com/tendermint/tendermint/p2p" + pvm "github.com/tendermint/tendermint/privval" + "github.com/tendermint/tendermint/proxy" + "github.com/tendermint/tendermint/rpc/client/local" + "github.com/tendermint/tendermint/types" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/Finschia/finschia-sdk/server/api" servergrpc "github.com/Finschia/finschia-sdk/server/grpc" @@ -119,7 +119,7 @@ func startInProcess(cfg Config, val *Validator) error { } func collectGenFiles(cfg Config, vals []*Validator, outputDir string) error { - genTime := osttime.Now() + genTime := tmtime.Now() for i := 0; i < cfg.NumValidators; i++ { tmCfg := vals[i].Ctx.Config @@ -198,12 +198,12 @@ func writeFile(name, dir string, contents []byte) error { writePath := filepath.Join(dir) //nolint:gocritic file := filepath.Join(writePath, name) - err := ostos.EnsureDir(writePath, 0o755) + err := tmos.EnsureDir(writePath, 0o755) if err != nil { return err } - err = ostos.WriteFile(file, contents, 0o644) + err = tmos.WriteFile(file, contents, 0o644) if err != nil { return err } diff --git a/third_party/proto/buf.yaml b/third_party/proto/buf.yaml index cdc6b58c38..139c925596 100644 --- a/third_party/proto/buf.yaml +++ b/third_party/proto/buf.yaml @@ -15,7 +15,7 @@ lint: - PACKAGE_VERSION_SUFFIX - RPC_REQUEST_STANDARD_NAME ignore: - - ostracon + - tendermint - gogoproto - cosmos_proto - google @@ -24,7 +24,7 @@ breaking: use: - FILE ignore: - - ostracon + - tendermint - gogoproto - cosmos_proto - google diff --git a/third_party/proto/ostracon/abci/types.proto b/third_party/proto/ostracon/abci/types.proto deleted file mode 100644 index 158fb4b6b8..0000000000 --- a/third_party/proto/ostracon/abci/types.proto +++ /dev/null @@ -1,133 +0,0 @@ -syntax = "proto3"; -package ostracon.abci; - -option go_package = "github.com/Finschia/ostracon/abci/types"; - -// For more information on gogo.proto, see: -// https://github.com/gogo/protobuf/blob/master/extensions.md -import "tendermint/abci/types.proto"; -import "tendermint/types/types.proto"; -import "ostracon/types/types.proto"; -import "gogoproto/gogo.proto"; - -// This file is copied from http://github.com/tendermint/abci -// NOTE: When using custom types, mind the warnings. -// https://github.com/gogo/protobuf/blob/master/custom_types.md#warnings-and-issues - -//---------------------------------------- -// Request types - -message Request { - oneof value { - tendermint.abci.RequestEcho echo = 1; - tendermint.abci.RequestFlush flush = 2; - tendermint.abci.RequestInfo info = 3; - tendermint.abci.RequestSetOption set_option = 4; - tendermint.abci.RequestInitChain init_chain = 5; - tendermint.abci.RequestQuery query = 6; - RequestBeginBlock begin_block = 7; - tendermint.abci.RequestCheckTx check_tx = 8; - tendermint.abci.RequestDeliverTx deliver_tx = 9; - tendermint.abci.RequestEndBlock end_block = 10; - tendermint.abci.RequestCommit commit = 11; - tendermint.abci.RequestListSnapshots list_snapshots = 12; - tendermint.abci.RequestOfferSnapshot offer_snapshot = 13; - tendermint.abci.RequestLoadSnapshotChunk load_snapshot_chunk = 14; - tendermint.abci.RequestApplySnapshotChunk apply_snapshot_chunk = 15; - RequestBeginRecheckTx begin_recheck_tx = 1000; // 16~99 are reserved for merging original tendermint - RequestEndRecheckTx end_recheck_tx = 1001; - } -} - -message RequestBeginBlock { - bytes hash = 1; - tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; - tendermint.abci.LastCommitInfo last_commit_info = 3 [(gogoproto.nullable) = false]; - repeated tendermint.abci.Evidence byzantine_validators = 4 [(gogoproto.nullable) = false]; - - // *** Ostracon Extended Fields *** - ostracon.types.Entropy entropy = 1000 [(gogoproto.nullable) = false]; -} - -message RequestBeginRecheckTx { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; -} - -message RequestEndRecheckTx { - int64 height = 1; -} - -//---------------------------------------- -// Response types - -message Response { - oneof value { - tendermint.abci.ResponseException exception = 1; - tendermint.abci.ResponseEcho echo = 2; - tendermint.abci.ResponseFlush flush = 3; - tendermint.abci.ResponseInfo info = 4; - tendermint.abci.ResponseSetOption set_option = 5; - tendermint.abci.ResponseInitChain init_chain = 6; - tendermint.abci.ResponseQuery query = 7; - tendermint.abci.ResponseBeginBlock begin_block = 8; - ResponseCheckTx check_tx = 9; - tendermint.abci.ResponseDeliverTx deliver_tx = 10; - tendermint.abci.ResponseEndBlock end_block = 11; - tendermint.abci.ResponseCommit commit = 12; - tendermint.abci.ResponseListSnapshots list_snapshots = 13; - tendermint.abci.ResponseOfferSnapshot offer_snapshot = 14; - tendermint.abci.ResponseLoadSnapshotChunk load_snapshot_chunk = 15; - tendermint.abci.ResponseApplySnapshotChunk apply_snapshot_chunk = 16; - ResponseBeginRecheckTx begin_recheck_tx = 1000; // 17~99 are reserved for merging original tendermint - ResponseEndRecheckTx end_recheck_tx = 1001; - } -} - -message ResponseCheckTx { - uint32 code = 1; - bytes data = 2; - string log = 3; // nondeterministic - string info = 4; // nondeterministic - int64 gas_wanted = 5 [json_name = "gas_wanted"]; - int64 gas_used = 6 [json_name = "gas_used"]; - repeated tendermint.abci.Event events = 7 - [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; - string codespace = 8; - string sender = 9; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first - int64 priority = 10; // MEMO: not used, just reservation to implement https://github.com/tendermint/tendermint/pull/6740 first - - // mempool_error is set by Ostracon. - // ABCI applictions creating a ResponseCheckTX should not set mempool_error. - string mempool_error = 11; -} - -message ResponseBeginRecheckTx { - uint32 code = 1; -} - -message ResponseEndRecheckTx { - uint32 code = 1; -} - -//---------------------------------------- -// Service Definition - -service ABCIApplication { - rpc Echo(tendermint.abci.RequestEcho) returns (tendermint.abci.ResponseEcho); - rpc Flush(tendermint.abci.RequestFlush) returns (tendermint.abci.ResponseFlush); - rpc Info(tendermint.abci.RequestInfo) returns (tendermint.abci.ResponseInfo); - rpc SetOption(tendermint.abci.RequestSetOption) returns (tendermint.abci.ResponseSetOption); - rpc DeliverTx(tendermint.abci.RequestDeliverTx) returns (tendermint.abci.ResponseDeliverTx); - rpc CheckTx(tendermint.abci.RequestCheckTx) returns (ResponseCheckTx); - rpc Query(tendermint.abci.RequestQuery) returns (tendermint.abci.ResponseQuery); - rpc Commit(tendermint.abci.RequestCommit) returns (tendermint.abci.ResponseCommit); - rpc InitChain(tendermint.abci.RequestInitChain) returns (tendermint.abci.ResponseInitChain); - rpc BeginBlock(RequestBeginBlock) returns (tendermint.abci.ResponseBeginBlock); - rpc EndBlock(tendermint.abci.RequestEndBlock) returns (tendermint.abci.ResponseEndBlock); - rpc ListSnapshots(tendermint.abci.RequestListSnapshots) returns (tendermint.abci.ResponseListSnapshots); - rpc OfferSnapshot(tendermint.abci.RequestOfferSnapshot) returns (tendermint.abci.ResponseOfferSnapshot); - rpc LoadSnapshotChunk(tendermint.abci.RequestLoadSnapshotChunk) returns (tendermint.abci.ResponseLoadSnapshotChunk); - rpc ApplySnapshotChunk(tendermint.abci.RequestApplySnapshotChunk) returns (tendermint.abci.ResponseApplySnapshotChunk); - rpc BeginRecheckTx(RequestBeginRecheckTx) returns (ResponseBeginRecheckTx); - rpc EndRecheckTx(RequestEndRecheckTx) returns (ResponseEndRecheckTx); -} diff --git a/third_party/proto/ostracon/blockchain/types.proto b/third_party/proto/ostracon/blockchain/types.proto deleted file mode 100644 index 4333ef18ea..0000000000 --- a/third_party/proto/ostracon/blockchain/types.proto +++ /dev/null @@ -1,22 +0,0 @@ -syntax = "proto3"; -package ostracon.blockchain; - -option go_package = "github.com/Finschia/ostracon/proto/ostracon/blockchain"; - -import "ostracon/types/block.proto"; -import "tendermint/blockchain/types.proto"; - -// BlockResponse returns block to the requested -message BlockResponse { - ostracon.types.Block block = 1; -} - -message Message { - oneof sum { - tendermint.blockchain.BlockRequest block_request = 1; - tendermint.blockchain.NoBlockResponse no_block_response = 2; - BlockResponse block_response = 3; - tendermint.blockchain.StatusRequest status_request = 4; - tendermint.blockchain.StatusResponse status_response = 5; - } -} diff --git a/third_party/proto/ostracon/privval/types.proto b/third_party/proto/ostracon/privval/types.proto deleted file mode 100644 index 45a5aa74bc..0000000000 --- a/third_party/proto/ostracon/privval/types.proto +++ /dev/null @@ -1,32 +0,0 @@ -syntax = "proto3"; -package ostracon.privval; - -import "tendermint/privval/types.proto"; - -option go_package = "github.com/Finschia/ostracon/proto/ostracon/privval"; - -// VRFProofRequest is a PrivValidatorSocket message containing a message to generate proof. -message VRFProofRequest { - bytes message = 1; -} - -// VRFProofResponse is a PrivValidatorSocket message containing a Proof. -message VRFProofResponse { - bytes proof = 1; - tendermint.privval.RemoteSignerError error = 2; -} - -message Message { - oneof sum { - tendermint.privval.PubKeyRequest pub_key_request = 1; - tendermint.privval.PubKeyResponse pub_key_response = 2; - tendermint.privval.SignVoteRequest sign_vote_request = 3; - tendermint.privval.SignedVoteResponse signed_vote_response = 4; - tendermint.privval.SignProposalRequest sign_proposal_request = 5; - tendermint.privval.SignedProposalResponse signed_proposal_response = 6; - tendermint.privval.PingRequest ping_request = 7; - tendermint.privval.PingResponse ping_response = 8; - VRFProofRequest vrf_proof_request = 1000; - VRFProofResponse vrf_proof_response = 1001; - } -} diff --git a/third_party/proto/ostracon/rpc/grpc/types.proto b/third_party/proto/ostracon/rpc/grpc/types.proto deleted file mode 100644 index 057f2fd038..0000000000 --- a/third_party/proto/ostracon/rpc/grpc/types.proto +++ /dev/null @@ -1,33 +0,0 @@ -syntax = "proto3"; -package ostracon.rpc.grpc; -option go_package = "github.com/Finschia/ostracon/rpc/grpc;coregrpc"; - -import "ostracon/abci/types.proto"; -import "tendermint/abci/types.proto"; - -//---------------------------------------- -// Request types - -message RequestPing {} - -message RequestBroadcastTx { - bytes tx = 1; -} - -//---------------------------------------- -// Response types - -message ResponsePing {} - -message ResponseBroadcastTx { - ostracon.abci.ResponseCheckTx check_tx = 1; - tendermint.abci.ResponseDeliverTx deliver_tx = 2; -} - -//---------------------------------------- -// Service Definition - -service BroadcastAPI { - rpc Ping(RequestPing) returns (ResponsePing); - rpc BroadcastTx(RequestBroadcastTx) returns (ResponseBroadcastTx); -} diff --git a/third_party/proto/ostracon/state/types.proto b/third_party/proto/ostracon/state/types.proto deleted file mode 100644 index 1071e8948f..0000000000 --- a/third_party/proto/ostracon/state/types.proto +++ /dev/null @@ -1,53 +0,0 @@ -syntax = "proto3"; -package ostracon.state; - -option go_package = "github.com/Finschia/ostracon/proto/ostracon/state"; - -import "gogoproto/gogo.proto"; -import "tendermint/types/validator.proto"; -import "tendermint/types/params.proto"; -import "tendermint/types/types.proto"; -import "google/protobuf/timestamp.proto"; -import "tendermint/state/types.proto"; - -message State { - tendermint.state.Version version = 1 [(gogoproto.nullable) = false]; - - // immutable - string chain_id = 2 [(gogoproto.customname) = "ChainID"]; - int64 initial_height = 14; - - // LastBlockHeight=0 at genesis (ie. block(H=0) does not exist) - int64 last_block_height = 3; - tendermint.types.BlockID last_block_id = 4 - [(gogoproto.nullable) = false, (gogoproto.customname) = "LastBlockID"]; - google.protobuf.Timestamp last_block_time = 5 - [(gogoproto.nullable) = false, (gogoproto.stdtime) = true]; - - // LastValidators is used to validate block.LastCommit. - // Validators are persisted to the database separately every time they change, - // so we can query for historical validator sets. - // Note that if s.LastBlockHeight causes a valset change, - // we set s.LastHeightValidatorsChanged = s.LastBlockHeight + 1 + 1 - // Extra +1 due to nextValSet delay. - tendermint.types.ValidatorSet next_validators = 6; - tendermint.types.ValidatorSet validators = 7; - tendermint.types.ValidatorSet last_validators = 8; - int64 last_height_validators_changed = 9; - - // Consensus parameters used for validating blocks. - // Changes returned by EndBlock and updated after Commit. - tendermint.types.ConsensusParams consensus_params = 10 [(gogoproto.nullable) = false]; - int64 last_height_consensus_params_changed = 11; - - // Merkle root of the results from executing prev block - bytes last_results_hash = 12; - - // the latest AppHash we've received from calling abci.Commit() - bytes app_hash = 13; - - // *** Ostracon Extended Fields *** - - // the VRF Proof value generated by the last Proposer - bytes last_proof_hash = 1000; -} diff --git a/third_party/proto/ostracon/types/block.proto b/third_party/proto/ostracon/types/block.proto deleted file mode 100644 index 80349365d9..0000000000 --- a/third_party/proto/ostracon/types/block.proto +++ /dev/null @@ -1,19 +0,0 @@ -syntax = "proto3"; -package ostracon.types; - -option go_package = "github.com/Finschia/ostracon/proto/ostracon/types"; - -import "gogoproto/gogo.proto"; -import "ostracon/types/types.proto"; -import "tendermint/types/evidence.proto"; -import "tendermint/types/types.proto"; - -message Block { - tendermint.types.Header header = 1 [(gogoproto.nullable) = false]; - tendermint.types.Data data = 2 [(gogoproto.nullable) = false]; - tendermint.types.EvidenceList evidence = 3 [(gogoproto.nullable) = false]; - tendermint.types.Commit last_commit = 4; - - // *** Ostracon Extended Fields *** - ostracon.types.Entropy entropy = 1000 [(gogoproto.nullable) = false]; -} diff --git a/third_party/proto/ostracon/types/types.proto b/third_party/proto/ostracon/types/types.proto deleted file mode 100644 index e95620de2c..0000000000 --- a/third_party/proto/ostracon/types/types.proto +++ /dev/null @@ -1,14 +0,0 @@ -syntax = "proto3"; -package ostracon.types; - -option go_package = "github.com/Finschia/ostracon/proto/ostracon/types"; - -// -------------------------------- - -// Entropy represents height-specific complexity and used in proposer-election. -// Entropy contains vrf proof and generated round. The relationship of each field is as follows. -// Entropy.proof = VRFProof(last_proof_hash, current_height, Entropy.round) -message Entropy { - int32 round = 1; - bytes proof = 2; -} diff --git a/types/abci.go b/types/abci.go index 6cd54a411e..d803e5e274 100644 --- a/types/abci.go +++ b/types/abci.go @@ -2,8 +2,6 @@ package types import ( abci "github.com/tendermint/tendermint/abci/types" - - ocabci "github.com/Finschia/ostracon/abci/types" ) // InitChainer initializes application state at genesis @@ -13,7 +11,7 @@ type InitChainer func(ctx Context, req abci.RequestInitChain) abci.ResponseInitC // // Note: applications which set create_empty_blocks=false will not have regular block timing and should use // e.g. BFT timestamps rather than block height for any periodic BeginBlock logic -type BeginBlocker func(ctx Context, req ocabci.RequestBeginBlock) abci.ResponseBeginBlock +type BeginBlocker func(ctx Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock // EndBlocker runs code after the transactions in a block and return updates to the validator set // diff --git a/types/context.go b/types/context.go index 2db74ffa03..c53b6fc175 100644 --- a/types/context.go +++ b/types/context.go @@ -6,11 +6,10 @@ import ( "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" + tmbytes "github.com/tendermint/tendermint/libs/bytes" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocbytes "github.com/Finschia/ostracon/libs/bytes" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/gaskv" stypes "github.com/Finschia/finschia-sdk/store/types" ) @@ -27,7 +26,7 @@ type Context struct { ctx context.Context ms MultiStore header tmproto.Header - headerHash ocbytes.HexBytes + headerHash tmbytes.HexBytes chainID string txBytes []byte logger log.Logger @@ -67,7 +66,7 @@ func (c Context) BlockHeader() tmproto.Header { } // HeaderHash returns a copy of the header hash obtained during abci.RequestBeginBlock -func (c Context) HeaderHash() ocbytes.HexBytes { +func (c Context) HeaderHash() tmbytes.HexBytes { hash := make([]byte, len(c.headerHash)) copy(hash, c.headerHash) return hash diff --git a/types/errors/abci.go b/types/errors/abci.go index bcfb37977c..352adfe15f 100644 --- a/types/errors/abci.go +++ b/types/errors/abci.go @@ -5,8 +5,6 @@ import ( "reflect" abci "github.com/tendermint/tendermint/abci/types" - - ocabci "github.com/Finschia/ostracon/abci/types" ) const ( @@ -43,9 +41,9 @@ func ABCIInfo(err error, debug bool) (codespace string, code uint32, log string) // ResponseCheckTx returns an ABCI ResponseCheckTx object with fields filled in // from the given error and gas values. -func ResponseCheckTx(err error, gw, gu uint64, debug bool) ocabci.ResponseCheckTx { +func ResponseCheckTx(err error, gw, gu uint64, debug bool) abci.ResponseCheckTx { space, code, log := ABCIInfo(err, debug) - return ocabci.ResponseCheckTx{ + return abci.ResponseCheckTx{ Codespace: space, Code: code, Log: log, @@ -56,9 +54,9 @@ func ResponseCheckTx(err error, gw, gu uint64, debug bool) ocabci.ResponseCheckT // ResponseCheckTxWithEvents returns an ABCI ResponseCheckTx object with fields filled in // from the given error, gas values and events. -func ResponseCheckTxWithEvents(err error, gw, gu uint64, events []abci.Event, debug bool) ocabci.ResponseCheckTx { +func ResponseCheckTxWithEvents(err error, gw, gu uint64, events []abci.Event, debug bool) abci.ResponseCheckTx { space, code, log := ABCIInfo(err, debug) - return ocabci.ResponseCheckTx{ + return abci.ResponseCheckTx{ Codespace: space, Code: code, Log: log, diff --git a/types/module/module.go b/types/module/module.go index 653e15b614..2a3367fbc9 100644 --- a/types/module/module.go +++ b/types/module/module.go @@ -37,8 +37,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -176,7 +174,7 @@ type AppModule interface { // BeginBlockAppModule is an extension interface that contains information about the AppModule and BeginBlock. type BeginBlockAppModule interface { AppModule - BeginBlock(sdk.Context, ocabci.RequestBeginBlock) + BeginBlock(sdk.Context, abci.RequestBeginBlock) } // EndBlockAppModule is an extension interface that contains information about the AppModule and EndBlock. @@ -216,7 +214,7 @@ func (gam GenesisOnlyAppModule) RegisterServices(Configurator) {} func (gam GenesisOnlyAppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns an empty module begin-block -func (gam GenesisOnlyAppModule) BeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock) {} +func (gam GenesisOnlyAppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) {} // EndBlock returns an empty module end-block func (GenesisOnlyAppModule) EndBlock(_ sdk.Context, _ abci.RequestEndBlock) []abci.ValidatorUpdate { @@ -475,7 +473,7 @@ func (m Manager) RunMigrations(ctx sdk.Context, cfg Configurator, fromVM Version // BeginBlock performs begin block functionality for all modules. It creates a // child context with an event manager to aggregate events emitted from all // modules. -func (m *Manager) BeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock) abci.ResponseBeginBlock { +func (m *Manager) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) abci.ResponseBeginBlock { ctx = ctx.WithEventManager(sdk.NewEventManager()) for _, moduleName := range m.OrderBeginBlockers { diff --git a/types/module/module_test.go b/types/module/module_test.go index c058daaa23..fdc4be55e6 100644 --- a/types/module/module_test.go +++ b/types/module/module_test.go @@ -10,8 +10,6 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/codec/types" "github.com/Finschia/finschia-sdk/tests/mocks" @@ -247,7 +245,7 @@ func TestManager_BeginBlock(t *testing.T) { require.NotNil(t, mm) require.Equal(t, 2, len(mm.Modules)) - req := ocabci.RequestBeginBlock{Hash: []byte("test")} + req := abci.RequestBeginBlock{Hash: []byte("test")} mockAppModule1.EXPECT().BeginBlock(gomock.Any(), gomock.Eq(req)).Times(1) mockAppModule2.EXPECT().BeginBlock(gomock.Any(), gomock.Eq(req)).Times(1) diff --git a/types/result.go b/types/result.go index 1b9a5bb0cd..df747e0185 100644 --- a/types/result.go +++ b/types/result.go @@ -8,8 +8,7 @@ import ( "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" - - ctypes "github.com/Finschia/ostracon/rpc/core/types" + ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -59,7 +58,7 @@ func (logs ABCIMessageLogs) String() string { return "" } -// NewResponseResultTx returns a TxResponse given a ResultTx from ostracon +// NewResponseResultTx returns a TxResponse given a ResultTx from tendermint func NewResponseResultTx(res *ctypes.ResultTx, anyTx *codectypes.Any, timestamp string) *TxResponse { if res == nil { return nil @@ -85,7 +84,7 @@ func NewResponseResultTx(res *ctypes.ResultTx, anyTx *codectypes.Any, timestamp } // NewResponseFormatBroadcastTxCommit returns a TxResponse given a -// ResultBroadcastTxCommit from ostracon. +// ResultBroadcastTxCommit from tendermint. func NewResponseFormatBroadcastTxCommit(res *ctypes.ResultBroadcastTxCommit) *TxResponse { if res == nil { return nil @@ -152,7 +151,7 @@ func newTxResponseDeliverTx(res *ctypes.ResultBroadcastTxCommit) *TxResponse { } } -// NewResponseFormatBroadcastTx returns a TxResponse given a ResultBroadcastTx from ostracon +// NewResponseFormatBroadcastTx returns a TxResponse given a ResultBroadcastTx from tendermint func NewResponseFormatBroadcastTx(res *ctypes.ResultBroadcastTx) *TxResponse { if res == nil { return nil diff --git a/types/result_test.go b/types/result_test.go index fcd3872a21..a4c29c08e8 100644 --- a/types/result_test.go +++ b/types/result_test.go @@ -10,10 +10,8 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" - - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/bytes" - ctypes "github.com/Finschia/ostracon/rpc/core/types" + "github.com/tendermint/tendermint/libs/bytes" + ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/testutil/testdata" @@ -213,7 +211,7 @@ func (s *resultTestSuite) TestResponseFormatBroadcastTxCommit() { checkTxResult := &ctypes.ResultBroadcastTxCommit{ Height: 10, Hash: bytes.HexBytes([]byte("test")), - CheckTx: ocabci.ResponseCheckTx{ + CheckTx: abci.ResponseCheckTx{ Code: 90, Data: nil, Log: `[]`, diff --git a/types/store_test.go b/types/store_test.go index 90ed92030d..e5d494a8a2 100644 --- a/types/store_test.go +++ b/types/store_test.go @@ -4,10 +4,9 @@ import ( "testing" "github.com/stretchr/testify/suite" + "github.com/tendermint/tendermint/libs/log" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/store/rootmulti" "github.com/Finschia/finschia-sdk/store/types" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index 49892dc8e5..7a0406e4ae 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -805,10 +805,6 @@ type ServiceClient interface { // GetBlockWithTxs fetches a block with decoded txs. // // Since: cosmos-sdk 0.45.2 - // WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type - // to tendermint block type without `entropy` is returned. - // Therefore, verification fails with the tendermint block validation method. - // For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`. GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) } @@ -878,10 +874,6 @@ type ServiceServer interface { // GetBlockWithTxs fetches a block with decoded txs. // // Since: cosmos-sdk 0.45.2 - // WARNING: In `GetBlockWithTxs` for compatibility with cosmos-sdk API, the result converted from Ostracon block type - // to tendermint block type without `entropy` is returned. - // Therefore, verification fails with the tendermint block validation method. - // For original information, please check `GetBlockWithTxs` in `lbm/tx/v1beta1/service.proto`. GetBlockWithTxs(context.Context, *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) } diff --git a/types/tx2/service.pb.go b/types/tx2/service.pb.go deleted file mode 100644 index 6d1841168d..0000000000 --- a/types/tx2/service.pb.go +++ /dev/null @@ -1,854 +0,0 @@ -// Code generated by protoc-gen-gogo. DO NOT EDIT. -// source: lbm/tx/v1beta1/service.proto - -package tx2 - -import ( - context "context" - fmt "fmt" - query "github.com/Finschia/finschia-sdk/types/query" - tx "github.com/Finschia/finschia-sdk/types/tx" - types1 "github.com/Finschia/ostracon/proto/ostracon/types" - _ "github.com/gogo/protobuf/gogoproto" - grpc1 "github.com/gogo/protobuf/grpc" - proto "github.com/gogo/protobuf/proto" - golang_proto "github.com/golang/protobuf/proto" - types "github.com/tendermint/tendermint/proto/tendermint/types" - _ "google.golang.org/genproto/googleapis/api/annotations" - grpc "google.golang.org/grpc" - codes "google.golang.org/grpc/codes" - status "google.golang.org/grpc/status" - io "io" - math "math" - math_bits "math/bits" -) - -// Reference imports to suppress errors if they are not otherwise used. -var _ = proto.Marshal -var _ = golang_proto.Marshal -var _ = fmt.Errorf -var _ = math.Inf - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the proto package it is being compiled against. -// A compilation error at this line likely means your copy of the -// proto package needs to be updated. -const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package - -// GetBlockWithTxsRequest is the request type for the Service.GetBlockWithTxs -// RPC method. -// -// Since: finschia-sdk 0.47.0 -type GetBlockWithTxsRequest struct { - // height is the height of the block to query. - Height int64 `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"` - // pagination defines a pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *GetBlockWithTxsRequest) Reset() { *m = GetBlockWithTxsRequest{} } -func (m *GetBlockWithTxsRequest) String() string { return proto.CompactTextString(m) } -func (*GetBlockWithTxsRequest) ProtoMessage() {} -func (*GetBlockWithTxsRequest) Descriptor() ([]byte, []int) { - return fileDescriptor_6fc6bd78191bf1b3, []int{0} -} -func (m *GetBlockWithTxsRequest) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockWithTxsRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockWithTxsRequest.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockWithTxsRequest) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockWithTxsRequest.Merge(m, src) -} -func (m *GetBlockWithTxsRequest) XXX_Size() int { - return m.Size() -} -func (m *GetBlockWithTxsRequest) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockWithTxsRequest.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockWithTxsRequest proto.InternalMessageInfo - -func (m *GetBlockWithTxsRequest) GetHeight() int64 { - if m != nil { - return m.Height - } - return 0 -} - -func (m *GetBlockWithTxsRequest) GetPagination() *query.PageRequest { - if m != nil { - return m.Pagination - } - return nil -} - -// GetBlockWithTxsResponse is the response type for the Service.GetBlockWithTxs method. -// -// Since: finschia-sdk 0.47.0 -type GetBlockWithTxsResponse struct { - // txs are the transactions in the block. - Txs []*tx.Tx `protobuf:"bytes,1,rep,name=txs,proto3" json:"txs,omitempty"` - BlockId *types.BlockID `protobuf:"bytes,2,opt,name=block_id,json=blockId,proto3" json:"block_id,omitempty"` - Block *types1.Block `protobuf:"bytes,3,opt,name=block,proto3" json:"block,omitempty"` - // pagination defines a pagination for the response. - Pagination *query.PageResponse `protobuf:"bytes,4,opt,name=pagination,proto3" json:"pagination,omitempty"` -} - -func (m *GetBlockWithTxsResponse) Reset() { *m = GetBlockWithTxsResponse{} } -func (m *GetBlockWithTxsResponse) String() string { return proto.CompactTextString(m) } -func (*GetBlockWithTxsResponse) ProtoMessage() {} -func (*GetBlockWithTxsResponse) Descriptor() ([]byte, []int) { - return fileDescriptor_6fc6bd78191bf1b3, []int{1} -} -func (m *GetBlockWithTxsResponse) XXX_Unmarshal(b []byte) error { - return m.Unmarshal(b) -} -func (m *GetBlockWithTxsResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { - if deterministic { - return xxx_messageInfo_GetBlockWithTxsResponse.Marshal(b, m, deterministic) - } else { - b = b[:cap(b)] - n, err := m.MarshalToSizedBuffer(b) - if err != nil { - return nil, err - } - return b[:n], nil - } -} -func (m *GetBlockWithTxsResponse) XXX_Merge(src proto.Message) { - xxx_messageInfo_GetBlockWithTxsResponse.Merge(m, src) -} -func (m *GetBlockWithTxsResponse) XXX_Size() int { - return m.Size() -} -func (m *GetBlockWithTxsResponse) XXX_DiscardUnknown() { - xxx_messageInfo_GetBlockWithTxsResponse.DiscardUnknown(m) -} - -var xxx_messageInfo_GetBlockWithTxsResponse proto.InternalMessageInfo - -func (m *GetBlockWithTxsResponse) GetTxs() []*tx.Tx { - if m != nil { - return m.Txs - } - return nil -} - -func (m *GetBlockWithTxsResponse) GetBlockId() *types.BlockID { - if m != nil { - return m.BlockId - } - return nil -} - -func (m *GetBlockWithTxsResponse) GetBlock() *types1.Block { - if m != nil { - return m.Block - } - return nil -} - -func (m *GetBlockWithTxsResponse) GetPagination() *query.PageResponse { - if m != nil { - return m.Pagination - } - return nil -} - -func init() { - proto.RegisterType((*GetBlockWithTxsRequest)(nil), "lbm.tx.v1beta1.GetBlockWithTxsRequest") - golang_proto.RegisterType((*GetBlockWithTxsRequest)(nil), "lbm.tx.v1beta1.GetBlockWithTxsRequest") - proto.RegisterType((*GetBlockWithTxsResponse)(nil), "lbm.tx.v1beta1.GetBlockWithTxsResponse") - golang_proto.RegisterType((*GetBlockWithTxsResponse)(nil), "lbm.tx.v1beta1.GetBlockWithTxsResponse") -} - -func init() { proto.RegisterFile("lbm/tx/v1beta1/service.proto", fileDescriptor_6fc6bd78191bf1b3) } -func init() { - golang_proto.RegisterFile("lbm/tx/v1beta1/service.proto", fileDescriptor_6fc6bd78191bf1b3) -} - -var fileDescriptor_6fc6bd78191bf1b3 = []byte{ - // 470 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x52, 0x41, 0x6b, 0x13, 0x41, - 0x14, 0xce, 0x34, 0xda, 0xca, 0x14, 0x14, 0x06, 0x5b, 0x63, 0x08, 0x4b, 0x08, 0xd2, 0x84, 0x88, - 0x33, 0x34, 0xfa, 0x0b, 0x8a, 0xb4, 0xf6, 0x26, 0x6b, 0x41, 0xf0, 0x22, 0xb3, 0x9b, 0x71, 0x77, - 0x68, 0x76, 0x66, 0xbb, 0xf3, 0x52, 0xa6, 0x88, 0x17, 0x7f, 0x80, 0x08, 0xde, 0xfc, 0x35, 0x1e, - 0x3d, 0x16, 0xbc, 0x78, 0x94, 0xc4, 0xb3, 0xbf, 0x41, 0x32, 0x33, 0x6b, 0xd2, 0xd6, 0xd2, 0x4b, - 0x78, 0xd9, 0xef, 0x7b, 0xdf, 0x9b, 0xef, 0xbd, 0x0f, 0x77, 0x26, 0x49, 0xc1, 0xc0, 0xb2, 0xd3, - 0xdd, 0x44, 0x00, 0xdf, 0x65, 0x46, 0x54, 0xa7, 0x32, 0x15, 0xb4, 0xac, 0x34, 0x68, 0x72, 0x77, - 0x92, 0x14, 0x14, 0x2c, 0x0d, 0x68, 0xbb, 0x93, 0x69, 0x9d, 0x4d, 0x04, 0xe3, 0xa5, 0x64, 0x5c, - 0x29, 0x0d, 0x1c, 0xa4, 0x56, 0xc6, 0xb3, 0xdb, 0xf7, 0x33, 0x9d, 0x69, 0x57, 0xb2, 0x45, 0x15, - 0xbe, 0xb6, 0x53, 0x6d, 0x0a, 0x6d, 0x56, 0x87, 0x80, 0x0d, 0xd8, 0x30, 0x60, 0x09, 0x37, 0x82, - 0x9d, 0x4c, 0x45, 0x75, 0xf6, 0x8f, 0x53, 0xf2, 0x4c, 0x2a, 0x27, 0x5f, 0xeb, 0x68, 0x03, 0x15, - 0x4f, 0xb5, 0x62, 0x70, 0x56, 0x0a, 0xc3, 0x92, 0x89, 0x4e, 0x8f, 0xaf, 0xc1, 0xdc, 0x6f, 0xc0, - 0x3a, 0x20, 0xd4, 0x58, 0x54, 0x85, 0x54, 0x70, 0x15, 0xed, 0x59, 0xbc, 0x7d, 0x20, 0x60, 0x6f, - 0xa1, 0xf5, 0x5a, 0x42, 0x7e, 0x64, 0x4d, 0x2c, 0x4e, 0xa6, 0xc2, 0x00, 0xd9, 0xc6, 0xeb, 0xb9, - 0x90, 0x59, 0x0e, 0x2d, 0xd4, 0x45, 0x83, 0x66, 0x1c, 0xfe, 0x91, 0x7d, 0x8c, 0x97, 0x6f, 0x6b, - 0xad, 0x75, 0xd1, 0x60, 0x73, 0xb4, 0x43, 0xbd, 0x11, 0xba, 0x30, 0x42, 0x9d, 0x91, 0x7a, 0x67, - 0xf4, 0x25, 0xcf, 0x44, 0xd0, 0x8c, 0x57, 0x3a, 0x7b, 0x7f, 0x10, 0x7e, 0x70, 0x65, 0xb4, 0x29, - 0xb5, 0x32, 0x82, 0xf4, 0x71, 0x13, 0xac, 0x69, 0xa1, 0x6e, 0x73, 0xb0, 0x39, 0xda, 0xaa, 0xc5, - 0x97, 0x87, 0xa0, 0x47, 0x36, 0x5e, 0x30, 0xc8, 0x33, 0x7c, 0xc7, 0xed, 0xe1, 0xad, 0x1c, 0x87, - 0xa7, 0x3c, 0xa4, 0x4b, 0xbf, 0xd4, 0x3b, 0x75, 0x23, 0x0e, 0x9f, 0xc7, 0x1b, 0x8e, 0x7a, 0x38, - 0x26, 0x8f, 0xf1, 0x6d, 0x57, 0xb6, 0x9a, 0xae, 0x65, 0x8b, 0xd6, 0xeb, 0x5b, 0x6d, 0x88, 0x3d, - 0x87, 0x1c, 0x5c, 0xf0, 0x7b, 0xcb, 0x75, 0xf4, 0x6f, 0xf4, 0xeb, 0x8d, 0xac, 0x1a, 0x1e, 0x7d, - 0x45, 0x78, 0xe3, 0x95, 0x8f, 0x17, 0xf9, 0x84, 0xf0, 0xbd, 0x4b, 0xe6, 0xc9, 0x0e, 0xbd, 0x98, - 0x36, 0xfa, 0xff, 0xc3, 0xb4, 0xfb, 0x37, 0xf2, 0xfc, 0xf0, 0xde, 0xf0, 0xe3, 0x8f, 0xdf, 0x5f, - 0xd6, 0x1e, 0x91, 0x1e, 0xbb, 0x14, 0x72, 0xb0, 0x21, 0x3e, 0xec, 0xbd, 0x3f, 0xea, 0x87, 0xbd, - 0x17, 0xdf, 0x67, 0x11, 0x3a, 0x9f, 0x45, 0xe8, 0xd7, 0x2c, 0x42, 0x9f, 0xe7, 0x51, 0xe3, 0xdb, - 0x3c, 0x42, 0xe7, 0xf3, 0xa8, 0xf1, 0x73, 0x1e, 0x35, 0xde, 0x0c, 0x33, 0x09, 0xf9, 0x34, 0xa1, - 0xa9, 0x2e, 0xd8, 0xbe, 0x54, 0x26, 0xcd, 0x25, 0x67, 0xef, 0x42, 0xf1, 0xc4, 0x8c, 0x8f, 0xeb, - 0x64, 0xd9, 0x51, 0xb2, 0xee, 0x82, 0xf5, 0xf4, 0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x3b, 0xd2, - 0xa0, 0xed, 0x5a, 0x03, 0x00, 0x00, -} - -// Reference imports to suppress errors if they are not otherwise used. -var _ context.Context -var _ grpc.ClientConn - -// This is a compile-time assertion to ensure that this generated file -// is compatible with the grpc package it is being compiled against. -const _ = grpc.SupportPackageIsVersion4 - -// ServiceClient is the client API for Service service. -// -// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. -type ServiceClient interface { - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: finschia-sdk 0.47.0 - GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) -} - -type serviceClient struct { - cc grpc1.ClientConn -} - -func NewServiceClient(cc grpc1.ClientConn) ServiceClient { - return &serviceClient{cc} -} - -func (c *serviceClient) GetBlockWithTxs(ctx context.Context, in *GetBlockWithTxsRequest, opts ...grpc.CallOption) (*GetBlockWithTxsResponse, error) { - out := new(GetBlockWithTxsResponse) - err := c.cc.Invoke(ctx, "/lbm.tx.v1beta1.Service/GetBlockWithTxs", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -// ServiceServer is the server API for Service service. -type ServiceServer interface { - // GetBlockWithTxs fetches a block with decoded txs. - // - // Since: finschia-sdk 0.47.0 - GetBlockWithTxs(context.Context, *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) -} - -// UnimplementedServiceServer can be embedded to have forward compatible implementations. -type UnimplementedServiceServer struct { -} - -func (*UnimplementedServiceServer) GetBlockWithTxs(ctx context.Context, req *GetBlockWithTxsRequest) (*GetBlockWithTxsResponse, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetBlockWithTxs not implemented") -} - -func RegisterServiceServer(s grpc1.Server, srv ServiceServer) { - s.RegisterService(&_Service_serviceDesc, srv) -} - -func _Service_GetBlockWithTxs_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(GetBlockWithTxsRequest) - if err := dec(in); err != nil { - return nil, err - } - if interceptor == nil { - return srv.(ServiceServer).GetBlockWithTxs(ctx, in) - } - info := &grpc.UnaryServerInfo{ - Server: srv, - FullMethod: "/lbm.tx.v1beta1.Service/GetBlockWithTxs", - } - handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(ServiceServer).GetBlockWithTxs(ctx, req.(*GetBlockWithTxsRequest)) - } - return interceptor(ctx, in, info, handler) -} - -var _Service_serviceDesc = grpc.ServiceDesc{ - ServiceName: "lbm.tx.v1beta1.Service", - HandlerType: (*ServiceServer)(nil), - Methods: []grpc.MethodDesc{ - { - MethodName: "GetBlockWithTxs", - Handler: _Service_GetBlockWithTxs_Handler, - }, - }, - Streams: []grpc.StreamDesc{}, - Metadata: "lbm/tx/v1beta1/service.proto", -} - -func (m *GetBlockWithTxsRequest) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockWithTxsRequest) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockWithTxsRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if m.Height != 0 { - i = encodeVarintService(dAtA, i, uint64(m.Height)) - i-- - dAtA[i] = 0x8 - } - return len(dAtA) - i, nil -} - -func (m *GetBlockWithTxsResponse) Marshal() (dAtA []byte, err error) { - size := m.Size() - dAtA = make([]byte, size) - n, err := m.MarshalToSizedBuffer(dAtA[:size]) - if err != nil { - return nil, err - } - return dAtA[:n], nil -} - -func (m *GetBlockWithTxsResponse) MarshalTo(dAtA []byte) (int, error) { - size := m.Size() - return m.MarshalToSizedBuffer(dAtA[:size]) -} - -func (m *GetBlockWithTxsResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { - i := len(dAtA) - _ = i - var l int - _ = l - if m.Pagination != nil { - { - size, err := m.Pagination.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x22 - } - if m.Block != nil { - { - size, err := m.Block.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x1a - } - if m.BlockId != nil { - { - size, err := m.BlockId.MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0x12 - } - if len(m.Txs) > 0 { - for iNdEx := len(m.Txs) - 1; iNdEx >= 0; iNdEx-- { - { - size, err := m.Txs[iNdEx].MarshalToSizedBuffer(dAtA[:i]) - if err != nil { - return 0, err - } - i -= size - i = encodeVarintService(dAtA, i, uint64(size)) - } - i-- - dAtA[i] = 0xa - } - } - return len(dAtA) - i, nil -} - -func encodeVarintService(dAtA []byte, offset int, v uint64) int { - offset -= sovService(v) - base := offset - for v >= 1<<7 { - dAtA[offset] = uint8(v&0x7f | 0x80) - v >>= 7 - offset++ - } - dAtA[offset] = uint8(v) - return base -} -func (m *GetBlockWithTxsRequest) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if m.Height != 0 { - n += 1 + sovService(uint64(m.Height)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovService(uint64(l)) - } - return n -} - -func (m *GetBlockWithTxsResponse) Size() (n int) { - if m == nil { - return 0 - } - var l int - _ = l - if len(m.Txs) > 0 { - for _, e := range m.Txs { - l = e.Size() - n += 1 + l + sovService(uint64(l)) - } - } - if m.BlockId != nil { - l = m.BlockId.Size() - n += 1 + l + sovService(uint64(l)) - } - if m.Block != nil { - l = m.Block.Size() - n += 1 + l + sovService(uint64(l)) - } - if m.Pagination != nil { - l = m.Pagination.Size() - n += 1 + l + sovService(uint64(l)) - } - return n -} - -func sovService(x uint64) (n int) { - return (math_bits.Len64(x|1) + 6) / 7 -} -func sozService(x uint64) (n int) { - return sovService(uint64((x << 1) ^ uint64((int64(x) >> 63)))) -} -func (m *GetBlockWithTxsRequest) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockWithTxsRequest: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockWithTxsRequest: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Height", wireType) - } - m.Height = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.Height |= int64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageRequest{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func (m *GetBlockWithTxsResponse) Unmarshal(dAtA []byte) error { - l := len(dAtA) - iNdEx := 0 - for iNdEx < l { - preIndex := iNdEx - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return 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 fmt.Errorf("proto: GetBlockWithTxsResponse: wiretype end group for non-group") - } - if fieldNum <= 0 { - return fmt.Errorf("proto: GetBlockWithTxsResponse: illegal tag %d (wire type %d)", fieldNum, wire) - } - switch fieldNum { - case 1: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Txs", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - m.Txs = append(m.Txs, &tx.Tx{}) - if err := m.Txs[len(m.Txs)-1].Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 2: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field BlockId", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.BlockId == nil { - m.BlockId = &types.BlockID{} - } - if err := m.BlockId.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 3: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Block", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Block == nil { - m.Block = &types1.Block{} - } - if err := m.Block.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - case 4: - if wireType != 2 { - return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) - } - var msglen int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowService - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - msglen |= int(b&0x7F) << shift - if b < 0x80 { - break - } - } - if msglen < 0 { - return ErrInvalidLengthService - } - postIndex := iNdEx + msglen - if postIndex < 0 { - return ErrInvalidLengthService - } - if postIndex > l { - return io.ErrUnexpectedEOF - } - if m.Pagination == nil { - m.Pagination = &query.PageResponse{} - } - if err := m.Pagination.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { - return err - } - iNdEx = postIndex - default: - iNdEx = preIndex - skippy, err := skipService(dAtA[iNdEx:]) - if err != nil { - return err - } - if (skippy < 0) || (iNdEx+skippy) < 0 { - return ErrInvalidLengthService - } - if (iNdEx + skippy) > l { - return io.ErrUnexpectedEOF - } - iNdEx += skippy - } - } - - if iNdEx > l { - return io.ErrUnexpectedEOF - } - return nil -} -func skipService(dAtA []byte) (n int, err error) { - l := len(dAtA) - iNdEx := 0 - depth := 0 - for iNdEx < l { - var wire uint64 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - wire |= (uint64(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - wireType := int(wire & 0x7) - switch wireType { - case 0: - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - iNdEx++ - if dAtA[iNdEx-1] < 0x80 { - break - } - } - case 1: - iNdEx += 8 - case 2: - var length int - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return 0, ErrIntOverflowService - } - if iNdEx >= l { - return 0, io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - length |= (int(b) & 0x7F) << shift - if b < 0x80 { - break - } - } - if length < 0 { - return 0, ErrInvalidLengthService - } - iNdEx += length - case 3: - depth++ - case 4: - if depth == 0 { - return 0, ErrUnexpectedEndOfGroupService - } - depth-- - case 5: - iNdEx += 4 - default: - return 0, fmt.Errorf("proto: illegal wireType %d", wireType) - } - if iNdEx < 0 { - return 0, ErrInvalidLengthService - } - if depth == 0 { - return iNdEx, nil - } - } - return 0, io.ErrUnexpectedEOF -} - -var ( - ErrInvalidLengthService = fmt.Errorf("proto: negative length found during unmarshaling") - ErrIntOverflowService = fmt.Errorf("proto: integer overflow") - ErrUnexpectedEndOfGroupService = fmt.Errorf("proto: unexpected end of group") -) diff --git a/types/tx2/service.pb.gw.go b/types/tx2/service.pb.gw.go deleted file mode 100644 index 01ea455cd4..0000000000 --- a/types/tx2/service.pb.gw.go +++ /dev/null @@ -1,202 +0,0 @@ -// Code generated by protoc-gen-grpc-gateway. DO NOT EDIT. -// source: lbm/tx/v1beta1/service.proto - -/* -Package tx2 is a reverse proxy. - -It translates gRPC into RESTful JSON APIs. -*/ -package tx2 - -import ( - "context" - "io" - "net/http" - - "github.com/golang/protobuf/descriptor" - "github.com/golang/protobuf/proto" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "github.com/grpc-ecosystem/grpc-gateway/utilities" - "google.golang.org/grpc" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/grpclog" - "google.golang.org/grpc/status" -) - -// Suppress "imported and not used" errors -var _ codes.Code -var _ io.Reader -var _ status.Status -var _ = runtime.String -var _ = utilities.NewDoubleArray -var _ = descriptor.ForMessage - -var ( - filter_Service_GetBlockWithTxs_0 = &utilities.DoubleArray{Encoding: map[string]int{"height": 0}, Base: []int{1, 1, 0}, Check: []int{0, 1, 2}} -) - -func request_Service_GetBlockWithTxs_0(ctx context.Context, marshaler runtime.Marshaler, client ServiceClient, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockWithTxsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetBlockWithTxs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := client.GetBlockWithTxs(ctx, &protoReq, grpc.Header(&metadata.HeaderMD), grpc.Trailer(&metadata.TrailerMD)) - return msg, metadata, err - -} - -func local_request_Service_GetBlockWithTxs_0(ctx context.Context, marshaler runtime.Marshaler, server ServiceServer, req *http.Request, pathParams map[string]string) (proto.Message, runtime.ServerMetadata, error) { - var protoReq GetBlockWithTxsRequest - var metadata runtime.ServerMetadata - - var ( - val string - ok bool - err error - _ = err - ) - - val, ok = pathParams["height"] - if !ok { - return nil, metadata, status.Errorf(codes.InvalidArgument, "missing parameter %s", "height") - } - - protoReq.Height, err = runtime.Int64(val) - - if err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "type mismatch, parameter: %s, error: %v", "height", err) - } - - if err := req.ParseForm(); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - if err := runtime.PopulateQueryParameters(&protoReq, req.Form, filter_Service_GetBlockWithTxs_0); err != nil { - return nil, metadata, status.Errorf(codes.InvalidArgument, "%v", err) - } - - msg, err := server.GetBlockWithTxs(ctx, &protoReq) - return msg, metadata, err - -} - -// RegisterServiceHandlerServer registers the http handlers for service Service to "mux". -// UnaryRPC :call ServiceServer directly. -// StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. -// Note that using this registration option will cause many gRPC library features (such as grpc.SendHeader, etc) to stop working. Consider using RegisterServiceHandlerFromEndpoint instead. -func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ServiceServer) error { - - mux.Handle("GET", pattern_Service_GetBlockWithTxs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateIncomingContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := local_request_Service_GetBlockWithTxs_0(rctx, inboundMarshaler, server, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockWithTxs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -// RegisterServiceHandlerFromEndpoint is same as RegisterServiceHandler but -// automatically dials to "endpoint" and closes the connection when "ctx" gets done. -func RegisterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error) { - conn, err := grpc.Dial(endpoint, opts...) - if err != nil { - return err - } - defer func() { - if err != nil { - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - return - } - go func() { - <-ctx.Done() - if cerr := conn.Close(); cerr != nil { - grpclog.Infof("Failed to close conn to %s: %v", endpoint, cerr) - } - }() - }() - - return RegisterServiceHandler(ctx, mux, conn) -} - -// RegisterServiceHandler registers the http handlers for service Service to "mux". -// The handlers forward requests to the grpc endpoint over "conn". -func RegisterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error { - return RegisterServiceHandlerClient(ctx, mux, NewServiceClient(conn)) -} - -// RegisterServiceHandlerClient registers the http handlers for service Service -// to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ServiceClient". -// Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ServiceClient" -// doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in -// "ServiceClient" to call the correct interceptors. -func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ServiceClient) error { - - mux.Handle("GET", pattern_Service_GetBlockWithTxs_0, func(w http.ResponseWriter, req *http.Request, pathParams map[string]string) { - ctx, cancel := context.WithCancel(req.Context()) - defer cancel() - inboundMarshaler, outboundMarshaler := runtime.MarshalerForRequest(mux, req) - rctx, err := runtime.AnnotateContext(ctx, mux, req) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - resp, md, err := request_Service_GetBlockWithTxs_0(rctx, inboundMarshaler, client, req, pathParams) - ctx = runtime.NewServerMetadataContext(ctx, md) - if err != nil { - runtime.HTTPError(ctx, mux, outboundMarshaler, w, req, err) - return - } - - forward_Service_GetBlockWithTxs_0(ctx, mux, outboundMarshaler, w, req, resp, mux.GetForwardResponseOptions()...) - - }) - - return nil -} - -var ( - pattern_Service_GetBlockWithTxs_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 1, 0, 4, 1, 5, 5}, []string{"lbm", "tx", "v1beta1", "txs", "block", "height"}, "", runtime.AssumeColonVerbOpt(false))) -) - -var ( - forward_Service_GetBlockWithTxs_0 = runtime.ForwardResponseMessage -) diff --git a/version/command.go b/version/command.go index ed4bf0b935..4dca92453e 100644 --- a/version/command.go +++ b/version/command.go @@ -5,9 +5,8 @@ import ( "strings" "github.com/spf13/cobra" + "github.com/tendermint/tendermint/libs/cli" yaml "gopkg.in/yaml.v2" - - "github.com/Finschia/ostracon/libs/cli" ) const flagLong = "long" diff --git a/version/version_test.go b/version/version_test.go index 9bf95efae6..a2bed7d188 100644 --- a/version/version_test.go +++ b/version/version_test.go @@ -8,8 +8,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/libs/cli" + "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/testutil" "github.com/Finschia/finschia-sdk/version" diff --git a/x/auth/ante/feegrant_test.go b/x/auth/ante/feegrant_test.go index 0997d51c90..fee248fa98 100644 --- a/x/auth/ante/feegrant_test.go +++ b/x/auth/ante/feegrant_test.go @@ -5,7 +5,7 @@ import ( "testing" "time" - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" diff --git a/x/auth/ante/sigverify_benchmark_test.go b/x/auth/ante/sigverify_benchmark_test.go index 1374cbe875..56d03fdb45 100644 --- a/x/auth/ante/sigverify_benchmark_test.go +++ b/x/auth/ante/sigverify_benchmark_test.go @@ -4,14 +4,13 @@ import ( "testing" "github.com/stretchr/testify/require" - - tmcrypto "github.com/Finschia/ostracon/crypto" + tmcrypto "github.com/tendermint/tendermint/crypto" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" "github.com/Finschia/finschia-sdk/crypto/keys/secp256r1" ) -// This benchmark is used to asses the ante.Secp256k1ToR1GasFactor value +// This benchmark is used to assets the ante.Secp256k1ToR1GasFactor value func BenchmarkSig(b *testing.B) { require := require.New(b) msg := tmcrypto.CRandBytes(1000) diff --git a/x/auth/client/cli/query.go b/x/auth/client/cli/query.go index 28f721d9d5..8e2ab6457d 100644 --- a/x/auth/client/cli/query.go +++ b/x/auth/client/cli/query.go @@ -6,8 +6,7 @@ import ( "strings" "github.com/spf13/cobra" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -222,7 +221,7 @@ $ %s query txs --%s 'message.sender=link1...&message.action=withdraw_delegator_r } tokens := strings.Split(event, "=") - if tokens[0] == octypes.TxHeightKey { + if tokens[0] == tmtypes.TxHeightKey { event = fmt.Sprintf("%s=%s", tokens[0], tokens[1]) } else { event = fmt.Sprintf("%s='%s'", tokens[0], tokens[1]) diff --git a/x/auth/client/testutil/helpers.go b/x/auth/client/testutil/helpers.go index 4d3ce1107d..dac9b1b955 100644 --- a/x/auth/client/testutil/helpers.go +++ b/x/auth/client/testutil/helpers.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -24,7 +24,7 @@ func TxSignExec(clientCtx client.Context, from fmt.Stringer, filename string, ex } cmd := cli.GetSignCommand() - ostcli.PrepareBaseCmd(cmd, "", "") + tmcli.PrepareBaseCmd(cmd, "", "") return clitestutil.ExecTestCLICmd(clientCtx, cmd, append(args, extraArgs...)) } @@ -87,7 +87,7 @@ func TxDecodeExec(clientCtx client.Context, encodedTx string, extraArgs ...strin } func QueryAccountExec(clientCtx client.Context, address fmt.Stringer, extraArgs ...string) (testutil.BufferWriter, error) { - args := []string{address.String(), fmt.Sprintf("--%s=json", ostcli.OutputFlag)} + args := []string{address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)} return clitestutil.ExecTestCLICmd(clientCtx, cli.GetAccountCmd(), append(args, extraArgs...)) } diff --git a/x/auth/client/testutil/suite.go b/x/auth/client/testutil/suite.go index b1f1de83e6..e4b086c0b4 100644 --- a/x/auth/client/testutil/suite.go +++ b/x/auth/client/testutil/suite.go @@ -12,8 +12,7 @@ import ( "github.com/stretchr/testify/require" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -311,17 +310,17 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByHash() { }, { "with invalid hash", - []string{"somethinginvalid", fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{"somethinginvalid", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, "", }, { "with valid and not existing hash", - []string{"C7E7D3A86A17AB3A321172239F3B61357937AF0F25D9FA4D2F4DCCAD9B0D7747", fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{"C7E7D3A86A17AB3A321172239F3B61357937AF0F25D9FA4D2F4DCCAD9B0D7747", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, "", }, { "happy case", - []string{txRes.TxHash, fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, sdk.MsgTypeURL(&banktypes.MsgSend{}), }, @@ -367,7 +366,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { s.Require().NoError(s.network.WaitForNextBlock()) // Query the tx by hash to get the inner tx. - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", ostcli.OutputFlag)}) + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) protoTx := txRes.GetTx().(*tx.Tx) @@ -383,7 +382,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { []string{ fmt.Sprintf("--type=%s", "foo"), "bar", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "unknown --type value foo", }, @@ -392,7 +391,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { []string{ "--type=acc_seq", "", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "`acc_seq` type takes an argument '/'", }, @@ -401,7 +400,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { []string{ "--type=acc_seq", "foobar", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "found no txs matching given address and sequence combination", }, @@ -410,7 +409,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { []string{ "--type=acc_seq", fmt.Sprintf("%s/%d", val.Address, protoTx.AuthInfo.SignerInfos[0].Sequence), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, "", }, @@ -419,7 +418,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { []string{ "--type=signature", "", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "argument should be comma-separated signatures", }, @@ -428,7 +427,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { []string{ "--type=signature", "foo", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "found no txs matching given signatures", }, @@ -437,7 +436,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxCmdByEvents() { []string{ "--type=signature", base64.StdEncoding.EncodeToString(protoTx.Signatures[0]), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, "", }, @@ -481,7 +480,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { s.Require().NoError(s.network.WaitForNextBlock()) // Query the tx by hash to get the inner tx. - out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", ostcli.OutputFlag)}) + out, err = clitestutil.ExecTestCLICmd(val.ClientCtx, authcli.QueryTxCmd(), []string{txRes.TxHash, fmt.Sprintf("--%s=json", tmcli.OutputFlag)}) s.Require().NoError(err) s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &txRes)) @@ -496,7 +495,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { []string{ fmt.Sprintf("--events=tx.fee=%s", sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, false, @@ -506,7 +505,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { []string{ fmt.Sprintf("--events=tx.fee=%s", sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(0))).String()), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, true, @@ -515,7 +514,7 @@ func (s *IntegrationTestSuite) TestCLIQueryTxsCmdByEvents() { "wrong number of arguments", []string{ "extra", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, true, @@ -1174,7 +1173,7 @@ func (s *IntegrationTestSuite) TestGetAccountsCmd() { val := s.network.Validators[0] commonArgs := []string{ - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -1238,7 +1237,7 @@ func (s *IntegrationTestSuite) TestQueryModuleAccountByNameCmd() { out, err := clitestutil.ExecTestCLICmd(clientCtx, authcli.QueryModuleAccountByNameCmd(), []string{ tc.moduleName, - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }) if tc.expectErr { s.Require().Error(err) @@ -1311,12 +1310,12 @@ func (s *IntegrationTestSuite) TestQueryParamsCmd() { }{ { "happy case", - []string{fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, }, { "with specific height", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, }, } diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index df8088e9de..0c67fe3d80 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -4,8 +4,7 @@ import ( "fmt" gogotypes "github.com/gogo/protobuf/types" - - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" diff --git a/x/auth/legacy/legacytx/stdtx_test.go b/x/auth/legacy/legacytx/stdtx_test.go index f6fb1c91a7..cad93715a6 100644 --- a/x/auth/legacy/legacytx/stdtx_test.go +++ b/x/auth/legacy/legacytx/stdtx_test.go @@ -5,10 +5,9 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec" cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" diff --git a/x/auth/tx/query.go b/x/auth/tx/query.go index 03f8a9e03e..af2ade939e 100644 --- a/x/auth/tx/query.go +++ b/x/auth/tx/query.go @@ -8,7 +8,7 @@ import ( "strings" "time" - ctypes "github.com/Finschia/ostracon/rpc/core/types" + ctypes "github.com/tendermint/tendermint/rpc/core/types" "github.com/Finschia/finschia-sdk/client" codectypes "github.com/Finschia/finschia-sdk/codec/types" diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index f67d787cb8..053a61ce6b 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -232,7 +232,7 @@ func (s txServer) GetBlockWithTxs(ctx context.Context, req *txtypes.GetBlockWith } } - // convert ostracon's block struct to tendermint's block struct + // convert tendermint's block struct to tendermint's block struct tmBlock := tmtypes.Block{ Header: block.Header, Data: block.Data, diff --git a/x/auth/tx2/service.go b/x/auth/tx2/service.go deleted file mode 100644 index 67de6f505a..0000000000 --- a/x/auth/tx2/service.go +++ /dev/null @@ -1,130 +0,0 @@ -package tx2 - -import ( - "context" - - gogogrpc "github.com/gogo/protobuf/grpc" - "github.com/grpc-ecosystem/grpc-gateway/runtime" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" - - "github.com/Finschia/finschia-sdk/client" - "github.com/Finschia/finschia-sdk/client/grpc/tmservice" - codectypes "github.com/Finschia/finschia-sdk/codec/types" - sdk "github.com/Finschia/finschia-sdk/types" - sdkerrors "github.com/Finschia/finschia-sdk/types/errors" - pagination "github.com/Finschia/finschia-sdk/types/query" - txtypes "github.com/Finschia/finschia-sdk/types/tx" - tx2types "github.com/Finschia/finschia-sdk/types/tx2" -) - -type tx2Server struct { - clientCtx client.Context - interfaceRegistry codectypes.InterfaceRegistry -} - -func NewTx2Server(clientCtx client.Context, interfaceRegistry codectypes.InterfaceRegistry) tx2types.ServiceServer { - return tx2Server{ - clientCtx: clientCtx, - interfaceRegistry: interfaceRegistry, - } -} - -var _ tx2types.ServiceServer = tx2Server{} - -// protoTxProvider is a type which can provide a proto transaction. It is a -// workaround to get access to the wrapper TxBuilder's method GetProtoTx(). -// ref: https://github.com/cosmos/cosmos-sdk/issues/10347 -type protoTxProvider interface { - GetProtoTx() *txtypes.Tx -} - -func (s tx2Server) GetBlockWithTxs(ctx context.Context, req *tx2types.GetBlockWithTxsRequest) (*tx2types.GetBlockWithTxsResponse, error) { - if req == nil { - return nil, status.Error(codes.InvalidArgument, "request cannot be nil") - } - - sdkCtx := sdk.UnwrapSDKContext(ctx) - currentHeight := sdkCtx.BlockHeight() - - if req.Height < 1 || req.Height > currentHeight { - return nil, sdkerrors.ErrInvalidHeight.Wrapf("requested height %d but height must not be less than 1 "+ - "or greater than the current height %d", req.Height, currentHeight) - } - - blockID, block, err := tmservice.GetProtoBlock(ctx, s.clientCtx, &req.Height) - if err != nil { - return nil, err - } - - var offset, limit uint64 - if req.Pagination != nil { - offset = req.Pagination.Offset - limit = req.Pagination.Limit - } else { - offset = 0 - limit = pagination.DefaultLimit - } - - blockTxs := block.Data.Txs - blockTxsLn := uint64(len(blockTxs)) - txs := make([]*txtypes.Tx, 0, limit) - if offset >= blockTxsLn && blockTxsLn != 0 { - return nil, sdkerrors.ErrInvalidRequest.Wrapf("out of range: cannot paginate %d txs with offset %d and limit %d", blockTxsLn, offset, limit) - } - decodeTxAt := func(i uint64) error { - tx := blockTxs[i] - txb, err := s.clientCtx.TxConfig.TxDecoder()(tx) - if err != nil { - return err - } - p, ok := txb.(protoTxProvider) - if !ok { - return sdkerrors.ErrTxDecode.Wrapf("could not cast %T to %T", txb, txtypes.Tx{}) - } - txs = append(txs, p.GetProtoTx()) - return nil - } - if req.Pagination != nil && req.Pagination.Reverse { - for i, count := offset, uint64(0); i > 0 && count != limit; i, count = i-1, count+1 { - if err = decodeTxAt(i); err != nil { - return nil, err - } - } - } else { - for i, count := offset, uint64(0); i < blockTxsLn && count != limit; i, count = i+1, count+1 { - if err = decodeTxAt(i); err != nil { - return nil, err - } - } - } - - return &tx2types.GetBlockWithTxsResponse{ - Txs: txs, - BlockId: &blockID, - Block: block, - Pagination: &pagination.PageResponse{ - Total: blockTxsLn, - }, - }, nil -} - -// RegisterTxService registers the tx service on the gRPC router. -func RegisterTxService( - qrt gogogrpc.Server, - clientCtx client.Context, - interfaceRegistry codectypes.InterfaceRegistry, -) { - tx2types.RegisterServiceServer( - qrt, - NewTx2Server(clientCtx, interfaceRegistry), - ) -} - -// RegisterGRPCGatewayRoutes mounts the tx service's GRPC-gateway routes on the -// given Mux. -func RegisterGRPCGatewayRoutes(clientConn gogogrpc.ClientConn, mux *runtime.ServeMux) { - if err := tx2types.RegisterServiceHandlerClient(context.Background(), mux, tx2types.NewServiceClient(clientConn)); err != nil { - panic(err) - } -} diff --git a/x/auth/tx2/service_test.go b/x/auth/tx2/service_test.go deleted file mode 100644 index b88d3056e6..0000000000 --- a/x/auth/tx2/service_test.go +++ /dev/null @@ -1,177 +0,0 @@ -package tx2_test - -import ( - "context" - "fmt" - "testing" - - "github.com/stretchr/testify/suite" - - "github.com/Finschia/finschia-sdk/client/flags" - "github.com/Finschia/finschia-sdk/testutil/network" - "github.com/Finschia/finschia-sdk/testutil/rest" - sdk "github.com/Finschia/finschia-sdk/types" - "github.com/Finschia/finschia-sdk/types/query" - "github.com/Finschia/finschia-sdk/types/tx2" - bankcli "github.com/Finschia/finschia-sdk/x/bank/client/testutil" -) - -type IntegrationTestSuite struct { - suite.Suite - - cfg network.Config - network *network.Network - - txHeight int64 - queryClient tx2.ServiceClient - txRes sdk.TxResponse -} - -func (s *IntegrationTestSuite) SetupSuite() { - s.T().Log("setting up integration test suite") - - cfg := network.DefaultConfig() - cfg.NumValidators = 1 - - s.cfg = cfg - s.network = network.New(s.T(), cfg) - s.Require().NotNil(s.network) - - val := s.network.Validators[0] - - _, err := s.network.WaitForHeight(1) - s.Require().NoError(err) - - s.queryClient = tx2.NewServiceClient(val.ClientCtx) - - // Create a new MsgSend tx from val to itself. - out, err := bankcli.MsgSendExec( - val.ClientCtx, - val.Address, - val.Address, - sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10)), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastBlock), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), - fmt.Sprintf("--%s=foobar", flags.FlagNote), - ) - s.Require().NoError(err) - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &s.txRes)) - s.Require().Equal(uint32(0), s.txRes.Code) - - out, err = bankcli.MsgSendExec( - val.ClientCtx, - val.Address, - val.Address, - sdk.NewCoins( - sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(1)), - ), - fmt.Sprintf("--%s=true", flags.FlagSkipConfirmation), - fmt.Sprintf("--%s=2", flags.FlagSequence), - fmt.Sprintf("--%s=%s", flags.FlagBroadcastMode, flags.BroadcastSync), - fmt.Sprintf("--%s=%s", flags.FlagFees, sdk.NewCoins(sdk.NewCoin(s.cfg.BondDenom, sdk.NewInt(10))).String()), - fmt.Sprintf("--gas=%d", flags.DefaultGasLimit), - fmt.Sprintf("--%s=foobar", flags.FlagNote), - ) - s.Require().NoError(err) - var tr sdk.TxResponse - s.Require().NoError(val.ClientCtx.Codec.UnmarshalJSON(out.Bytes(), &tr)) - s.Require().Equal(uint32(0), tr.Code) - - s.Require().NoError(s.network.WaitForNextBlock()) - height, err := s.network.LatestHeight() - s.Require().NoError(err) - s.txHeight = height - fmt.Printf("s.txHeight: %d\n", height) -} - -func (s *IntegrationTestSuite) TearDownSuite() { - s.T().Log("tearing down integration test suite") - s.network.Cleanup() -} - -func (s *IntegrationTestSuite) TestGetBlockWithTxs_GRPC() { - testCases := []struct { - name string - req *tx2.GetBlockWithTxsRequest - expErr bool - expErrMsg string - expTxsLen int - }{ - {"nil request", nil, true, "request cannot be nil", 0}, - {"empty request", &tx2.GetBlockWithTxsRequest{}, true, "height must not be less than 1 or greater than the current height", 0}, - {"bad height", &tx2.GetBlockWithTxsRequest{Height: 99999999}, true, "height must not be less than 1 or greater than the current height", 0}, - {"bad pagination", &tx2.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 1000, Limit: 100}}, true, "out of range", 0}, - {"good request", &tx2.GetBlockWithTxsRequest{Height: s.txHeight}, false, "", 1}, - {"with pagination request", &tx2.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 0, Limit: 1}}, false, "", 1}, - {"page all request", &tx2.GetBlockWithTxsRequest{Height: s.txHeight, Pagination: &query.PageRequest{Offset: 0, Limit: 100}}, false, "", 1}, - {"block with 0 tx", &tx2.GetBlockWithTxsRequest{Height: s.txHeight - 1, Pagination: &query.PageRequest{Offset: 0, Limit: 100}}, false, "", 0}, - } - for _, tc := range testCases { - s.Run(tc.name, func() { - // Query the tx via gRPC. - grpcRes, err := s.queryClient.GetBlockWithTxs(context.Background(), tc.req) - if tc.expErr { - s.Require().Error(err) - s.Require().Contains(err.Error(), tc.expErrMsg) - } else { - s.Require().NoError(err) - if tc.expTxsLen > 0 { - s.Require().Equal("foobar", grpcRes.Txs[0].Body.Memo) - } - s.Require().Equal(grpcRes.Block.Header.Height, tc.req.Height) - if tc.req.Pagination != nil { - s.Require().LessOrEqual(len(grpcRes.Txs), int(tc.req.Pagination.Limit)) - } - } - }) - } -} - -func (s *IntegrationTestSuite) TestGetBlockWithTxs_GRPCGateway() { - val := s.network.Validators[0] - testCases := []struct { - name string - url string - expErr bool - expErrMsg string - }{ - { - "empty params", - fmt.Sprintf("%s/lbm/tx/v1beta1/txs/block/0", val.APIAddress), - true, "height must not be less than 1 or greater than the current height", - }, - { - "bad height", - fmt.Sprintf("%s/lbm/tx/v1beta1/txs/block/%d", val.APIAddress, 9999999), - true, "height must not be less than 1 or greater than the current height", - }, - { - "good request", - fmt.Sprintf("%s/lbm/tx/v1beta1/txs/block/%d", val.APIAddress, s.txHeight), - false, "", - }, - } - for _, tc := range testCases { - s.Run(tc.name, func() { - res, err := rest.GetRequest(tc.url) - s.Require().NoError(err) - if tc.expErr { - s.Require().Contains(string(res), tc.expErrMsg) - } else { - var result tx2.GetBlockWithTxsResponse - err = val.ClientCtx.Codec.UnmarshalJSON(res, &result) - s.Require().NoError(err) - s.Require().Equal("foobar", result.Txs[0].Body.Memo) - s.Require().Equal(result.Block.Header.Height, s.txHeight) - } - }) - } -} - -func TestIntegrationTestSuite(t *testing.T) { - suite.Run(t, new(IntegrationTestSuite)) -} diff --git a/x/auth/types/account.go b/x/auth/types/account.go index 30f2c7729c..52813e9999 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -8,10 +8,9 @@ import ( "strings" "github.com/gogo/protobuf/proto" + "github.com/tendermint/tendermint/crypto" "gopkg.in/yaml.v2" - "github.com/Finschia/ostracon/crypto" - "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" diff --git a/x/auth/vesting/types/vesting_account_test.go b/x/auth/vesting/types/vesting_account_test.go index f771a53e32..3f94a17caf 100644 --- a/x/auth/vesting/types/vesting_account_test.go +++ b/x/auth/vesting/types/vesting_account_test.go @@ -5,8 +5,7 @@ import ( "time" "github.com/stretchr/testify/require" - - osttime "github.com/Finschia/ostracon/types/time" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" "github.com/Finschia/finschia-sdk/testutil/testdata" @@ -21,7 +20,7 @@ var ( ) func TestGetVestedCoinsContVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -45,7 +44,7 @@ func TestGetVestedCoinsContVestingAcc(t *testing.T) { } func TestGetVestingCoinsContVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -65,7 +64,7 @@ func TestGetVestingCoinsContVestingAcc(t *testing.T) { } func TestSpendableCoinsContVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -86,7 +85,7 @@ func TestSpendableCoinsContVestingAcc(t *testing.T) { } func TestTrackDelegationContVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -123,7 +122,7 @@ func TestTrackDelegationContVestingAcc(t *testing.T) { } func TestTrackUndelegationContVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -169,7 +168,7 @@ func TestTrackUndelegationContVestingAcc(t *testing.T) { } func TestGetVestedCoinsDelVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -185,7 +184,7 @@ func TestGetVestedCoinsDelVestingAcc(t *testing.T) { } func TestGetVestingCoinsDelVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -201,7 +200,7 @@ func TestGetVestingCoinsDelVestingAcc(t *testing.T) { } func TestSpendableCoinsDelVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -230,7 +229,7 @@ func TestSpendableCoinsDelVestingAcc(t *testing.T) { } func TestTrackDelegationDelVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -265,7 +264,7 @@ func TestTrackDelegationDelVestingAcc(t *testing.T) { } func TestTrackUndelegationDelVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -311,7 +310,7 @@ func TestTrackUndelegationDelVestingAcc(t *testing.T) { } func TestGetVestedCoinsPeriodicVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, @@ -355,7 +354,7 @@ func TestGetVestedCoinsPeriodicVestingAcc(t *testing.T) { } func TestGetVestingCoinsPeriodicVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, @@ -392,7 +391,7 @@ func TestGetVestingCoinsPeriodicVestingAcc(t *testing.T) { } func TestSpendableCoinsPeriodicVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, @@ -419,7 +418,7 @@ func TestSpendableCoinsPeriodicVestingAcc(t *testing.T) { } func TestTrackDelegationPeriodicVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, @@ -475,7 +474,7 @@ func TestTrackDelegationPeriodicVestingAcc(t *testing.T) { } func TestTrackUndelegationPeriodicVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(24 * time.Hour) periods := types.Periods{ types.Period{Length: int64(12 * 60 * 60), Amount: sdk.Coins{sdk.NewInt64Coin(feeDenom, 500), sdk.NewInt64Coin(stakeDenom, 50)}}, @@ -533,7 +532,7 @@ func TestTrackUndelegationPeriodicVestingAcc(t *testing.T) { } func TestGetVestedCoinsPermLockedVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -549,7 +548,7 @@ func TestGetVestedCoinsPermLockedVestingAcc(t *testing.T) { } func TestGetVestingCoinsPermLockedVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -565,7 +564,7 @@ func TestGetVestingCoinsPermLockedVestingAcc(t *testing.T) { } func TestSpendableCoinsPermLockedVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -589,7 +588,7 @@ func TestSpendableCoinsPermLockedVestingAcc(t *testing.T) { } func TestTrackDelegationPermLockedVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() @@ -617,7 +616,7 @@ func TestTrackDelegationPermLockedVestingAcc(t *testing.T) { } func TestTrackUndelegationPermLockedVestingAcc(t *testing.T) { - now := osttime.Now() + now := tmtime.Now() endTime := now.Add(1000 * 24 * time.Hour) bacc, origCoins := initBaseAccount() diff --git a/x/authz/client/testutil/query.go b/x/authz/client/testutil/query.go index 8581130957..07ffb10315 100644 --- a/x/authz/client/testutil/query.go +++ b/x/authz/client/testutil/query.go @@ -5,7 +5,7 @@ import ( "strings" "time" - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" @@ -46,7 +46,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorizations() { []string{ val.Address.String(), "invalid grantee", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "decoding bech32 failed: invalid character in string: ' '", @@ -56,7 +56,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorizations() { []string{ "invalid granter", grantee.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "decoding bech32 failed: invalid character in string: ' '", @@ -66,7 +66,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorizations() { []string{ val.Address.String(), grantee.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, ``, @@ -125,7 +125,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorization() { val.Address.String(), "invalid grantee", typeMsgSend, - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "", @@ -136,7 +136,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorization() { "invalid granter", grantee.String(), typeMsgSend, - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "", @@ -147,7 +147,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorization() { val.Address.String(), grantee.String(), "typeMsgSend", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, "", @@ -158,7 +158,7 @@ func (s *IntegrationTestSuite) TestQueryAuthorization() { val.Address.String(), grantee.String(), typeMsgSend, - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, `{"@type":"/cosmos.bank.v1beta1.SendAuthorization","spend_limit":[{"denom":"steak","amount":"100"}]}`, diff --git a/x/authz/keeper/keeper.go b/x/authz/keeper/keeper.go index 02e0fe09c5..bf9c4b64d4 100644 --- a/x/authz/keeper/keeper.go +++ b/x/authz/keeper/keeper.go @@ -7,8 +7,7 @@ import ( "github.com/gogo/protobuf/proto" abci "github.com/tendermint/tendermint/abci/types" - - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/codec" diff --git a/x/authz/keeper/keeper_test.go b/x/authz/keeper/keeper_test.go index f030852add..6a460a3910 100644 --- a/x/authz/keeper/keeper_test.go +++ b/x/authz/keeper/keeper_test.go @@ -6,8 +6,7 @@ import ( "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - octime "github.com/Finschia/ostracon/types/time" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/simapp" @@ -30,7 +29,7 @@ type TestSuite struct { func (s *TestSuite) SetupTest() { app := simapp.Setup(false) ctx := app.BaseApp.NewContext(false, tmproto.Header{}) - now := octime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) queryHelper := baseapp.NewQueryServerTestHelper(ctx, app.InterfaceRegistry()) authz.RegisterQueryServer(queryHelper, app.AuthzKeeper) diff --git a/x/authz/simulation/operations_test.go b/x/authz/simulation/operations_test.go index 0cbbb53903..c82e1688d9 100644 --- a/x/authz/simulation/operations_test.go +++ b/x/authz/simulation/operations_test.go @@ -6,10 +6,9 @@ import ( "time" "github.com/stretchr/testify/suite" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" simtypes "github.com/Finschia/finschia-sdk/types/simulation" @@ -90,7 +89,7 @@ func (suite *SimTestSuite) TestSimulateGrant() { ctx := suite.ctx.WithBlockTime(blockTime) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{ + suite.app.BeginBlock(abci.RequestBeginBlock{ Header: tmproto.Header{ Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash, @@ -122,7 +121,7 @@ func (suite *SimTestSuite) TestSimulateRevoke() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{ + suite.app.BeginBlock(abci.RequestBeginBlock{ Header: tmproto.Header{ Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash, @@ -162,7 +161,7 @@ func (suite *SimTestSuite) TestSimulateExec() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) initAmt := suite.app.StakingKeeper.TokensFromConsensusPower(suite.ctx, 200000) initCoins := sdk.NewCoins(sdk.NewCoin("stake", initAmt)) diff --git a/x/bank/bench_test.go b/x/bank/bench_test.go index 1dcbb7e031..59ce0218ec 100644 --- a/x/bank/bench_test.go +++ b/x/bank/bench_test.go @@ -7,8 +7,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" simappparams "github.com/Finschia/finschia-sdk/simapp/params" sdk "github.com/Finschia/finschia-sdk/types" @@ -46,8 +44,8 @@ func BenchmarkOneBankSendTxPerBlock(b *testing.B) { // Run this with a profiler, so its easy to distinguish what time comes from // Committing, and what time comes from Check/Deliver Tx. for i := 0; i < b.N; i++ { - benchmarkApp.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) - _, err := benchmarkApp.Check(txGen.TxEncoder(), txs[i]) + benchmarkApp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) + _, _, err := benchmarkApp.Check(txGen.TxEncoder(), txs[i]) if err != nil { panic("something is broken in checking transaction") } @@ -88,8 +86,8 @@ func BenchmarkOneBankMultiSendTxPerBlock(b *testing.B) { // Run this with a profiler, so its easy to distinguish what time comes from // Committing, and what time comes from Check/Deliver Tx. for i := 0; i < b.N; i++ { - benchmarkApp.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) - _, err := benchmarkApp.Check(txGen.TxEncoder(), txs[i]) + benchmarkApp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: height}}) + _, _, err := benchmarkApp.Check(txGen.TxEncoder(), txs[i]) if err != nil { panic("something is broken in checking transaction") } diff --git a/x/bank/client/testutil/cli_helpers.go b/x/bank/client/testutil/cli_helpers.go index 2c2bdd7699..9f148af22c 100644 --- a/x/bank/client/testutil/cli_helpers.go +++ b/x/bank/client/testutil/cli_helpers.go @@ -3,7 +3,7 @@ package testutil import ( "fmt" - "github.com/Finschia/ostracon/libs/cli" + "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/testutil" diff --git a/x/bank/client/testutil/suite.go b/x/bank/client/testutil/suite.go index 9688f3f105..6358107cdf 100644 --- a/x/bank/client/testutil/suite.go +++ b/x/bank/client/testutil/suite.go @@ -5,8 +5,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" @@ -107,7 +106,7 @@ func (s *IntegrationTestSuite) TestGetBalancesCmd() { "total account balance", []string{ val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, false, @@ -124,7 +123,7 @@ func (s *IntegrationTestSuite) TestGetBalancesCmd() { "total account balance of a specific denom", []string{ val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=%s", cli.FlagDenom, s.cfg.BondDenom), fmt.Sprintf("--%s=1", flags.FlagHeight), }, @@ -137,7 +136,7 @@ func (s *IntegrationTestSuite) TestGetBalancesCmd() { []string{ val.Address.String(), fmt.Sprintf("--%s=foobar", cli.FlagDenom), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, &sdk.Coin{}, @@ -177,7 +176,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryTotalSupply() { name: "total supply", args: []string{ fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, respType: &types.QueryTotalSupplyResponse{}, expected: &types.QueryTotalSupplyResponse{ @@ -193,7 +192,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryTotalSupply() { args: []string{ fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=%s", cli.FlagDenom, s.cfg.BondDenom), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, respType: &sdk.Coin{}, expected: &sdk.Coin{ @@ -206,7 +205,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryTotalSupply() { args: []string{ fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=foobar", cli.FlagDenom), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, respType: &sdk.Coin{}, expected: &sdk.Coin{ @@ -219,7 +218,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryTotalSupply() { args: []string{ "extra", fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: true, }, @@ -258,7 +257,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDenomsMetadata() { name: "all denoms client metadata", args: []string{ fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, respType: &types.QueryDenomsMetadataResponse{}, expected: &types.QueryDenomsMetadataResponse{ @@ -310,7 +309,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDenomsMetadata() { args: []string{ fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=%s", cli.FlagDenom, "uatom"), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, respType: &types.QueryDenomMetadataResponse{}, expected: &types.QueryDenomMetadataResponse{ @@ -340,7 +339,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDenomsMetadata() { args: []string{ fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=foobar", cli.FlagDenom), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: true, respType: &types.QueryDenomMetadataResponse{}, @@ -355,7 +354,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDenomsMetadata() { args: []string{ "extra", fmt.Sprintf("--%s=1", flags.FlagHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, expectErr: true, respType: &types.QueryDenomMetadataResponse{}, diff --git a/x/bank/keeper/keeper_test.go b/x/bank/keeper/keeper_test.go index 2967382432..19251076d9 100644 --- a/x/bank/keeper/keeper_test.go +++ b/x/bank/keeper/keeper_test.go @@ -8,8 +8,7 @@ import ( "github.com/stretchr/testify/suite" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - osttime "github.com/Finschia/ostracon/types/time" + tmtime "github.com/tendermint/tendermint/types/time" "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/simapp" @@ -474,7 +473,7 @@ func (suite *IntegrationTestSuite) TestSendCoins() { func (suite *IntegrationTestSuite) TestValidateBalance() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) @@ -671,7 +670,7 @@ func (suite *IntegrationTestSuite) TestMsgMultiSendEvents() { func (suite *IntegrationTestSuite) TestSpendableCoins() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) @@ -702,7 +701,7 @@ func (suite *IntegrationTestSuite) TestSpendableCoins() { func (suite *IntegrationTestSuite) TestVestingAccountSend() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) @@ -731,7 +730,7 @@ func (suite *IntegrationTestSuite) TestVestingAccountSend() { func (suite *IntegrationTestSuite) TestPeriodicVestingAccountSend() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) sendCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 50)) @@ -764,7 +763,7 @@ func (suite *IntegrationTestSuite) TestPeriodicVestingAccountSend() { func (suite *IntegrationTestSuite) TestVestingAccountReceive() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) @@ -798,7 +797,7 @@ func (suite *IntegrationTestSuite) TestVestingAccountReceive() { func (suite *IntegrationTestSuite) TestPeriodicVestingAccountReceive() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) origCoins := sdk.NewCoins(sdk.NewInt64Coin("stake", 100)) @@ -837,7 +836,7 @@ func (suite *IntegrationTestSuite) TestPeriodicVestingAccountReceive() { func (suite *IntegrationTestSuite) TestDelegateCoins() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) @@ -900,7 +899,7 @@ func (suite *IntegrationTestSuite) TestDelegateCoins_Invalid() { func (suite *IntegrationTestSuite) TestUndelegateCoins() { app, ctx := suite.app, suite.ctx - now := osttime.Now() + now := tmtime.Now() ctx = ctx.WithBlockHeader(tmproto.Header{Time: now}) endTime := now.Add(24 * time.Hour) diff --git a/x/bank/keeper/view.go b/x/bank/keeper/view.go index 0504bfc7c0..f6e8e967ed 100644 --- a/x/bank/keeper/view.go +++ b/x/bank/keeper/view.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/store/prefix" diff --git a/x/bank/simulation/operations_test.go b/x/bank/simulation/operations_test.go index 160e775d3a..f24d2aeb15 100644 --- a/x/bank/simulation/operations_test.go +++ b/x/bank/simulation/operations_test.go @@ -5,10 +5,9 @@ import ( "testing" "github.com/stretchr/testify/suite" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" simappparams "github.com/Finschia/finschia-sdk/simapp/params" sdk "github.com/Finschia/finschia-sdk/types" @@ -72,7 +71,7 @@ func (suite *SimTestSuite) TestSimulateMsgSend() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgSend(suite.app.AccountKeeper, suite.app.BankKeeper) @@ -101,7 +100,7 @@ func (suite *SimTestSuite) TestSimulateMsgMultiSend() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgMultiSend(suite.app.AccountKeeper, suite.app.BankKeeper) @@ -137,7 +136,7 @@ func (suite *SimTestSuite) TestSimulateModuleAccountMsgSend() { accounts := suite.getTestingAccounts(r, accCount) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgSendToModuleAccount(suite.app.AccountKeeper, suite.app.BankKeeper, moduleAccCount) @@ -171,7 +170,7 @@ func (suite *SimTestSuite) TestSimulateMsgMultiSendToModuleAccount() { accounts := suite.getTestingAccounts(r, accCount) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgMultiSendToModuleAccount(suite.app.AccountKeeper, suite.app.BankKeeper, mAccCount) diff --git a/x/bankplus/keeper/inactive_test.go b/x/bankplus/keeper/inactive_test.go index 90dde7d516..33c6a2b1e7 100644 --- a/x/bankplus/keeper/inactive_test.go +++ b/x/bankplus/keeper/inactive_test.go @@ -5,11 +5,10 @@ import ( "testing" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" "github.com/Finschia/finschia-sdk/store" diff --git a/x/capability/capability_test.go b/x/capability/capability_test.go index d85efc602b..f81fdaf093 100644 --- a/x/capability/capability_test.go +++ b/x/capability/capability_test.go @@ -4,10 +4,9 @@ import ( "testing" "github.com/stretchr/testify/suite" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" @@ -65,7 +64,7 @@ func (suite *CapabilityTestSuite) TestInitializeMemStore() { ctx = suite.app.BaseApp.NewContext(false, tmproto.Header{}).WithBlockGasMeter(sdk.NewGasMeter(50)) prevGas := ctx.BlockGasMeter().GasConsumed() restartedModule := capability.NewAppModule(suite.cdc, *newKeeper) - restartedModule.BeginBlock(ctx, ocabci.RequestBeginBlock{}) + restartedModule.BeginBlock(ctx, abci.RequestBeginBlock{}) suite.Require().True(newKeeper.IsInitialized(ctx), "memstore initialized flag not set") gasUsed := ctx.BlockGasMeter().GasConsumed() @@ -86,7 +85,7 @@ func (suite *CapabilityTestSuite) TestInitializeMemStore() { // Ensure the capabilities don't get reinitialized on next BeginBlock // by testing to see if capability returns same pointer // also check that initialized flag is still set - restartedModule.BeginBlock(ctx, ocabci.RequestBeginBlock{}) + restartedModule.BeginBlock(ctx, abci.RequestBeginBlock{}) recap, ok := newSk1.GetCapability(ctx, "transfer") suite.Require().True(ok) suite.Require().Equal(cap1, recap, "capabilities got reinitialized after second BeginBlock") diff --git a/x/capability/genesis_test.go b/x/capability/genesis_test.go index 1f7f4d72ba..b6aea99475 100644 --- a/x/capability/genesis_test.go +++ b/x/capability/genesis_test.go @@ -1,11 +1,10 @@ package capability_test import ( + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" banktypes "github.com/Finschia/finschia-sdk/x/bank/types" diff --git a/x/capability/keeper/keeper.go b/x/capability/keeper/keeper.go index dd883f2711..688500af37 100644 --- a/x/capability/keeper/keeper.go +++ b/x/capability/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "strings" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/store/prefix" diff --git a/x/capability/module.go b/x/capability/module.go index 736cdf4164..55b4af4798 100644 --- a/x/capability/module.go +++ b/x/capability/module.go @@ -10,8 +10,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" cdctypes "github.com/Finschia/finschia-sdk/codec/types" @@ -146,7 +144,7 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlocker calls InitMemStore to assert that the memory store is initialized. // It's safe to run multiple times. -func (am AppModule) BeginBlock(ctx sdk.Context, _ ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) am.keeper.InitMemStore(ctx) diff --git a/x/capability/spec/README.md b/x/capability/spec/README.md index 3416b393cb..ec612ba976 100644 --- a/x/capability/spec/README.md +++ b/x/capability/spec/README.md @@ -63,7 +63,7 @@ func NewApp(...) *App { // Initialize and seal the capability keeper so all persistent capabilities // are loaded in-memory and prevent any further modules from creating scoped // sub-keepers. - ctx := app.BaseApp.NewContext(true, ocproto.Header{}) + ctx := app.BaseApp.NewContext(true, tmproto.Header{}) app.capabilityKeeper.InitializeAndSeal(ctx) return app diff --git a/x/collection/client/testutil/query.go b/x/collection/client/testutil/query.go index 3cc43b2308..0ca3c830b0 100644 --- a/x/collection/client/testutil/query.go +++ b/x/collection/client/testutil/query.go @@ -4,8 +4,7 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -20,7 +19,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdBalance() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -88,7 +87,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdFTSupply() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } tokenID := collection.NewFTID(s.ftClassID) @@ -164,7 +163,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdFTMinted() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } tokenID := collection.NewFTID(s.ftClassID) @@ -240,7 +239,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdFTBurnt() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } tokenID := collection.NewFTID(s.ftClassID) @@ -316,7 +315,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdNFTSupply() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -391,7 +390,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdNFTMinted() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -466,7 +465,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdNFTBurnt() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -541,7 +540,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdContract() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -596,7 +595,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdTokenType() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -666,7 +665,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdToken() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } tokenID := collection.NewNFTID(s.nftClassID, 1) @@ -744,7 +743,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdRoot() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } tokenID := collection.NewNFTID(s.nftClassID, 2) @@ -816,7 +815,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdParent() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } tokenID := collection.NewNFTID(s.nftClassID, 2) @@ -888,7 +887,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdChildren() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } tokenID := collection.NewNFTID(s.nftClassID, 1) @@ -964,7 +963,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdGranteeGrants() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -1043,7 +1042,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdIsOperatorFor() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -1105,7 +1104,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdHoldersByOperator() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { diff --git a/x/collection/keeper/genesis.go b/x/collection/keeper/genesis.go index 290d8caf48..01330383cc 100644 --- a/x/collection/keeper/genesis.go +++ b/x/collection/keeper/genesis.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/collection" diff --git a/x/collection/keeper/keeper.go b/x/collection/keeper/keeper.go index 77d2e47935..a7cd32015e 100644 --- a/x/collection/keeper/keeper.go +++ b/x/collection/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/x/crisis/keeper/keeper.go b/x/crisis/keeper/keeper.go index 2318628128..06ecfda983 100644 --- a/x/crisis/keeper/keeper.go +++ b/x/crisis/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/crisis/types" diff --git a/x/crisis/keeper/keeper_test.go b/x/crisis/keeper/keeper_test.go index 243aa1a714..acafe96685 100644 --- a/x/crisis/keeper/keeper_test.go +++ b/x/crisis/keeper/keeper_test.go @@ -4,10 +4,9 @@ import ( "testing" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" ) @@ -22,7 +21,7 @@ func TestLogger(t *testing.T) { func TestInvariants(t *testing.T) { app := simapp.Setup(false) app.Commit() - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) require.Equal(t, app.CrisisKeeper.InvCheckPeriod(), uint(5)) @@ -35,7 +34,7 @@ func TestInvariants(t *testing.T) { func TestAssertInvariants(t *testing.T) { app := simapp.Setup(false) app.Commit() - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1}}) ctx := app.NewContext(true, tmproto.Header{}) diff --git a/x/distribution/abci.go b/x/distribution/abci.go index 7f005e79aa..1c2dabc761 100644 --- a/x/distribution/abci.go +++ b/x/distribution/abci.go @@ -3,7 +3,7 @@ package distribution import ( "time" - ocabci "github.com/Finschia/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" "github.com/Finschia/finschia-sdk/telemetry" sdk "github.com/Finschia/finschia-sdk/types" @@ -13,7 +13,7 @@ import ( // BeginBlocker sets the proposer for determining distribution during endblock // and distribute rewards for the previous block -func BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock, k keeper.Keeper) { +func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) // determine the total power signing the block diff --git a/x/distribution/client/testutil/suite.go b/x/distribution/client/testutil/suite.go index bfde2566d6..4f9513580a 100644 --- a/x/distribution/client/testutil/suite.go +++ b/x/distribution/client/testutil/suite.go @@ -7,8 +7,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/testutil" @@ -73,12 +72,12 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { }{ { "json output", - []string{fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `{"community_tax":"0.020000000000000000","base_proposer_reward":"0.010000000000000000","bonus_proposer_reward":"0.040000000000000000","withdraw_addr_enabled":true}`, }, { "text output", - []string{fmt.Sprintf("--%s=text", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `base_proposer_reward: "0.010000000000000000" bonus_proposer_reward: "0.040000000000000000" community_tax: "0.020000000000000000" @@ -126,7 +125,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorOutstandingRewards() { []string{ fmt.Sprintf("--%s=3", flags.FlagHeight), sdk.ValAddress(val.Address).String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, `{"rewards":[{"denom":"stake","amount":"1164.240000000000000000"}]}`, @@ -134,7 +133,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorOutstandingRewards() { { "text output", []string{ - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=3", flags.FlagHeight), sdk.ValAddress(val.Address).String(), }, @@ -189,7 +188,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorCommission() { []string{ fmt.Sprintf("--%s=3", flags.FlagHeight), sdk.ValAddress(val.Address).String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, `{"commission":[{"denom":"stake","amount":"464.520000000000000000"}]}`, @@ -197,7 +196,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorCommission() { { "text output", []string{ - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=3", flags.FlagHeight), sdk.ValAddress(val.Address).String(), }, @@ -270,7 +269,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorSlashes() { []string{ fmt.Sprintf("--%s=3", flags.FlagHeight), sdk.ValAddress(val.Address).String(), "1", "3", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, "{\"slashes\":[],\"pagination\":{\"next_key\":null,\"total\":\"0\"}}", @@ -278,7 +277,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorSlashes() { { "text output", []string{ - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=3", flags.FlagHeight), sdk.ValAddress(val.Address).String(), "1", "3", }, @@ -342,7 +341,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegatorRewards() { []string{ fmt.Sprintf("--%s=5", flags.FlagHeight), addr.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, fmt.Sprintf(`{"rewards":[{"validator_address":"%s","reward":[{"denom":"stake","amount":"387.100000000000000000"}]}],"total":[{"denom":"stake","amount":"387.100000000000000000"}]}`, valAddr.String()), @@ -352,7 +351,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegatorRewards() { []string{ fmt.Sprintf("--%s=5", flags.FlagHeight), addr.String(), valAddr.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, `{"rewards":[{"denom":"stake","amount":"387.100000000000000000"}]}`, @@ -360,7 +359,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegatorRewards() { { "text output", []string{ - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=5", flags.FlagHeight), addr.String(), }, @@ -377,7 +376,7 @@ total: { "text output (specific validator)", []string{ - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=5", flags.FlagHeight), addr.String(), valAddr.String(), }, @@ -419,12 +418,12 @@ func (s *IntegrationTestSuite) TestGetCmdQueryCommunityPool() { }{ { "json output", - []string{fmt.Sprintf("--%s=3", flags.FlagHeight), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=3", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `{"pool":[{"denom":"stake","amount":"4.740000000000000000"}]}`, }, { "text output", - []string{fmt.Sprintf("--%s=text", ostcli.OutputFlag), fmt.Sprintf("--%s=3", flags.FlagHeight)}, + []string{fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=3", flags.FlagHeight)}, `pool: - amount: "4.740000000000000000" denom: stake`, diff --git a/x/distribution/keeper/keeper.go b/x/distribution/keeper/keeper.go index e3fd0399b1..966b1d519e 100644 --- a/x/distribution/keeper/keeper.go +++ b/x/distribution/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/x/distribution/module.go b/x/distribution/module.go index 4b320a4894..b5ab03481b 100644 --- a/x/distribution/module.go +++ b/x/distribution/module.go @@ -10,8 +10,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - sdkclient "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" cdctypes "github.com/Finschia/finschia-sdk/codec/types" @@ -164,7 +162,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns the begin blocker for the distribution module. -func (am AppModule) BeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(ctx, req, am.keeper) } diff --git a/x/distribution/simulation/operations_test.go b/x/distribution/simulation/operations_test.go index 145506127d..60d3bd9c85 100644 --- a/x/distribution/simulation/operations_test.go +++ b/x/distribution/simulation/operations_test.go @@ -5,10 +5,9 @@ import ( "testing" "github.com/stretchr/testify/suite" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" simappparams "github.com/Finschia/finschia-sdk/simapp/params" sdk "github.com/Finschia/finschia-sdk/types" @@ -63,7 +62,7 @@ func (suite *SimTestSuite) TestSimulateMsgSetWithdrawAddress() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgSetWithdrawAddress(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper) @@ -105,7 +104,7 @@ func (suite *SimTestSuite) TestSimulateMsgWithdrawDelegatorReward() { suite.setupValidatorRewards(validator0.GetOperator()) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgWithdrawDelegatorReward(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper, suite.app.StakingKeeper) @@ -162,7 +161,7 @@ func (suite *SimTestSuite) testSimulateMsgWithdrawValidatorCommission(tokenName suite.app.DistrKeeper.SetValidatorAccumulatedCommission(suite.ctx, validator0.GetOperator(), distrtypes.ValidatorAccumulatedCommission{Commission: valCommission}) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgWithdrawValidatorCommission(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper, suite.app.StakingKeeper) @@ -189,7 +188,7 @@ func (suite *SimTestSuite) TestSimulateMsgFundCommunityPool() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - suite.app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + suite.app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgFundCommunityPool(suite.app.AccountKeeper, suite.app.BankKeeper, suite.app.DistrKeeper, suite.app.StakingKeeper) diff --git a/x/evidence/abci.go b/x/evidence/abci.go index 5c1cbecf88..da3b9e1983 100644 --- a/x/evidence/abci.go +++ b/x/evidence/abci.go @@ -6,8 +6,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/telemetry" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/evidence/keeper" @@ -16,7 +14,7 @@ import ( // BeginBlocker iterates through and handles any newly discovered evidence of // misbehavior submitted by Tendermint. Currently, only equivocation is handled. -func BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock, k keeper.Keeper) { +func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) for _, tmEvidence := range req.ByzantineValidators { diff --git a/x/evidence/exported/evidence.go b/x/evidence/exported/evidence.go index 1b652512e6..a3167a8f34 100644 --- a/x/evidence/exported/evidence.go +++ b/x/evidence/exported/evidence.go @@ -2,8 +2,7 @@ package exported import ( "github.com/gogo/protobuf/proto" - - ostbytes "github.com/Finschia/ostracon/libs/bytes" + tmbytes "github.com/tendermint/tendermint/libs/bytes" sdk "github.com/Finschia/finschia-sdk/types" ) @@ -16,7 +15,7 @@ type Evidence interface { Route() string Type() string String() string - Hash() ostbytes.HexBytes + Hash() tmbytes.HexBytes ValidateBasic() error // Height at which the infraction occurred diff --git a/x/evidence/genesis_test.go b/x/evidence/genesis_test.go index c63de58094..6c64d6b424 100644 --- a/x/evidence/genesis_test.go +++ b/x/evidence/genesis_test.go @@ -6,8 +6,7 @@ import ( "github.com/stretchr/testify/suite" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/Finschia/ostracon/types/time" + "github.com/tendermint/tendermint/types/time" "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" "github.com/Finschia/finschia-sdk/simapp" diff --git a/x/evidence/keeper/grpc_query_test.go b/x/evidence/keeper/grpc_query_test.go index 3eff6ecc77..38884abd24 100644 --- a/x/evidence/keeper/grpc_query_test.go +++ b/x/evidence/keeper/grpc_query_test.go @@ -3,7 +3,7 @@ package keeper_test import ( "fmt" - ostbytes "github.com/Finschia/ostracon/libs/bytes" + tmbytes "github.com/tendermint/tendermint/libs/bytes" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/types/query" @@ -34,7 +34,7 @@ func (suite *KeeperTestSuite) TestQueryEvidence() { { "invalid request with empty evidence hash", func() { - req = &types.QueryEvidenceRequest{EvidenceHash: ostbytes.HexBytes{}} + req = &types.QueryEvidenceRequest{EvidenceHash: tmbytes.HexBytes{}} }, false, func(res *types.QueryEvidenceResponse) {}, diff --git a/x/evidence/keeper/keeper.go b/x/evidence/keeper/keeper.go index eb2e9a3d39..67b98352e2 100644 --- a/x/evidence/keeper/keeper.go +++ b/x/evidence/keeper/keeper.go @@ -3,8 +3,8 @@ package keeper import ( "fmt" - ostbytes "github.com/Finschia/ostracon/libs/bytes" - "github.com/Finschia/ostracon/libs/log" + tmbytes "github.com/tendermint/tendermint/libs/bytes" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/store/prefix" @@ -106,7 +106,7 @@ func (k Keeper) SetEvidence(ctx sdk.Context, evidence exported.Evidence) { // GetEvidence retrieves Evidence by hash if it exists. If no Evidence exists for // the given hash, (nil, false) is returned. -func (k Keeper) GetEvidence(ctx sdk.Context, hash ostbytes.HexBytes) (exported.Evidence, bool) { +func (k Keeper) GetEvidence(ctx sdk.Context, hash tmbytes.HexBytes) (exported.Evidence, bool) { store := prefix.NewStore(ctx.KVStore(k.storeKey), types.KeyPrefixEvidence) bz := store.Get(hash) diff --git a/x/evidence/module.go b/x/evidence/module.go index ed36dd0087..74c91b3650 100644 --- a/x/evidence/module.go +++ b/x/evidence/module.go @@ -10,8 +10,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -174,7 +172,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock executes all ABCI BeginBlock logic respective to the evidence module. -func (am AppModule) BeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(ctx, req, am.keeper) } diff --git a/x/evidence/types/evidence.go b/x/evidence/types/evidence.go index 6eae1b10d2..494907a0cc 100644 --- a/x/evidence/types/evidence.go +++ b/x/evidence/types/evidence.go @@ -5,11 +5,10 @@ import ( "time" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/crypto/tmhash" + tmbytes "github.com/tendermint/tendermint/libs/bytes" "gopkg.in/yaml.v2" - "github.com/Finschia/ostracon/crypto/tmhash" - ostbytes "github.com/Finschia/ostracon/libs/bytes" - sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/evidence/exported" ) @@ -34,7 +33,7 @@ func (e *Equivocation) String() string { } // Hash returns the hash of an Equivocation object. -func (e *Equivocation) Hash() ostbytes.HexBytes { +func (e *Equivocation) Hash() tmbytes.HexBytes { bz, err := e.Marshal() if err != nil { panic(err) @@ -86,7 +85,7 @@ func (e Equivocation) GetValidatorPower() int64 { // GetTotalPower is a no-op for the Equivocation type. func (e Equivocation) GetTotalPower() int64 { return 0 } -// FromABCIEvidence converts a Ostracon concrete Evidence type to +// FromABCIEvidence converts a Tendermint concrete Evidence type to // SDK Evidence using Equivocation as the concrete type. func FromABCIEvidence(e abci.Evidence) exported.Evidence { bech32PrefixConsAddr := sdk.GetConfig().GetBech32ConsensusAddrPrefix() diff --git a/x/evidence/types/genesis_test.go b/x/evidence/types/genesis_test.go index c1bc30b065..21ed25e846 100644 --- a/x/evidence/types/genesis_test.go +++ b/x/evidence/types/genesis_test.go @@ -6,8 +6,7 @@ import ( "time" "github.com/stretchr/testify/require" - - ostbytes "github.com/Finschia/ostracon/libs/bytes" + tmbytes "github.com/tendermint/tendermint/libs/bytes" "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -176,8 +175,8 @@ func (*TestEvidence) String() string { func (*TestEvidence) ProtoMessage() {} func (*TestEvidence) Reset() {} -func (*TestEvidence) Hash() ostbytes.HexBytes { - return ostbytes.HexBytes([]byte("test-hash")) +func (*TestEvidence) Hash() tmbytes.HexBytes { + return tmbytes.HexBytes([]byte("test-hash")) } func (*TestEvidence) ValidateBasic() error { diff --git a/x/evidence/types/querier.go b/x/evidence/types/querier.go index f16869aef4..c1bf5bccec 100644 --- a/x/evidence/types/querier.go +++ b/x/evidence/types/querier.go @@ -1,7 +1,7 @@ package types import ( - ostbytes "github.com/Finschia/ostracon/libs/bytes" + tmbytes "github.com/tendermint/tendermint/libs/bytes" query "github.com/Finschia/finschia-sdk/types/query" ) @@ -13,7 +13,7 @@ const ( ) // NewQueryEvidenceRequest creates a new instance of QueryEvidenceRequest. -func NewQueryEvidenceRequest(hash ostbytes.HexBytes) *QueryEvidenceRequest { +func NewQueryEvidenceRequest(hash tmbytes.HexBytes) *QueryEvidenceRequest { return &QueryEvidenceRequest{EvidenceHash: hash} } diff --git a/x/evidence/types/query.pb.go b/x/evidence/types/query.pb.go index 9b51df7f4a..9d9ae4473a 100644 --- a/x/evidence/types/query.pb.go +++ b/x/evidence/types/query.pb.go @@ -8,10 +8,10 @@ import ( fmt "fmt" types "github.com/Finschia/finschia-sdk/codec/types" query "github.com/Finschia/finschia-sdk/types/query" - github_com_Finschia_ostracon_libs_bytes "github.com/Finschia/ostracon/libs/bytes" _ "github.com/gogo/protobuf/gogoproto" grpc1 "github.com/gogo/protobuf/grpc" proto "github.com/gogo/protobuf/proto" + github_com_tendermint_tendermint_libs_bytes "github.com/tendermint/tendermint/libs/bytes" _ "google.golang.org/genproto/googleapis/api/annotations" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" @@ -35,7 +35,7 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // QueryEvidenceRequest is the request type for the Query/Evidence RPC method. type QueryEvidenceRequest struct { // evidence_hash defines the hash of the requested evidence. - EvidenceHash github_com_Finschia_ostracon_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=evidence_hash,json=evidenceHash,proto3,casttype=github.com/Finschia/ostracon/libs/bytes.HexBytes" json:"evidence_hash,omitempty"` + EvidenceHash github_com_tendermint_tendermint_libs_bytes.HexBytes `protobuf:"bytes,1,opt,name=evidence_hash,json=evidenceHash,proto3,casttype=github.com/tendermint/tendermint/libs/bytes.HexBytes" json:"evidence_hash,omitempty"` } func (m *QueryEvidenceRequest) Reset() { *m = QueryEvidenceRequest{} } @@ -71,7 +71,7 @@ func (m *QueryEvidenceRequest) XXX_DiscardUnknown() { var xxx_messageInfo_QueryEvidenceRequest proto.InternalMessageInfo -func (m *QueryEvidenceRequest) GetEvidenceHash() github_com_Finschia_ostracon_libs_bytes.HexBytes { +func (m *QueryEvidenceRequest) GetEvidenceHash() github_com_tendermint_tendermint_libs_bytes.HexBytes { if m != nil { return m.EvidenceHash } @@ -239,37 +239,37 @@ func init() { } var fileDescriptor_07043de1a84d215a = []byte{ - // 471 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0xbf, 0x6f, 0xd4, 0x30, - 0x14, 0xc7, 0xcf, 0x87, 0x40, 0x95, 0x5b, 0x16, 0xeb, 0x50, 0x4b, 0x84, 0x02, 0xa4, 0x12, 0xbf, - 0xa4, 0xda, 0x97, 0x96, 0x85, 0xb1, 0x27, 0x51, 0x8a, 0x58, 0x20, 0x1b, 0x2c, 0xc8, 0x49, 0xdd, - 0xc4, 0x22, 0xb5, 0x73, 0x67, 0xa7, 0x6a, 0x84, 0x58, 0xf8, 0x0b, 0x90, 0x10, 0x23, 0x1b, 0x7f, - 0x0c, 0x13, 0xaa, 0xc4, 0xc2, 0x84, 0xd0, 0x1d, 0x7f, 0x05, 0x13, 0x8a, 0xed, 0x5c, 0xaf, 0xf7, - 0x83, 0xa3, 0xdb, 0xb3, 0xfd, 0xde, 0xf7, 0xfb, 0xf1, 0x7b, 0x0f, 0x6e, 0x26, 0x52, 0x1d, 0x49, - 0x45, 0xd8, 0x31, 0x3f, 0x60, 0x22, 0x61, 0xe4, 0x38, 0x8c, 0x99, 0xa6, 0x21, 0xe9, 0x97, 0x6c, - 0x50, 0xe1, 0x62, 0x20, 0xb5, 0x44, 0xeb, 0x36, 0x09, 0x37, 0x49, 0xd8, 0x25, 0x79, 0x0f, 0x5c, - 0x75, 0x4c, 0x15, 0xb3, 0x15, 0xe3, 0xfa, 0x82, 0xa6, 0x5c, 0x50, 0xcd, 0xa5, 0xb0, 0x22, 0x5e, - 0x27, 0x95, 0xa9, 0x34, 0x21, 0xa9, 0x23, 0x77, 0x7b, 0x3d, 0x95, 0x32, 0xcd, 0x19, 0x31, 0xa7, - 0xb8, 0x3c, 0x24, 0x54, 0x38, 0x57, 0xef, 0x86, 0x7b, 0xa2, 0x05, 0x27, 0x54, 0x08, 0xa9, 0x8d, - 0x9a, 0xb2, 0xaf, 0x41, 0x1f, 0x76, 0x5e, 0xd4, 0x86, 0x8f, 0x1d, 0x53, 0xc4, 0xfa, 0x25, 0x53, - 0x1a, 0xbd, 0x84, 0x57, 0x1b, 0xcc, 0xd7, 0x19, 0x55, 0xd9, 0x06, 0xb8, 0x05, 0xee, 0xad, 0xf5, - 0x1e, 0xfe, 0xf9, 0x79, 0xb3, 0x9b, 0x72, 0x9d, 0x95, 0x31, 0x4e, 0xe4, 0x11, 0xd9, 0xe3, 0x42, - 0x25, 0x19, 0xa7, 0x44, 0x2a, 0x3d, 0xa0, 0x89, 0x14, 0x24, 0xe7, 0xb1, 0x22, 0x71, 0xa5, 0x99, - 0xc2, 0xfb, 0xec, 0xa4, 0x57, 0x07, 0xd1, 0x5a, 0x23, 0xb5, 0x4f, 0x55, 0x16, 0x3c, 0x85, 0xd7, - 0xa6, 0x2c, 0x55, 0x21, 0x85, 0x62, 0xa8, 0x0b, 0x57, 0x9a, 0x44, 0x63, 0xb7, 0xba, 0xdd, 0xc1, - 0x16, 0x1e, 0x37, 0xff, 0xc2, 0xbb, 0xa2, 0x8a, 0xc6, 0x59, 0x01, 0x85, 0xeb, 0x46, 0x6a, 0x37, - 0xcf, 0xa7, 0x3f, 0xb0, 0x07, 0xe1, 0x59, 0xef, 0x9c, 0xdc, 0x1d, 0xec, 0x26, 0x50, 0x37, 0x1a, - 0xdb, 0xd1, 0xb8, 0x46, 0xe3, 0xe7, 0x34, 0x6d, 0x6a, 0xa3, 0x89, 0xca, 0xe0, 0x13, 0x80, 0x1b, - 0xb3, 0x1e, 0x73, 0x89, 0x2f, 0x2d, 0x27, 0x46, 0x4f, 0xce, 0x61, 0xb5, 0x0d, 0xd6, 0xdd, 0xa5, - 0x58, 0xd6, 0x6e, 0x92, 0x6b, 0xfb, 0x5b, 0x1b, 0x5e, 0x36, 0x5c, 0xe8, 0x0b, 0x80, 0x2b, 0x0d, - 0x19, 0xda, 0xc2, 0x0b, 0x96, 0x0c, 0xcf, 0x1b, 0xb3, 0x87, 0xff, 0x37, 0xdd, 0x12, 0x04, 0x8f, - 0xde, 0x7f, 0xff, 0xfd, 0xb1, 0xbd, 0x83, 0x42, 0xb2, 0x68, 0xe1, 0xc7, 0x17, 0x6f, 0xcf, 0xed, - 0xcf, 0x3b, 0xf4, 0x19, 0xc0, 0xd5, 0x89, 0x1e, 0xa2, 0xee, 0xbf, 0xad, 0x67, 0x47, 0xea, 0x85, - 0x17, 0xa8, 0x70, 0xbc, 0xf7, 0x0d, 0xef, 0x26, 0xba, 0xbd, 0x94, 0xb7, 0xf7, 0xec, 0xeb, 0xd0, - 0x07, 0xa7, 0x43, 0x1f, 0xfc, 0x1a, 0xfa, 0xe0, 0xc3, 0xc8, 0x6f, 0x9d, 0x8e, 0xfc, 0xd6, 0x8f, - 0x91, 0xdf, 0x7a, 0x15, 0xce, 0x5b, 0xf8, 0x43, 0x17, 0x6c, 0xa9, 0x83, 0x37, 0xe4, 0xe4, 0x4c, - 0x57, 0x57, 0x05, 0x53, 0xf1, 0x15, 0x33, 0xfe, 0x9d, 0xbf, 0x01, 0x00, 0x00, 0xff, 0xff, 0xe7, - 0x18, 0x01, 0x45, 0x18, 0x04, 0x00, 0x00, + // 474 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x92, 0x4d, 0x6b, 0xd4, 0x40, + 0x18, 0xc7, 0x77, 0x56, 0x94, 0x32, 0xad, 0x97, 0x61, 0xa5, 0x35, 0x48, 0xd4, 0x14, 0x7c, 0x83, + 0xce, 0x34, 0xad, 0x07, 0x3d, 0x76, 0xc1, 0x5a, 0xf1, 0xa2, 0x39, 0x0a, 0x22, 0x93, 0xec, 0x34, + 0x19, 0xcc, 0xce, 0xa4, 0x3b, 0x93, 0xd2, 0x20, 0x5e, 0xfc, 0x04, 0x82, 0x78, 0xf4, 0xe6, 0x87, + 0xf1, 0x24, 0x05, 0x2f, 0x9e, 0x44, 0x76, 0xfd, 0x14, 0x9e, 0x24, 0x33, 0x93, 0x6d, 0xda, 0xee, + 0xba, 0x7a, 0x7b, 0x92, 0x79, 0x9e, 0xff, 0xff, 0xf7, 0xbc, 0xc0, 0xf5, 0x44, 0xaa, 0xa1, 0x54, + 0x84, 0x1d, 0xf2, 0x01, 0x13, 0x09, 0x23, 0x87, 0x61, 0xcc, 0x34, 0x0d, 0xc9, 0x41, 0xc9, 0x46, + 0x15, 0x2e, 0x46, 0x52, 0x4b, 0xb4, 0x6a, 0x93, 0x70, 0x93, 0x84, 0x5d, 0x92, 0x77, 0xcf, 0x55, + 0xc7, 0x54, 0x31, 0x5b, 0x31, 0xad, 0x2f, 0x68, 0xca, 0x05, 0xd5, 0x5c, 0x0a, 0x2b, 0xe2, 0xf5, + 0x52, 0x99, 0x4a, 0x13, 0x92, 0x3a, 0x72, 0x7f, 0xaf, 0xa6, 0x52, 0xa6, 0x39, 0x23, 0xe6, 0x2b, + 0x2e, 0xf7, 0x09, 0x15, 0xce, 0xd5, 0xbb, 0xe6, 0x9e, 0x68, 0xc1, 0x09, 0x15, 0x42, 0x6a, 0xa3, + 0xa6, 0xec, 0x6b, 0x50, 0xc2, 0xde, 0xf3, 0xda, 0xf0, 0x91, 0x63, 0x8a, 0xd8, 0x41, 0xc9, 0x94, + 0x46, 0x2f, 0xe1, 0xe5, 0x06, 0xf3, 0x55, 0x46, 0x55, 0xb6, 0x06, 0x6e, 0x80, 0x3b, 0x2b, 0xfd, + 0x07, 0xbf, 0x7f, 0x5c, 0xbf, 0x9f, 0x72, 0x9d, 0x95, 0x31, 0x4e, 0xe4, 0x90, 0x68, 0x26, 0x06, + 0x6c, 0x34, 0xe4, 0x42, 0xb7, 0xc3, 0x9c, 0xc7, 0x8a, 0xc4, 0x95, 0x66, 0x0a, 0xef, 0xb1, 0xa3, + 0x7e, 0x1d, 0x44, 0x2b, 0x8d, 0xdc, 0x1e, 0x55, 0x59, 0xf0, 0x04, 0x5e, 0x39, 0x63, 0xab, 0x0a, + 0x29, 0x14, 0x43, 0x9b, 0x70, 0xa9, 0x49, 0x34, 0x96, 0xcb, 0x5b, 0x3d, 0x6c, 0x1b, 0xc0, 0x4d, + 0x6f, 0x78, 0x47, 0x54, 0xd1, 0x34, 0x2b, 0xa0, 0x70, 0xd5, 0x48, 0xed, 0xe4, 0xf9, 0xd9, 0x26, + 0x76, 0x21, 0x3c, 0x99, 0x9f, 0x93, 0xbb, 0x85, 0xdd, 0x16, 0xea, 0x61, 0x63, 0xbb, 0x1e, 0x37, + 0x6c, 0xfc, 0x8c, 0xa6, 0x4d, 0x6d, 0xd4, 0xaa, 0x0c, 0x3e, 0x02, 0xb8, 0x76, 0xde, 0x63, 0x26, + 0xf1, 0x85, 0xc5, 0xc4, 0xe8, 0xf1, 0x29, 0xac, 0xae, 0xc1, 0xba, 0xbd, 0x10, 0xcb, 0xda, 0xb5, + 0xb9, 0xb6, 0xbe, 0x76, 0xe1, 0x45, 0xc3, 0x85, 0x3e, 0x03, 0xb8, 0xd4, 0x90, 0xa1, 0x0d, 0x3c, + 0xe7, 0xd0, 0xf0, 0xac, 0x55, 0x7b, 0xf8, 0x5f, 0xd3, 0x2d, 0x41, 0xf0, 0xf0, 0xdd, 0xb7, 0x5f, + 0x1f, 0xba, 0xdb, 0x28, 0x24, 0xf3, 0x8e, 0x7e, 0xfa, 0xe3, 0xcd, 0xa9, 0x1b, 0x7a, 0x8b, 0x3e, + 0x01, 0xb8, 0xdc, 0x9a, 0x21, 0xda, 0xfc, 0xbb, 0xf5, 0xf9, 0x95, 0x7a, 0xe1, 0x7f, 0x54, 0x38, + 0xde, 0xbb, 0x86, 0x77, 0x1d, 0xdd, 0x5c, 0xc8, 0xdb, 0x7f, 0xfa, 0x65, 0xec, 0x83, 0xe3, 0xb1, + 0x0f, 0x7e, 0x8e, 0x7d, 0xf0, 0x7e, 0xe2, 0x77, 0x8e, 0x27, 0x7e, 0xe7, 0xfb, 0xc4, 0xef, 0xbc, + 0x08, 0x5b, 0x47, 0xbf, 0xcb, 0x85, 0x4a, 0x32, 0x4e, 0xc9, 0xbe, 0x0b, 0x36, 0xd4, 0xe0, 0x35, + 0x39, 0x3a, 0xd1, 0xd5, 0x55, 0xc1, 0x54, 0x7c, 0xc9, 0xac, 0x7f, 0xfb, 0x4f, 0x00, 0x00, 0x00, + 0xff, 0xff, 0xc7, 0xde, 0x6c, 0x2c, 0x1c, 0x04, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. diff --git a/x/feegrant/client/testutil/suite.go b/x/feegrant/client/testutil/suite.go index 839dca4f30..cac943e7b7 100644 --- a/x/feegrant/client/testutil/suite.go +++ b/x/feegrant/client/testutil/suite.go @@ -8,8 +8,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -129,7 +128,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrant() { []string{ "wrong_granter", grantee.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, "decoding bech32 failed", true, nil, nil, @@ -139,7 +138,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrant() { []string{ granter.String(), "wrong_grantee", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, "decoding bech32 failed", true, nil, nil, @@ -149,7 +148,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrant() { []string{ "link19lrl5da53xtd2yssw2799y53uyaskadqkzv0ky", grantee.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, "fee-grant not found", true, nil, nil, @@ -159,7 +158,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrant() { []string{ granter.String(), grantee.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, "", false, @@ -212,7 +211,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGrantee() { "wrong grantee", []string{ "wrong_grantee", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, nil, 0, }, @@ -220,7 +219,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGrantee() { "non existent grantee", []string{ "link19lrl5da53xtd2yssw2799y53uyaskadqkzv0ky", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, &feegrant.QueryAllowancesResponse{}, 0, }, @@ -228,7 +227,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGrantee() { "valid req", []string{ grantee.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, &feegrant.QueryAllowancesResponse{}, 1, }, @@ -268,7 +267,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGranter() { "wrong grantee", []string{ "wrong_grantee", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, nil, 0, }, @@ -276,7 +275,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGranter() { "non existent grantee", []string{ "link1nph3cfzk6trsmfxkeu943nvach5qw4vw99nwdh", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, &feegrant.QueryAllowancesByGranterResponse{}, 0, }, @@ -284,7 +283,7 @@ func (s *IntegrationTestSuite) TestCmdGetFeeGrantsByGranter() { "valid req", []string{ granter.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, &feegrant.QueryAllowancesByGranterResponse{}, 1, }, @@ -851,7 +850,7 @@ func (s *IntegrationTestSuite) TestFilteredFeeAllowance() { args := []string{ granter.String(), grantee.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } // get filtered fee allowance and check info diff --git a/x/feegrant/keeper/keeper.go b/x/feegrant/keeper/keeper.go index 4db35bfdda..7b9bb87d95 100644 --- a/x/feegrant/keeper/keeper.go +++ b/x/feegrant/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/x/feegrant/simulation/operations_test.go b/x/feegrant/simulation/operations_test.go index d7009c490d..3b64c676f2 100644 --- a/x/feegrant/simulation/operations_test.go +++ b/x/feegrant/simulation/operations_test.go @@ -6,10 +6,9 @@ import ( "time" "github.com/stretchr/testify/suite" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" simappparams "github.com/Finschia/finschia-sdk/simapp/params" sdk "github.com/Finschia/finschia-sdk/types" @@ -104,7 +103,7 @@ func (suite *SimTestSuite) TestSimulateMsgGrantAllowance() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgGrantAllowance(app.AccountKeeper, app.BankKeeper, app.FeeGrantKeeper) @@ -130,7 +129,7 @@ func (suite *SimTestSuite) TestSimulateMsgRevokeAllowance() { accounts := suite.getTestingAccounts(r, 3) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: suite.app.LastBlockHeight() + 1, AppHash: suite.app.LastCommitID().Hash}}) feeAmt := app.StakingKeeper.TokensFromConsensusPower(ctx, 200000) feeCoins := sdk.NewCoins(sdk.NewCoin("foo", feeAmt)) diff --git a/x/foundation/client/testutil/query.go b/x/foundation/client/testutil/query.go index 6f3e372eb0..a7d16e38d2 100644 --- a/x/foundation/client/testutil/query.go +++ b/x/foundation/client/testutil/query.go @@ -4,8 +4,7 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" @@ -18,7 +17,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdParams() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -67,7 +66,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdTreasury() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -108,7 +107,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdFoundationInfo() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -149,7 +148,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdMember() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -207,7 +206,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdMembers() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -248,7 +247,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdProposal() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -298,7 +297,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdProposals() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -339,7 +338,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdVote() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -399,7 +398,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdVotes() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -449,7 +448,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdTallyResult() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -499,7 +498,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdCensorships() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -544,7 +543,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdGrants() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { diff --git a/x/foundation/keeper/internal/keeper.go b/x/foundation/keeper/internal/keeper.go index cbde14b5a3..0b824d21ae 100644 --- a/x/foundation/keeper/internal/keeper.go +++ b/x/foundation/keeper/internal/keeper.go @@ -1,7 +1,7 @@ package internal import ( - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/codec" diff --git a/x/foundation/module/module.go b/x/foundation/module/module.go index befca53514..5f506b7c34 100644 --- a/x/foundation/module/module.go +++ b/x/foundation/module/module.go @@ -9,8 +9,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -145,7 +143,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return consensusVersion } // BeginBlock performs a no-op. -func (am AppModule) BeginBlock(ctx sdk.Context, _ ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { keeper.BeginBlocker(ctx, am.keeper) } diff --git a/x/genutil/client/cli/collect.go b/x/genutil/client/cli/collect.go index ed08661d98..f35020881f 100644 --- a/x/genutil/client/cli/collect.go +++ b/x/genutil/client/cli/collect.go @@ -6,8 +6,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -37,7 +36,7 @@ func CollectGenTxsCmd(genBalIterator types.GenesisBalancesIterator, defaultNodeH return errors.Wrap(err, "failed to initialize node validator files") } - genDoc, err := octypes.GenesisDocFromFile(config.GenesisFile()) + genDoc, err := tmtypes.GenesisDocFromFile(config.GenesisFile()) if err != nil { return errors.Wrap(err, "failed to read genesis doc from file") } diff --git a/x/genutil/client/cli/gentx.go b/x/genutil/client/cli/gentx.go index 982baa54ff..c813d2f1ec 100644 --- a/x/genutil/client/cli/gentx.go +++ b/x/genutil/client/cli/gentx.go @@ -11,9 +11,8 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - - ostos "github.com/Finschia/ostracon/libs/os" - octypes "github.com/Finschia/ostracon/types" + tmos "github.com/tendermint/tendermint/libs/os" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -83,7 +82,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o } } - genDoc, err := octypes.GenesisDocFromFile(config.GenesisFile()) + genDoc, err := tmtypes.GenesisDocFromFile(config.GenesisFile()) if err != nil { return errors.Wrapf(err, "failed to read genesis doc file %s", config.GenesisFile()) } @@ -215,7 +214,7 @@ $ %s gentx my-key-name 1000000stake --home=/path/to/home/dir --keyring-backend=o func makeOutputFilepath(rootDir, nodeID string) (string, error) { writePath := filepath.Join(rootDir, "config", "gentx") - if err := ostos.EnsureDir(writePath, 0o700); err != nil { + if err := tmos.EnsureDir(writePath, 0o700); err != nil { return "", err } diff --git a/x/genutil/client/cli/init.go b/x/genutil/client/cli/init.go index 261ab10b47..2de44a44a7 100644 --- a/x/genutil/client/cli/init.go +++ b/x/genutil/client/cli/init.go @@ -10,12 +10,11 @@ import ( "github.com/cosmos/go-bip39" "github.com/pkg/errors" "github.com/spf13/cobra" - - cfg "github.com/Finschia/ostracon/config" - "github.com/Finschia/ostracon/libs/cli" - ostos "github.com/Finschia/ostracon/libs/os" - ostrand "github.com/Finschia/ostracon/libs/rand" - "github.com/Finschia/ostracon/types" + cfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/libs/cli" + tmos "github.com/tendermint/tendermint/libs/os" + tmrand "github.com/tendermint/tendermint/libs/rand" + "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -81,7 +80,7 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { chainID, _ := cmd.Flags().GetString(flags.FlagChainID) if chainID == "" { - chainID = fmt.Sprintf("test-chain-%v", ostrand.Str(6)) + chainID = fmt.Sprintf("test-chain-%v", tmrand.Str(6)) } // Get bip39 mnemonic @@ -110,7 +109,7 @@ func InitCmd(mbm module.BasicManager, defaultNodeHome string) *cobra.Command { genFile := config.GenesisFile() overwrite, _ := cmd.Flags().GetBool(FlagOverwrite) - if !overwrite && ostos.FileExists(genFile) { + if !overwrite && tmos.FileExists(genFile) { return fmt.Errorf("genesis.json file already exists: %v", genFile) } diff --git a/x/genutil/client/cli/init_test.go b/x/genutil/client/cli/init_test.go index a0c79603a6..5cc05093a1 100644 --- a/x/genutil/client/cli/init_test.go +++ b/x/genutil/client/cli/init_test.go @@ -12,10 +12,9 @@ import ( "github.com/spf13/viper" "github.com/stretchr/testify/require" - - abci_server "github.com/Finschia/ostracon/abci/server" - "github.com/Finschia/ostracon/libs/cli" - "github.com/Finschia/ostracon/libs/log" + abci_server "github.com/tendermint/tendermint/abci/server" + "github.com/tendermint/tendermint/libs/cli" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" diff --git a/x/genutil/client/cli/migrate.go b/x/genutil/client/cli/migrate.go index ed9569d27a..755cd2a6ea 100644 --- a/x/genutil/client/cli/migrate.go +++ b/x/genutil/client/cli/migrate.go @@ -8,8 +8,7 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" - - ocjson "github.com/Finschia/ostracon/libs/json" + tmjson "github.com/tendermint/tendermint/libs/json" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/client/flags" @@ -113,7 +112,7 @@ $ %s migrate v0.43 /path/to/genesis.json --chain-id=test-chain-1 --genesis-time= genDoc.ChainID = chainID } - bz, err := ocjson.Marshal(genDoc) + bz, err := tmjson.Marshal(genDoc) if err != nil { return errors.Wrap(err, "failed to marshal genesis doc") } diff --git a/x/genutil/client/cli/validate_genesis.go b/x/genutil/client/cli/validate_genesis.go index ee867cb1d6..15c211e3a0 100644 --- a/x/genutil/client/cli/validate_genesis.go +++ b/x/genutil/client/cli/validate_genesis.go @@ -5,8 +5,7 @@ import ( "fmt" "github.com/spf13/cobra" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/server" @@ -58,8 +57,8 @@ func ValidateGenesisCmd(mbm module.BasicManager) *cobra.Command { // validateGenDoc reads a genesis file and validates that it is a correct // Tendermint GenesisDoc. This function does not do any cosmos-related // validation. -func validateGenDoc(importGenesisFile string) (*octypes.GenesisDoc, error) { - genDoc, err := octypes.GenesisDocFromFile(importGenesisFile) +func validateGenDoc(importGenesisFile string) (*tmtypes.GenesisDoc, error) { + genDoc, err := tmtypes.GenesisDocFromFile(importGenesisFile) if err != nil { return nil, fmt.Errorf("%s. Make sure that"+ " you have correctly migrated all Tendermint consensus params, please see the"+ diff --git a/x/genutil/client/testutil/helpers.go b/x/genutil/client/testutil/helpers.go index 95fbf5eb2f..80d88dae25 100644 --- a/x/genutil/client/testutil/helpers.go +++ b/x/genutil/client/testutil/helpers.go @@ -5,10 +5,9 @@ import ( "fmt" "github.com/spf13/viper" - - ostcfg "github.com/Finschia/ostracon/config" - "github.com/Finschia/ostracon/libs/cli" - "github.com/Finschia/ostracon/libs/log" + tmcfg "github.com/tendermint/tendermint/config" + "github.com/tendermint/tendermint/libs/cli" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" @@ -41,10 +40,10 @@ func ExecInitCmd(testMbm module.BasicManager, home string, cdc codec.Codec) erro return cmd.ExecuteContext(ctx) } -func CreateDefaultTendermintConfig(rootDir string) (*ostcfg.Config, error) { - conf := ostcfg.DefaultConfig() +func CreateDefaultTendermintConfig(rootDir string) (*tmcfg.Config, error) { + conf := tmcfg.DefaultConfig() conf.SetRoot(rootDir) - ostcfg.EnsureRoot(rootDir) + tmcfg.EnsureRoot(rootDir) if err := conf.ValidateBasic(); err != nil { return nil, fmt.Errorf("error in config file: %v", err) diff --git a/x/genutil/collect.go b/x/genutil/collect.go index e423aca72c..d9b5e4dad5 100644 --- a/x/genutil/collect.go +++ b/x/genutil/collect.go @@ -12,8 +12,8 @@ import ( "sort" "strings" - cfg "github.com/Finschia/ostracon/config" - octypes "github.com/Finschia/ostracon/types" + cfg "github.com/tendermint/tendermint/config" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" @@ -25,7 +25,7 @@ import ( // GenAppStateFromConfig gets the genesis app state from the config func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodingConfig, - config *cfg.Config, initCfg types.InitConfig, genDoc octypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, + config *cfg.Config, initCfg types.InitConfig, genDoc tmtypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, ) (appState json.RawMessage, err error) { // process genesis transactions, else create default genesis.json appGenTxs, persistentPeers, err := CollectTxs( @@ -68,7 +68,7 @@ func GenAppStateFromConfig(cdc codec.JSONCodec, txEncodingConfig client.TxEncodi // CollectTxs processes and validates application's genesis Txs and returns // the list of appGenTxs, and persistent peers required to generate genesis.json. func CollectTxs(cdc codec.JSONCodec, txJSONDecoder sdk.TxDecoder, moniker, genTxsDir string, - genDoc octypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, + genDoc tmtypes.GenesisDoc, genBalIterator types.GenesisBalancesIterator, ) (appGenTxs []sdk.Tx, persistentPeers string, err error) { // prepare a map of all balances in genesis state to then validate // against the validators addresses diff --git a/x/genutil/collect_test.go b/x/genutil/collect_test.go index 92967dd4dc..a10ff688e4 100644 --- a/x/genutil/collect_test.go +++ b/x/genutil/collect_test.go @@ -7,8 +7,7 @@ import ( "testing" "github.com/gogo/protobuf/proto" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/codec" cdctypes "github.com/Finschia/finschia-sdk/codec/types" @@ -57,7 +56,7 @@ func TestCollectTxsHandlesDirectories(t *testing.T) { srvCtx := server.NewDefaultContext() _ = srvCtx cdc := codec.NewProtoCodec(cdctypes.NewInterfaceRegistry()) - gdoc := octypes.GenesisDoc{AppState: []byte("{}")} + gdoc := tmtypes.GenesisDoc{AppState: []byte("{}")} balItr := new(doNothingIterator) dnc := &doNothingUnmarshalJSON{cdc} diff --git a/x/genutil/types/genesis_state.go b/x/genutil/types/genesis_state.go index e9836363dc..a37c1b3678 100644 --- a/x/genutil/types/genesis_state.go +++ b/x/genutil/types/genesis_state.go @@ -5,8 +5,8 @@ import ( "errors" "fmt" - ostos "github.com/Finschia/ostracon/libs/os" - octypes "github.com/Finschia/ostracon/types" + tmos "github.com/tendermint/tendermint/libs/os" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" @@ -67,7 +67,7 @@ func SetGenesisStateInAppState( // for the application. // // NOTE: The pubkey input is this machines pubkey. -func GenesisStateFromGenDoc(genDoc octypes.GenesisDoc) (genesisState map[string]json.RawMessage, err error) { +func GenesisStateFromGenDoc(genDoc tmtypes.GenesisDoc) (genesisState map[string]json.RawMessage, err error) { if err = json.Unmarshal(genDoc.AppState, &genesisState); err != nil { return genesisState, err } @@ -78,13 +78,13 @@ func GenesisStateFromGenDoc(genDoc octypes.GenesisDoc) (genesisState map[string] // for the application. // // NOTE: The pubkey input is this machines pubkey. -func GenesisStateFromGenFile(genFile string) (genesisState map[string]json.RawMessage, genDoc *octypes.GenesisDoc, err error) { - if !ostos.FileExists(genFile) { +func GenesisStateFromGenFile(genFile string) (genesisState map[string]json.RawMessage, genDoc *tmtypes.GenesisDoc, err error) { + if !tmos.FileExists(genFile) { return genesisState, genDoc, fmt.Errorf("%s does not exist, run `init` first", genFile) } - genDoc, err = octypes.GenesisDocFromFile(genFile) + genDoc, err = tmtypes.GenesisDocFromFile(genFile) if err != nil { return genesisState, genDoc, err } diff --git a/x/genutil/utils.go b/x/genutil/utils.go index afb8463296..529d2b3e11 100644 --- a/x/genutil/utils.go +++ b/x/genutil/utils.go @@ -7,13 +7,12 @@ import ( "time" "github.com/cosmos/go-bip39" - - cfg "github.com/Finschia/ostracon/config" - osted25519 "github.com/Finschia/ostracon/crypto/ed25519" - ostos "github.com/Finschia/ostracon/libs/os" - "github.com/Finschia/ostracon/p2p" - "github.com/Finschia/ostracon/privval" - octypes "github.com/Finschia/ostracon/types" + cfg "github.com/tendermint/tendermint/config" + tmed25519 "github.com/tendermint/tendermint/crypto/ed25519" + tmos "github.com/tendermint/tendermint/libs/os" + "github.com/tendermint/tendermint/p2p" + "github.com/tendermint/tendermint/privval" + tmtypes "github.com/tendermint/tendermint/types" cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" @@ -21,7 +20,7 @@ import ( // ExportGenesisFile creates and writes the genesis configuration to disk. An // error is returned if building or writing the configuration to file fails. -func ExportGenesisFile(genDoc *octypes.GenesisDoc, genFile string) error { +func ExportGenesisFile(genDoc *tmtypes.GenesisDoc, genFile string) error { if err := genDoc.ValidateAndComplete(); err != nil { return err } @@ -32,10 +31,10 @@ func ExportGenesisFile(genDoc *octypes.GenesisDoc, genFile string) error { // ExportGenesisFileWithTime creates and writes the genesis configuration to disk. // An error is returned if building or writing the configuration to file fails. func ExportGenesisFileWithTime( - genFile, chainID string, validators []octypes.GenesisValidator, + genFile, chainID string, validators []tmtypes.GenesisValidator, appState json.RawMessage, genTime time.Time, ) error { - genDoc := octypes.GenesisDoc{ + genDoc := tmtypes.GenesisDoc{ GenesisTime: genTime, ChainID: chainID, Validators: validators, @@ -69,12 +68,12 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin nodeID = string(nodeKey.ID()) pvKeyFile := config.PrivValidatorKeyFile() - if err := ostos.EnsureDir(filepath.Dir(pvKeyFile), 0o777); err != nil { + if err := tmos.EnsureDir(filepath.Dir(pvKeyFile), 0o777); err != nil { return "", nil, err } pvStateFile := config.PrivValidatorStateFile() - if err := ostos.EnsureDir(filepath.Dir(pvStateFile), 0o777); err != nil { + if err := tmos.EnsureDir(filepath.Dir(pvStateFile), 0o777); err != nil { return "", nil, err } @@ -82,7 +81,7 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin if len(mnemonic) == 0 { filePV = privval.LoadOrGenFilePV(pvKeyFile, pvStateFile) } else { - privKey := osted25519.GenPrivKeyFromSecret([]byte(mnemonic)) + privKey := tmed25519.GenPrivKeyFromSecret([]byte(mnemonic)) filePV = privval.NewFilePV(privKey, pvKeyFile, pvStateFile) } @@ -91,7 +90,7 @@ func InitializeNodeValidatorFilesFromMnemonic(config *cfg.Config, mnemonic strin return "", nil, err } - valPubKey, err = cryptocodec.FromOcPubKeyInterface(tmValPubKey) + valPubKey, err = cryptocodec.FromTmPubKeyInterface(tmValPubKey) if err != nil { return "", nil, err } diff --git a/x/genutil/utils_test.go b/x/genutil/utils_test.go index fd8fc1c019..b406ed3e98 100644 --- a/x/genutil/utils_test.go +++ b/x/genutil/utils_test.go @@ -8,8 +8,7 @@ import ( "time" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/config" + "github.com/tendermint/tendermint/config" ) func TestExportGenesisFileWithTime(t *testing.T) { diff --git a/x/gov/abci_test.go b/x/gov/abci_test.go index db7f1a42c4..d593d63eb3 100644 --- a/x/gov/abci_test.go +++ b/x/gov/abci_test.go @@ -6,10 +6,9 @@ import ( "github.com/golang/protobuf/proto" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/gov" @@ -23,7 +22,7 @@ func TestTickExpiredDepositPeriod(t *testing.T) { addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -75,7 +74,7 @@ func TestTickMultipleExpiredDepositPeriod(t *testing.T) { addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -152,7 +151,7 @@ func TestTickPassedDepositPeriod(t *testing.T) { addrs := simapp.AddTestAddrs(app, ctx, 10, valTokens) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -211,7 +210,7 @@ func TestTickPassedVotingPeriod(t *testing.T) { SortAddresses(addrs) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) govHandler := gov.NewHandler(app.GovKeeper) @@ -282,7 +281,7 @@ func TestProposalPassedEndblocker(t *testing.T) { stakingHandler := staking.NewHandler(app.StakingKeeper) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) valAddr := sdk.ValAddress(addrs[0]) @@ -331,7 +330,7 @@ func TestEndBlockerProposalHandlerFailed(t *testing.T) { stakingHandler := staking.NewHandler(app.StakingKeeper) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) valAddr := sdk.ValAddress(addrs[0]) diff --git a/x/gov/client/testutil/deposits.go b/x/gov/client/testutil/deposits.go index f98229b65e..aee399c5a9 100644 --- a/x/gov/client/testutil/deposits.go +++ b/x/gov/client/testutil/deposits.go @@ -5,8 +5,7 @@ import ( "time" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" "github.com/Finschia/finschia-sdk/testutil/network" @@ -110,7 +109,7 @@ func (s *DepositTestSuite) TestQueryProposalNotEnoughDeposits() { s.Require().NoError(err) // query proposal - args := []string{"3", fmt.Sprintf("--%s=json", ostcli.OutputFlag)} + args := []string{"3", fmt.Sprintf("--%s=json", tmcli.OutputFlag)} cmd := cli.GetCmdQueryProposal() _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().NoError(err) @@ -137,7 +136,7 @@ func (s *DepositTestSuite) TestRejectedProposalDeposits() { // query deposits var deposits types.QueryDepositsResponse - args := []string{"4", fmt.Sprintf("--%s=json", ostcli.OutputFlag)} + args := []string{"4", fmt.Sprintf("--%s=json", tmcli.OutputFlag)} cmd := cli.GetCmdQueryDeposits() out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) s.Require().NoError(err) @@ -152,7 +151,7 @@ func (s *DepositTestSuite) TestRejectedProposalDeposits() { time.Sleep(20 * time.Second) - args = []string{"4", fmt.Sprintf("--%s=json", ostcli.OutputFlag)} + args = []string{"4", fmt.Sprintf("--%s=json", tmcli.OutputFlag)} cmd = cli.GetCmdQueryProposal() _, err = clitestutil.ExecTestCLICmd(clientCtx, cmd, args) s.Require().NoError(err) @@ -165,7 +164,7 @@ func (s *DepositTestSuite) TestRejectedProposalDeposits() { } func (s *DepositTestSuite) queryDeposits(val *network.Validator, proposalID string, exceptErr bool) types.Deposits { - args := []string{proposalID, fmt.Sprintf("--%s=json", ostcli.OutputFlag)} + args := []string{proposalID, fmt.Sprintf("--%s=json", tmcli.OutputFlag)} var depositsRes types.Deposits cmd := cli.GetCmdQueryDeposits() out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) @@ -179,7 +178,7 @@ func (s *DepositTestSuite) queryDeposits(val *network.Validator, proposalID stri } func (s *DepositTestSuite) queryDeposit(val *network.Validator, proposalID string, exceptErr bool) *types.Deposit { - args := []string{proposalID, val.Address.String(), fmt.Sprintf("--%s=json", ostcli.OutputFlag)} + args := []string{proposalID, val.Address.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)} var depositRes types.Deposit cmd := cli.GetCmdQueryDeposit() out, err := clitestutil.ExecTestCLICmd(val.ClientCtx, cmd, args) diff --git a/x/gov/client/testutil/suite.go b/x/gov/client/testutil/suite.go index a42c39e9ea..b9be407318 100644 --- a/x/gov/client/testutil/suite.go +++ b/x/gov/client/testutil/suite.go @@ -6,8 +6,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/testutil" @@ -86,7 +85,7 @@ func (s *IntegrationTestSuite) TestCmdParams() { }{ { "json output", - []string{fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `{"voting_params":{"voting_period":"172800000000000"},"tally_params":{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"},"deposit_params":{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}}`, }, { @@ -134,7 +133,7 @@ func (s *IntegrationTestSuite) TestCmdParam() { "voting params", []string{ "voting", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, `{"voting_period":"172800000000000"}`, }, @@ -142,7 +141,7 @@ func (s *IntegrationTestSuite) TestCmdParam() { "tally params", []string{ "tallying", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, `{"quorum":"0.334000000000000000","threshold":"0.500000000000000000","veto_threshold":"0.334000000000000000"}`, }, @@ -150,7 +149,7 @@ func (s *IntegrationTestSuite) TestCmdParam() { "deposit params", []string{ "deposit", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, `{"min_deposit":[{"denom":"stake","amount":"10000000"}],"max_deposit_period":"172800000000000"}`, }, @@ -182,7 +181,7 @@ func (s *IntegrationTestSuite) TestCmdProposer() { { "without proposal id", []string{ - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, ``, @@ -191,7 +190,7 @@ func (s *IntegrationTestSuite) TestCmdProposer() { "json output", []string{ "1", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, fmt.Sprintf("{\"proposal_id\":\"%s\",\"proposer\":\"%s\"}", "1", val.Address.String()), @@ -228,7 +227,7 @@ func (s *IntegrationTestSuite) TestCmdTally() { { "without proposal id", []string{ - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, types.TallyResult{}, @@ -237,7 +236,7 @@ func (s *IntegrationTestSuite) TestCmdTally() { "json output", []string{ "2", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, types.NewTallyResult(sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), @@ -246,7 +245,7 @@ func (s *IntegrationTestSuite) TestCmdTally() { "json output", []string{ "1", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, types.NewTallyResult(s.cfg.BondedTokens, sdk.NewInt(0), sdk.NewInt(0), sdk.NewInt(0)), @@ -378,7 +377,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposal() { "get non existing proposal", []string{ "10", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -386,7 +385,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposal() { "get proposal with json response", []string{ "1", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -423,7 +422,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposals() { { "get proposals as json response", []string{ - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -431,7 +430,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposals() { "get proposals with invalid status", []string{ "--status=unknown", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -439,7 +438,7 @@ func (s *IntegrationTestSuite) TestCmdGetProposals() { "wrong number of arguments", []string{ "extra", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -485,7 +484,7 @@ func (s *IntegrationTestSuite) TestCmdQueryDeposits() { "get deposits(valid req)", []string{ "1", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -541,7 +540,7 @@ func (s *IntegrationTestSuite) TestCmdQueryDeposit() { []string{ "1", val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -670,7 +669,7 @@ func (s *IntegrationTestSuite) TestCmdQueryVotes() { "vote for invalid proposal", []string{ "1", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -729,7 +728,7 @@ func (s *IntegrationTestSuite) TestCmdQueryVote() { []string{ "1", val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, types.NewNonSplitVoteOption(types.OptionYes), @@ -739,7 +738,7 @@ func (s *IntegrationTestSuite) TestCmdQueryVote() { []string{ "3", val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, types.WeightedVoteOptions{ diff --git a/x/gov/client/utils/query_test.go b/x/gov/client/utils/query_test.go index dc54ee1b86..8510ee48de 100644 --- a/x/gov/client/utils/query_test.go +++ b/x/gov/client/utils/query_test.go @@ -6,10 +6,9 @@ import ( "testing" "github.com/stretchr/testify/require" - - "github.com/Finschia/ostracon/rpc/client/mock" - ctypes "github.com/Finschia/ostracon/rpc/core/types" - octypes "github.com/Finschia/ostracon/types" + "github.com/tendermint/tendermint/rpc/client/mock" + ctypes "github.com/tendermint/tendermint/rpc/core/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/simapp" @@ -22,7 +21,7 @@ import ( type TxSearchMock struct { txConfig client.TxConfig mock.Client - txs []octypes.Tx + txs []tmtypes.Tx } func (mock TxSearchMock) TxSearch(ctx context.Context, query string, prove bool, page, perPage *int, orderBy string) (*ctypes.ResultTxSearch, error) { @@ -39,7 +38,7 @@ func (mock TxSearchMock) TxSearch(ctx context.Context, query string, prove bool, msgType := messageAction.FindStringSubmatch(query)[1] // Filter only the txs that match the query - matchingTxs := make([]octypes.Tx, 0) + matchingTxs := make([]tmtypes.Tx, 0) for _, tx := range mock.txs { sdkTx, err := mock.txConfig.TxDecoder()(tx) if err != nil { @@ -72,7 +71,7 @@ func (mock TxSearchMock) TxSearch(ctx context.Context, query string, prove bool, func (mock TxSearchMock) Block(ctx context.Context, height *int64) (*ctypes.ResultBlock, error) { // any non nil Block needs to be returned. used to get time value - return &ctypes.ResultBlock{Block: &octypes.Block{}}, nil + return &ctypes.ResultBlock{Block: &tmtypes.Block{}}, nil } func TestGetPaginatedVotes(t *testing.T) { @@ -164,7 +163,7 @@ func TestGetPaginatedVotes(t *testing.T) { tc := tc t.Run(tc.description, func(t *testing.T) { - marshaled := make([]octypes.Tx, len(tc.msgs)) + marshaled := make([]tmtypes.Tx, len(tc.msgs)) cli := TxSearchMock{txs: marshaled, txConfig: encCfg.TxConfig} clientCtx := client.Context{}. WithLegacyAmino(encCfg.Amino). diff --git a/x/gov/genesis_test.go b/x/gov/genesis_test.go index b6dba61a9c..9564284dee 100644 --- a/x/gov/genesis_test.go +++ b/x/gov/genesis_test.go @@ -6,12 +6,10 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/auth" @@ -29,7 +27,7 @@ func TestImportExportQueues(t *testing.T) { SortAddresses(addrs) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) ctx = app.BaseApp.NewContext(false, tmproto.Header{}) @@ -82,10 +80,10 @@ func TestImportExportQueues(t *testing.T) { ) app2.Commit() - app2.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app2.LastBlockHeight() + 1}}) + app2.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app2.LastBlockHeight() + 1}}) header = tmproto.Header{Height: app2.LastBlockHeight() + 1} - app2.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app2.BeginBlock(abci.RequestBeginBlock{Header: header}) ctx2 := app2.BaseApp.NewContext(false, tmproto.Header{}) @@ -143,7 +141,7 @@ func TestEqualProposals(t *testing.T) { SortAddresses(addrs) header := tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) // Submit two proposals proposal := TestProposal diff --git a/x/gov/keeper/keeper.go b/x/gov/keeper/keeper.go index 8f74bc44da..6b9791a8b1 100644 --- a/x/gov/keeper/keeper.go +++ b/x/gov/keeper/keeper.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/x/gov/simulation/operations_test.go b/x/gov/simulation/operations_test.go index 640b87c4b2..cb4b006b63 100644 --- a/x/gov/simulation/operations_test.go +++ b/x/gov/simulation/operations_test.go @@ -7,10 +7,9 @@ import ( "time" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" simappparams "github.com/Finschia/finschia-sdk/simapp/params" sdk "github.com/Finschia/finschia-sdk/types" @@ -105,7 +104,7 @@ func TestSimulateMsgSubmitProposal(t *testing.T) { accounts := getTestingAccounts(t, r, app, ctx, 3) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgSubmitProposal(app.AccountKeeper, app.BankKeeper, app.GovKeeper, MockWeightedProposalContent{3}.ContentSimulatorFn()) @@ -149,7 +148,7 @@ func TestSimulateMsgDeposit(t *testing.T) { app.GovKeeper.SetProposal(ctx, proposal) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgDeposit(app.AccountKeeper, app.BankKeeper, app.GovKeeper) @@ -192,7 +191,7 @@ func TestSimulateMsgVote(t *testing.T) { app.GovKeeper.ActivateVotingPeriod(ctx, proposal) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgVote(app.AccountKeeper, app.BankKeeper, app.GovKeeper) @@ -235,7 +234,7 @@ func TestSimulateMsgVoteWeighted(t *testing.T) { app.GovKeeper.ActivateVotingPeriod(ctx, proposal) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgVoteWeighted(app.AccountKeeper, app.BankKeeper, app.GovKeeper) diff --git a/x/mint/client/testutil/suite.go b/x/mint/client/testutil/suite.go index fd3d0f86fc..a8a78637dd 100644 --- a/x/mint/client/testutil/suite.go +++ b/x/mint/client/testutil/suite.go @@ -5,8 +5,7 @@ import ( "strings" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" @@ -66,12 +65,12 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { }{ { "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `{"mint_denom":"stake","inflation_rate_change":"0.130000000000000000","inflation_max":"1.000000000000000000","inflation_min":"1.000000000000000000","goal_bonded":"0.670000000000000000","blocks_per_year":"6311520"}`, }, { "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `blocks_per_year: "6311520" goal_bonded: "0.670000000000000000" inflation_max: "1.000000000000000000" @@ -105,12 +104,12 @@ func (s *IntegrationTestSuite) TestGetCmdQueryInflation() { }{ { "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `1.000000000000000000`, }, { "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `1.000000000000000000`, }, } @@ -139,12 +138,12 @@ func (s *IntegrationTestSuite) TestGetCmdQueryAnnualProvisions() { }{ { "json output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `500000000.000000000000000000`, }, { "text output", - []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=1", flags.FlagHeight), fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `500000000.000000000000000000`, }, } diff --git a/x/mint/keeper/keeper.go b/x/mint/keeper/keeper.go index bbf1961e49..03a6a907fc 100644 --- a/x/mint/keeper/keeper.go +++ b/x/mint/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/x/mint/module.go b/x/mint/module.go index f98bf5b2c8..d13d8024bd 100644 --- a/x/mint/module.go +++ b/x/mint/module.go @@ -10,8 +10,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" cdctypes "github.com/Finschia/finschia-sdk/codec/types" @@ -148,7 +146,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns the begin blocker for the mint module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { BeginBlocker(ctx, am.keeper) } diff --git a/x/params/client/testutil/suite.go b/x/params/client/testutil/suite.go index 72a4e9032c..74953d16b2 100644 --- a/x/params/client/testutil/suite.go +++ b/x/params/client/testutil/suite.go @@ -5,8 +5,7 @@ import ( "strings" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" "github.com/Finschia/finschia-sdk/testutil/network" @@ -50,7 +49,7 @@ func (s *IntegrationTestSuite) TestNewQuerySubspaceParamsCmd() { "json output", []string{ "staking", "MaxValidators", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, `{"subspace":"staking","key":"MaxValidators","value":"100"}`, }, @@ -58,7 +57,7 @@ func (s *IntegrationTestSuite) TestNewQuerySubspaceParamsCmd() { "text output", []string{ "staking", "MaxValidators", - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), }, `key: MaxValidators subspace: staking diff --git a/x/params/keeper/keeper.go b/x/params/keeper/keeper.go index 3f2ad76cf4..c9c8a431c4 100644 --- a/x/params/keeper/keeper.go +++ b/x/params/keeper/keeper.go @@ -1,7 +1,7 @@ package keeper import ( - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/x/params/types/subspace_test.go b/x/params/types/subspace_test.go index da7e0cd73a..1882f47b58 100644 --- a/x/params/types/subspace_test.go +++ b/x/params/types/subspace_test.go @@ -6,11 +6,10 @@ import ( "time" "github.com/stretchr/testify/suite" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/simapp" "github.com/Finschia/finschia-sdk/store" diff --git a/x/simulation/mock_ostracon.go b/x/simulation/mock_tendermint.go similarity index 88% rename from x/simulation/mock_ostracon.go rename to x/simulation/mock_tendermint.go index 54625d4379..5f6185ad04 100644 --- a/x/simulation/mock_ostracon.go +++ b/x/simulation/mock_tendermint.go @@ -8,11 +8,9 @@ import ( "time" abci "github.com/tendermint/tendermint/abci/types" + cryptoenc "github.com/tendermint/tendermint/crypto/encoding" + tmbytes "github.com/tendermint/tendermint/libs/bytes" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - ocabci "github.com/Finschia/ostracon/abci/types" - cryptoenc "github.com/Finschia/ostracon/crypto/encoding" - ostbytes "github.com/Finschia/ostracon/libs/bytes" ) type mockValidator struct { @@ -62,7 +60,7 @@ func (vals mockValidators) getKeys() []string { } // randomProposer picks a random proposer from the current validator set -func (vals mockValidators) randomProposer(r *rand.Rand) ostbytes.HexBytes { +func (vals mockValidators) randomProposer(r *rand.Rand) tmbytes.HexBytes { keys := vals.getKeys() if len(keys) == 0 { return nil @@ -71,7 +69,7 @@ func (vals mockValidators) randomProposer(r *rand.Rand) ostbytes.HexBytes { key := keys[r.Intn(len(keys))] proposer := vals[key].val - pk, err := cryptoenc.PubKeyFromProto(&proposer.PubKey) + pk, err := cryptoenc.PubKeyFromProto(proposer.PubKey) if err != nil { //nolint:wsl panic(err) } @@ -79,7 +77,7 @@ func (vals mockValidators) randomProposer(r *rand.Rand) ostbytes.HexBytes { return pk.Address() } -// updateValidators mimics Ostracon's update logic. +// updateValidators mimics tendermint's update logic. func updateValidators( tb testing.TB, r *rand.Rand, @@ -121,9 +119,9 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, validators mockValidators, pastTimes []time.Time, pastVoteInfos [][]abci.VoteInfo, event func(route, op, evResult string), header tmproto.Header, -) ocabci.RequestBeginBlock { +) abci.RequestBeginBlock { if len(validators) == 0 { - return ocabci.RequestBeginBlock{ + return abci.RequestBeginBlock{ Header: header, } } @@ -151,7 +149,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, event("begin_block", "signing", "missed") } - pubkey, err := cryptoenc.PubKeyFromProto(&mVal.val.PubKey) + pubkey, err := cryptoenc.PubKeyFromProto(mVal.val.PubKey) if err != nil { panic(err) } @@ -167,7 +165,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, // return if no past times if len(pastTimes) == 0 { - return ocabci.RequestBeginBlock{ + return abci.RequestBeginBlock{ Header: header, LastCommitInfo: abci.LastCommitInfo{ Votes: voteInfos, @@ -184,7 +182,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, vals := voteInfos if r.Float64() < params.PastEvidenceFraction() && header.Height > 1 { - height = int64(r.Intn(int(header.Height)-1)) + 1 // Ostracon starts at height 1 + height = int64(r.Intn(int(header.Height)-1)) + 1 // tendermint starts at height 1 // array indices offset by one time = pastTimes[height-1] vals = pastVoteInfos[height-1] @@ -210,7 +208,7 @@ func RandomRequestBeginBlock(r *rand.Rand, params Params, event("begin_block", "evidence", "ok") } - return ocabci.RequestBeginBlock{ + return abci.RequestBeginBlock{ Header: header, LastCommitInfo: abci.LastCommitInfo{ Votes: voteInfos, diff --git a/x/simulation/params.go b/x/simulation/params.go index 7269a21e28..9b0d24a70f 100644 --- a/x/simulation/params.go +++ b/x/simulation/params.go @@ -7,8 +7,7 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - "github.com/Finschia/ostracon/types" + "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/types/simulation" diff --git a/x/slashing/abci.go b/x/slashing/abci.go index 6870452534..d3d991ddb2 100644 --- a/x/slashing/abci.go +++ b/x/slashing/abci.go @@ -3,7 +3,7 @@ package slashing import ( "time" - ocabci "github.com/Finschia/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" "github.com/Finschia/finschia-sdk/telemetry" sdk "github.com/Finschia/finschia-sdk/types" @@ -13,7 +13,7 @@ import ( // BeginBlocker check for infraction evidence or downtime of validators // on every begin block -func BeginBlocker(ctx sdk.Context, req ocabci.RequestBeginBlock, k keeper.Keeper) { +func BeginBlocker(ctx sdk.Context, req abci.RequestBeginBlock, k keeper.Keeper) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) // Iterate over all the validators which *should* have signed this block diff --git a/x/slashing/abci_test.go b/x/slashing/abci_test.go index 990bf0e2c8..7764e9fc24 100644 --- a/x/slashing/abci_test.go +++ b/x/slashing/abci_test.go @@ -8,8 +8,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/slashing" @@ -43,7 +41,7 @@ func TestBeginBlocker(t *testing.T) { } // mark the validator as having signed - req := ocabci.RequestBeginBlock{ + req := abci.RequestBeginBlock{ LastCommitInfo: abci.LastCommitInfo{ Votes: []abci.VoteInfo{{ Validator: val, @@ -66,7 +64,7 @@ func TestBeginBlocker(t *testing.T) { // for 1000 blocks, mark the validator as having signed for ; height < app.SlashingKeeper.SignedBlocksWindow(ctx); height++ { ctx = ctx.WithBlockHeight(height) - req = ocabci.RequestBeginBlock{ + req = abci.RequestBeginBlock{ LastCommitInfo: abci.LastCommitInfo{ Votes: []abci.VoteInfo{{ Validator: val, @@ -81,7 +79,7 @@ func TestBeginBlocker(t *testing.T) { // for 500 blocks, mark the validator as having not signed for ; height < ((app.SlashingKeeper.SignedBlocksWindow(ctx) * 2) - app.SlashingKeeper.MinSignedPerWindow(ctx) + 1); height++ { ctx = ctx.WithBlockHeight(height) - req = ocabci.RequestBeginBlock{ + req = abci.RequestBeginBlock{ LastCommitInfo: abci.LastCommitInfo{ Votes: []abci.VoteInfo{{ Validator: val, diff --git a/x/slashing/app_test.go b/x/slashing/app_test.go index bff61cdaec..c16aecb564 100644 --- a/x/slashing/app_test.go +++ b/x/slashing/app_test.go @@ -5,10 +5,9 @@ import ( "testing" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" "github.com/Finschia/finschia-sdk/crypto/keys/secp256k1" "github.com/Finschia/finschia-sdk/simapp" @@ -78,7 +77,7 @@ func TestSlashingMsgs(t *testing.T) { simapp.CheckBalance(t, app, addr1, sdk.Coins{genCoin.Sub(bondCoin)}) header = tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) validator := checkValidator(t, app, addr1, true) require.Equal(t, sdk.ValAddress(addr1).String(), validator.OperatorAddress) diff --git a/x/slashing/client/testutil/suite.go b/x/slashing/client/testutil/suite.go index 831b248cf5..718e84e5a7 100644 --- a/x/slashing/client/testutil/suite.go +++ b/x/slashing/client/testutil/suite.go @@ -6,8 +6,7 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" @@ -62,7 +61,7 @@ func (s *IntegrationTestSuite) TestGetCmdQuerySigningInfo() { "valid address (json output)", []string{ pubKeyStr, - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, false, @@ -72,7 +71,7 @@ func (s *IntegrationTestSuite) TestGetCmdQuerySigningInfo() { "valid address (text output)", []string{ pubKeyStr, - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, false, @@ -113,12 +112,12 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { }{ { "json output", - []string{fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `{"signed_blocks_window":"100","min_signed_per_window":"0.500000000000000000","downtime_jail_duration":"600s","slash_fraction_double_sign":"0.050000000000000000","slash_fraction_downtime":"0.010000000000000000"}`, }, { "text output", - []string{fmt.Sprintf("--%s=text", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `downtime_jail_duration: 600s min_signed_per_window: "0.500000000000000000" signed_blocks_window: "100" diff --git a/x/slashing/keeper/hooks.go b/x/slashing/keeper/hooks.go index 69fb7e8a78..5bd1170500 100644 --- a/x/slashing/keeper/hooks.go +++ b/x/slashing/keeper/hooks.go @@ -3,7 +3,7 @@ package keeper import ( "time" - "github.com/Finschia/ostracon/crypto" + "github.com/tendermint/tendermint/crypto" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/slashing/types" diff --git a/x/slashing/keeper/keeper.go b/x/slashing/keeper/keeper.go index 8215c961b7..478cd4715e 100644 --- a/x/slashing/keeper/keeper.go +++ b/x/slashing/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" diff --git a/x/slashing/module.go b/x/slashing/module.go index 6576e7227a..45d9bb95bb 100644 --- a/x/slashing/module.go +++ b/x/slashing/module.go @@ -10,8 +10,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" cdctypes "github.com/Finschia/finschia-sdk/codec/types" @@ -159,7 +157,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns the begin blocker for the slashing module. -func (am AppModule) BeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(ctx, req, am.keeper) } diff --git a/x/slashing/simulation/operations_test.go b/x/slashing/simulation/operations_test.go index 2ba7d26ece..16fd87a962 100644 --- a/x/slashing/simulation/operations_test.go +++ b/x/slashing/simulation/operations_test.go @@ -6,10 +6,9 @@ import ( "time" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" simappparams "github.com/Finschia/finschia-sdk/simapp/params" sdk "github.com/Finschia/finschia-sdk/types" @@ -88,7 +87,7 @@ func TestSimulateMsgUnjail(t *testing.T) { app.DistrKeeper.SetDelegatorStartingInfo(ctx, validator0.GetOperator(), val0AccAddress.Bytes(), distrtypes.NewDelegatorStartingInfo(2, sdk.OneDec(), 200)) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgUnjail(app.AccountKeeper, app.BankKeeper, app.SlashingKeeper, app.StakingKeeper) diff --git a/x/staking/app_test.go b/x/staking/app_test.go index 899a69b1ed..42cb870d1d 100644 --- a/x/staking/app_test.go +++ b/x/staking/app_test.go @@ -4,10 +4,9 @@ import ( "testing" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" sdk "github.com/Finschia/finschia-sdk/types" authtypes "github.com/Finschia/finschia-sdk/x/auth/types" @@ -79,7 +78,7 @@ func TestStakingMsgs(t *testing.T) { simapp.CheckBalance(t, app, addr1, sdk.Coins{genCoin.Sub(bondCoin)}) header = tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) validator := checkValidator(t, app, sdk.ValAddress(addr1), true) require.Equal(t, sdk.ValAddress(addr1).String(), validator.OperatorAddress) @@ -87,7 +86,7 @@ func TestStakingMsgs(t *testing.T) { require.True(sdk.IntEq(t, bondTokens, validator.BondedTokens())) header = tmproto.Header{Height: app.LastBlockHeight() + 1} - app.BeginBlock(ocabci.RequestBeginBlock{Header: header}) + app.BeginBlock(abci.RequestBeginBlock{Header: header}) // edit the validator description = types.NewDescription("bar_moniker", "", "", "", "") diff --git a/x/staking/client/testutil/suite.go b/x/staking/client/testutil/suite.go index 451346fba4..3109c95bf9 100644 --- a/x/staking/client/testutil/suite.go +++ b/x/staking/client/testutil/suite.go @@ -8,10 +8,9 @@ import ( "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/suite" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/tendermint/tendermint/proto/tendermint/crypto" - - ostcli "github.com/Finschia/ostracon/libs/cli" - "github.com/Finschia/ostracon/rpc/client/http" + "github.com/tendermint/tendermint/rpc/client/http" "github.com/Finschia/finschia-sdk/client/flags" "github.com/Finschia/finschia-sdk/crypto/hd" @@ -230,17 +229,17 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidator() { }{ { "with invalid address ", - []string{"somethinginvalidaddress", fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{"somethinginvalidaddress", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, }, { "with valid and not existing address", - []string{"linkvaloper1mqn4snc20sxt6lrecjclmdglfdmtql4408kwvl", fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{"linkvaloper1mqn4snc20sxt6lrecjclmdglfdmtql4408kwvl", fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, true, }, { "happy case", - []string{val.ValAddress.String(), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{val.ValAddress.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, false, }, } @@ -273,14 +272,14 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidators() { { "one validator case", []string{ - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagLimit), }, 1, }, { "multi validator case", - []string{fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, len(s.network.Validators), }, } @@ -318,7 +317,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegation() { []string{ "wrongDelAddr", val2.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, nil, nil, }, @@ -327,7 +326,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegation() { []string{ val.Address.String(), "wrongValAddr", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, nil, nil, }, @@ -336,7 +335,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegation() { []string{ val.Address.String(), val2.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, &types.DelegationResponse{}, @@ -393,7 +392,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryDelegations() { "valid request (height specific)", []string{ val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, false, @@ -449,7 +448,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorDelegations() { "valid request(height specific)", []string{ val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, false, @@ -493,7 +492,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegations() { "wrong delegator address", []string{ "wrongDelAddr", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -501,7 +500,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegations() { "valid request", []string{ val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -542,7 +541,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegation() { []string{ "wrongDelAddr", val.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -551,7 +550,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegation() { []string{ val.Address.String(), "wrongValAddr", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -560,7 +559,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryUnbondingDelegation() { []string{ val.Address.String(), val.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -601,7 +600,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorUnbondingDelegations() { "wrong validator address", []string{ "wrongValAddr", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -609,7 +608,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorUnbondingDelegations() { "valid request", []string{ val.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -650,7 +649,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegations() { "wrong delegator address", []string{ "wrongdeladdr", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -658,7 +657,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegations() { "valid request", []string{ val.Address.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -704,7 +703,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegation() { "wrongdeladdr", val.ValAddress.String(), val2.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -714,7 +713,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegation() { val.Address.String(), "wrongSrcValAddress", val2.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -724,7 +723,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegation() { val.Address.String(), val.ValAddress.String(), "wrongDestValAddress", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -734,7 +733,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryRedelegation() { val.Address.String(), val.ValAddress.String(), val2.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -778,7 +777,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorRedelegations() { "wrong validator address", []string{ "wrongValAddr", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -786,7 +785,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryValidatorRedelegations() { "valid request", []string{ val.ValAddress.String(), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -829,7 +828,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryHistoricalInfo() { "wrong height", []string{ "-1", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, true, }, @@ -837,7 +836,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryHistoricalInfo() { "valid request", []string{ "1", - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), }, false, }, @@ -872,7 +871,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryParams() { }{ { "with text output", - []string{fmt.Sprintf("--%s=text", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=text", tmcli.OutputFlag)}, `bond_denom: stake historical_entries: 10000 max_entries: 7 @@ -881,7 +880,7 @@ unbonding_time: 1814400s`, }, { "with json output", - []string{fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, `{"unbonding_time":"1814400s","max_validators":100,"max_entries":7,"historical_entries":10000,"bond_denom":"stake"}`, }, } @@ -907,7 +906,7 @@ func (s *IntegrationTestSuite) TestGetCmdQueryPool() { { "with text", []string{ - fmt.Sprintf("--%s=text", ostcli.OutputFlag), + fmt.Sprintf("--%s=text", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, fmt.Sprintf(`bonded_tokens: "%s" @@ -916,7 +915,7 @@ not_bonded_tokens: "0"`, cli.DefaultTokens.Mul(sdk.NewInt(2)).String()), { "with json", []string{ - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), fmt.Sprintf("--%s=1", flags.FlagHeight), }, fmt.Sprintf(`{"not_bonded_tokens":"0","bonded_tokens":"%s"}`, cli.DefaultTokens.Mul(sdk.NewInt(2)).String()), @@ -1377,7 +1376,7 @@ func (s *IntegrationTestSuite) TestEditValidatorMoniker() { queryCmd := cli.GetCmdQueryValidator() res, err := clitestutil.ExecTestCLICmd( val.ClientCtx, queryCmd, - []string{val.ValAddress.String(), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{val.ValAddress.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, ) require.NoError(err) var result types.Validator @@ -1396,7 +1395,7 @@ func (s *IntegrationTestSuite) TestEditValidatorMoniker() { res, err = clitestutil.ExecTestCLICmd( val.ClientCtx, queryCmd, - []string{val.ValAddress.String(), fmt.Sprintf("--%s=json", ostcli.OutputFlag)}, + []string{val.ValAddress.String(), fmt.Sprintf("--%s=json", tmcli.OutputFlag)}, ) require.NoError(err) diff --git a/x/staking/genesis.go b/x/staking/genesis.go index e75d7d5659..4efd550b95 100644 --- a/x/staking/genesis.go +++ b/x/staking/genesis.go @@ -5,8 +5,7 @@ import ( "log" abci "github.com/tendermint/tendermint/abci/types" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" sdk "github.com/Finschia/finschia-sdk/types" @@ -194,18 +193,18 @@ func ExportGenesis(ctx sdk.Context, keeper keeper.Keeper) *types.GenesisState { } // WriteValidators returns a slice of bonded genesis validators. -func WriteValidators(ctx sdk.Context, keeper keeper.Keeper) (vals []octypes.GenesisValidator, err error) { +func WriteValidators(ctx sdk.Context, keeper keeper.Keeper) (vals []tmtypes.GenesisValidator, err error) { keeper.IterateLastValidators(ctx, func(_ int64, validator types.ValidatorI) (stop bool) { pk, err := validator.ConsPubKey() if err != nil { return true } - tmPk, err := cryptocodec.ToOcPubKeyInterface(pk) + tmPk, err := cryptocodec.ToTmPubKeyInterface(pk) if err != nil { return true } - vals = append(vals, octypes.GenesisValidator{ + vals = append(vals, tmtypes.GenesisValidator{ Address: sdk.ConsAddress(tmPk.Address()).Bytes(), PubKey: tmPk, Power: validator.GetConsensusPower(keeper.PowerReduction(ctx)), diff --git a/x/staking/handler_test.go b/x/staking/handler_test.go index cf1dea5a10..a969caf040 100644 --- a/x/staking/handler_test.go +++ b/x/staking/handler_test.go @@ -10,8 +10,7 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" "github.com/Finschia/finschia-sdk/crypto/keys/ed25519" @@ -135,9 +134,9 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { validator := tstaking.CheckValidator(addr1, types.Bonded, false) assert.Equal(t, addr1.String(), validator.OperatorAddress) - consKey, err := validator.OcConsPublicKey() + consKey, err := validator.TmConsPublicKey() require.NoError(t, err) - tmPk1, err := cryptocodec.ToOcProtoPublicKey(pk1) + tmPk1, err := cryptocodec.ToTmProtoPublicKey(pk1) require.NoError(t, err) assert.Equal(t, tmPk1, consKey) assert.Equal(t, valTokens, validator.BondedTokens()) @@ -160,9 +159,9 @@ func TestDuplicatesMsgCreateValidator(t *testing.T) { validator = tstaking.CheckValidator(addr2, types.Bonded, false) assert.Equal(t, addr2.String(), validator.OperatorAddress) - consPk, err := validator.OcConsPublicKey() + consPk, err := validator.TmConsPublicKey() require.NoError(t, err) - tmPk2, err := cryptocodec.ToOcProtoPublicKey(pk2) + tmPk2, err := cryptocodec.ToTmProtoPublicKey(pk2) require.NoError(t, err) assert.Equal(t, tmPk2, consPk) assert.True(sdk.IntEq(t, valTokens, validator.Tokens)) @@ -174,7 +173,7 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { initPower := int64(1000) app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, initPower, 1, sdk.TokensFromConsensusPower(initPower, sdk.DefaultPowerReduction)) ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ - Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{octypes.ABCIPubKeyTypeEd25519}}, + Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519}}, }) addr := valAddrs[0] @@ -188,7 +187,7 @@ func TestInvalidPubKeyTypeMsgCreateValidator(t *testing.T) { func TestBothPubKeyTypesMsgCreateValidator(t *testing.T) { app, ctx, _, valAddrs := bootstrapHandlerGenesisTest(t, 1000, 2, sdk.NewInt(1000)) ctx = ctx.WithConsensusParams(&abci.ConsensusParams{ - Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{octypes.ABCIPubKeyTypeEd25519, octypes.ABCIPubKeyTypeSecp256k1}}, + Validator: &tmproto.ValidatorParams{PubKeyTypes: []string{tmtypes.ABCIPubKeyTypeEd25519, tmtypes.ABCIPubKeyTypeSecp256k1}}, }) tstaking := teststaking.NewHelper(t, ctx, app.StakingKeeper) diff --git a/x/staking/keeper/keeper.go b/x/staking/keeper/keeper.go index e9623540ff..c844ac3b07 100644 --- a/x/staking/keeper/keeper.go +++ b/x/staking/keeper/keeper.go @@ -3,7 +3,7 @@ package keeper import ( "fmt" - "github.com/Finschia/ostracon/libs/log" + "github.com/tendermint/tendermint/libs/log" "github.com/Finschia/finschia-sdk/codec" sdk "github.com/Finschia/finschia-sdk/types" diff --git a/x/staking/keeper/msg_server.go b/x/staking/keeper/msg_server.go index 289b122f6d..637dd6e403 100644 --- a/x/staking/keeper/msg_server.go +++ b/x/staking/keeper/msg_server.go @@ -5,8 +5,7 @@ import ( "time" metrics "github.com/armon/go-metrics" - - oststrings "github.com/Finschia/ostracon/libs/strings" + tmstrings "github.com/tendermint/tendermint/libs/strings" cryptotypes "github.com/Finschia/finschia-sdk/crypto/types" "github.com/Finschia/finschia-sdk/telemetry" @@ -63,7 +62,7 @@ func (k msgServer) CreateValidator(goCtx context.Context, msg *types.MsgCreateVa cp := ctx.ConsensusParams() if cp != nil && cp.Validator != nil { - if !oststrings.StringInSlice(pk.Type(), cp.Validator.PubKeyTypes) { + if !tmstrings.StringInSlice(pk.Type(), cp.Validator.PubKeyTypes) { return nil, sdkerrors.Wrapf( types.ErrValidatorPubKeyTypeNotSupported, "got: %s, expected: %s", pk.Type(), cp.Validator.PubKeyTypes, diff --git a/x/staking/module.go b/x/staking/module.go index c9ec999167..81acce60b8 100644 --- a/x/staking/module.go +++ b/x/staking/module.go @@ -10,8 +10,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" cdctypes "github.com/Finschia/finschia-sdk/codec/types" @@ -162,7 +160,7 @@ func (am AppModule) ExportGenesis(ctx sdk.Context, cdc codec.JSONCodec) json.Raw func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock returns the begin blocker for the staking module. -func (am AppModule) BeginBlock(ctx sdk.Context, _ ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, _ abci.RequestBeginBlock) { BeginBlocker(ctx, am.keeper) } diff --git a/x/staking/simulation/operations_test.go b/x/staking/simulation/operations_test.go index 55cc37c7a6..e4e9a29d05 100644 --- a/x/staking/simulation/operations_test.go +++ b/x/staking/simulation/operations_test.go @@ -6,10 +6,9 @@ import ( "time" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/simapp" simappparams "github.com/Finschia/finschia-sdk/simapp/params" sdk "github.com/Finschia/finschia-sdk/types" @@ -72,7 +71,7 @@ func TestSimulateMsgCreateValidator(t *testing.T) { accounts := getTestingAccounts(t, r, app, ctx, 3) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash}}) // execute operation op := simulation.SimulateMsgCreateValidator(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -110,7 +109,7 @@ func TestSimulateMsgEditValidator(t *testing.T) { _ = getTestingValidator0(t, app, ctx, accounts) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgEditValidator(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -149,7 +148,7 @@ func TestSimulateMsgDelegate(t *testing.T) { setupValidatorRewards(app, ctx, validator0.GetOperator()) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgDelegate(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -195,7 +194,7 @@ func TestSimulateMsgUndelegate(t *testing.T) { setupValidatorRewards(app, ctx, validator0.GetOperator()) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation op := simulation.SimulateMsgUndelegate(app.AccountKeeper, app.BankKeeper, app.StakingKeeper) @@ -244,7 +243,7 @@ func TestSimulateMsgBeginRedelegate(t *testing.T) { setupValidatorRewards(app, ctx, validator1.GetOperator()) // begin a new block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: app.LastBlockHeight() + 1, AppHash: app.LastCommitID().Hash, Time: blockTime}}) // execute operation // SimulateMsgBeginRedelegate selects a validator randomly, so this test code was modified such that diff --git a/x/staking/teststaking/tm.go b/x/staking/teststaking/tm.go index d25d6d13b6..65837e89a6 100644 --- a/x/staking/teststaking/tm.go +++ b/x/staking/teststaking/tm.go @@ -1,40 +1,40 @@ package teststaking import ( - occrypto "github.com/Finschia/ostracon/crypto" - octypes "github.com/Finschia/ostracon/types" + tmcrypto "github.com/tendermint/tendermint/crypto" + tmtypes "github.com/tendermint/tendermint/types" cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/staking/types" ) -// GetOcConsPubKey gets the validator's public key as an occrypto.PubKey. -func GetOcConsPubKey(v types.Validator) (occrypto.PubKey, error) { +// GetTmConsPubKey gets the validator's public key as an tmcrypto.PubKey. +func GetTmConsPubKey(v types.Validator) (tmcrypto.PubKey, error) { pk, err := v.ConsPubKey() if err != nil { return nil, err } - return cryptocodec.ToOcPubKeyInterface(pk) + return cryptocodec.ToTmPubKeyInterface(pk) } -// ToOcValidator casts an SDK validator to a tendermint type Validator. -func ToOcValidator(v types.Validator, r sdk.Int) (*octypes.Validator, error) { - ocPk, err := GetOcConsPubKey(v) +// ToTmValidator casts an SDK validator to a tendermint type Validator. +func ToTmValidator(v types.Validator, r sdk.Int) (*tmtypes.Validator, error) { + tmPk, err := GetTmConsPubKey(v) if err != nil { return nil, err } - return octypes.NewValidator(ocPk, v.ConsensusPower(r)), nil + return tmtypes.NewValidator(tmPk, v.ConsensusPower(r)), nil } -// ToOcValidators casts all validators to the corresponding tendermint type. -func ToOcValidators(v types.Validators, r sdk.Int) ([]*octypes.Validator, error) { - validators := make([]*octypes.Validator, len(v)) +// ToTmValidators casts all validators to the corresponding tendermint type. +func ToTmValidators(v types.Validators, r sdk.Int) ([]*tmtypes.Validator, error) { + validators := make([]*tmtypes.Validator, len(v)) var err error for i, val := range v { - validators[i], err = ToOcValidator(val, r) + validators[i], err = ToTmValidator(val, r) if err != nil { return nil, err } diff --git a/x/staking/types/exported.go b/x/staking/types/exported.go index 139f6ba03f..a4a660e149 100644 --- a/x/staking/types/exported.go +++ b/x/staking/types/exported.go @@ -24,7 +24,7 @@ type ValidatorI interface { IsUnbonding() bool // check if has status unbonding GetOperator() sdk.ValAddress // operator address to receive/return validators coins ConsPubKey() (cryptotypes.PubKey, error) // validation consensus pubkey (cryptotypes.PubKey) - OcConsPublicKey() (tmprotocrypto.PublicKey, error) // validation consensus pubkey (Ostracon) + TmConsPublicKey() (tmprotocrypto.PublicKey, error) // validation consensus pubkey (Tendermint) GetConsAddr() (sdk.ConsAddress, error) // validation consensus address GetTokens() sdk.Int // validation tokens GetBondedTokens() sdk.Int // validator bonded tokens diff --git a/x/staking/types/validator.go b/x/staking/types/validator.go index d1006a3aa3..8ed264a8b4 100644 --- a/x/staking/types/validator.go +++ b/x/staking/types/validator.go @@ -110,7 +110,7 @@ func (v Validators) Swap(i, j int) { // ValidatorsByVotingPower implements sort.Interface for []Validator based on // the VotingPower and Address fields. // The validators are sorted first by their voting power (descending). Secondary index - Address (ascending). -// Copied from ostracon/types/validator_set.go +// Copied from tendermint/types/validator_set.go type ValidatorsByVotingPower []Validator func (valz ValidatorsByVotingPower) Len() int { return len(valz) } @@ -257,13 +257,13 @@ func (d Description) EnsureLength() (Description, error) { // ABCIValidatorUpdate returns an abci.ValidatorUpdate from a staking validator type // with the full validator power func (v Validator) ABCIValidatorUpdate(r sdk.Int) abci.ValidatorUpdate { - ocProtoPk, err := v.OcConsPublicKey() + tmProtoPk, err := v.TmConsPublicKey() if err != nil { panic(err) } return abci.ValidatorUpdate{ - PubKey: ocProtoPk, + PubKey: tmProtoPk, Power: v.ConsensusPower(r), } } @@ -271,13 +271,13 @@ func (v Validator) ABCIValidatorUpdate(r sdk.Int) abci.ValidatorUpdate { // ABCIValidatorUpdateZero returns an abci.ValidatorUpdate from a staking validator type // with zero power used for validator updates. func (v Validator) ABCIValidatorUpdateZero() abci.ValidatorUpdate { - ocprotoPk, err := v.OcConsPublicKey() + tmProtoPk, err := v.TmConsPublicKey() if err != nil { panic(err) } return abci.ValidatorUpdate{ - PubKey: ocprotoPk, + PubKey: tmProtoPk, Power: 0, } } @@ -478,14 +478,14 @@ func (v Validator) ConsPubKey() (cryptotypes.PubKey, error) { return pk, nil } -// OcConsPublicKey casts Validator.ConsensusPubkey to tmprotocrypto.PubKey. -func (v Validator) OcConsPublicKey() (tmprotocrypto.PublicKey, error) { +// TmConsPublicKey casts Validator.ConsensusPubkey to tmprotocrypto.PubKey. +func (v Validator) TmConsPublicKey() (tmprotocrypto.PublicKey, error) { pk, err := v.ConsPubKey() if err != nil { return tmprotocrypto.PublicKey{}, err } - tmPk, err := cryptocodec.ToOcProtoPublicKey(pk) + tmPk, err := cryptocodec.ToTmProtoPublicKey(pk) if err != nil { return tmprotocrypto.PublicKey{}, err } diff --git a/x/staking/types/validator_test.go b/x/staking/types/validator_test.go index 7f04924b95..42a2142e96 100644 --- a/x/staking/types/validator_test.go +++ b/x/staking/types/validator_test.go @@ -7,8 +7,7 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" - - octypes "github.com/Finschia/ostracon/types" + tmtypes "github.com/tendermint/tendermint/types" "github.com/Finschia/finschia-sdk/codec/legacy" cryptocodec "github.com/Finschia/finschia-sdk/crypto/codec" @@ -60,7 +59,7 @@ func TestUpdateDescription(t *testing.T) { func TestABCIValidatorUpdate(t *testing.T) { validator := newValidator(t, valAddr1, pk1) abciVal := validator.ABCIValidatorUpdate(sdk.DefaultPowerReduction) - pk, err := validator.OcConsPublicKey() + pk, err := validator.TmConsPublicKey() require.NoError(t, err) require.Equal(t, pk, abciVal.PubKey) require.Equal(t, validator.BondedTokens().Int64(), abciVal.Power) @@ -69,7 +68,7 @@ func TestABCIValidatorUpdate(t *testing.T) { func TestABCIValidatorUpdateZero(t *testing.T) { validator := newValidator(t, valAddr1, pk1) abciVal := validator.ABCIValidatorUpdateZero() - pk, err := validator.OcConsPublicKey() + pk, err := validator.TmConsPublicKey() require.NoError(t, err) require.Equal(t, pk, abciVal.PubKey) require.Equal(t, int64(0), abciVal.Power) @@ -269,7 +268,7 @@ func TestValidatorsSortDeterminism(t *testing.T) { } } -// Check SortTendermint sorts the same as ostracon +// Check SortTendermint sorts the same as tendermint func TestValidatorsSortTendermint(t *testing.T) { vals := make([]types.Validator, 100) @@ -287,16 +286,16 @@ func TestValidatorsSortTendermint(t *testing.T) { valz := types.Validators(vals) - // create expected ostracon validators by converting to ostracon then sorting - expectedVals, err := teststaking.ToOcValidators(valz, sdk.DefaultPowerReduction) + // create expected tendermint validators by converting to tendermint then sorting + expectedVals, err := teststaking.ToTmValidators(valz, sdk.DefaultPowerReduction) require.NoError(t, err) - sort.Sort(octypes.ValidatorsByVotingPower(expectedVals)) + sort.Sort(tmtypes.ValidatorsByVotingPower(expectedVals)) // sort in SDK and then convert to tendermint sort.SliceStable(valz, func(i, j int) bool { return types.ValidatorsByVotingPower(valz).Less(i, j, sdk.DefaultPowerReduction) }) - actualVals, err := teststaking.ToOcValidators(valz, sdk.DefaultPowerReduction) + actualVals, err := teststaking.ToTmValidators(valz, sdk.DefaultPowerReduction) require.NoError(t, err) require.Equal(t, expectedVals, actualVals, "sorting in SDK is not the same as sorting in Tendermint") @@ -304,7 +303,7 @@ func TestValidatorsSortTendermint(t *testing.T) { func TestValidatorToTm(t *testing.T) { vals := make(types.Validators, 10) - expected := make([]*octypes.Validator, 10) + expected := make([]*tmtypes.Validator, 10) for i := range vals { pk := ed25519.GenPrivKey().PubKey() @@ -312,11 +311,11 @@ func TestValidatorToTm(t *testing.T) { val.Status = types.Bonded val.Tokens = sdk.NewInt(rand.Int63()) vals[i] = val - tmPk, err := cryptocodec.ToOcPubKeyInterface(pk) + tmPk, err := cryptocodec.ToTmPubKeyInterface(pk) require.NoError(t, err) - expected[i] = octypes.NewValidator(tmPk, val.ConsensusPower(sdk.DefaultPowerReduction)) + expected[i] = tmtypes.NewValidator(tmPk, val.ConsensusPower(sdk.DefaultPowerReduction)) } - vs, err := teststaking.ToOcValidators(vals, sdk.DefaultPowerReduction) + vs, err := teststaking.ToTmValidators(vals, sdk.DefaultPowerReduction) require.NoError(t, err) require.Equal(t, expected, vs) } diff --git a/x/stakingplus/module/module.go b/x/stakingplus/module/module.go index cd5827d7f8..9b4cd0f1ca 100644 --- a/x/stakingplus/module/module.go +++ b/x/stakingplus/module/module.go @@ -5,8 +5,6 @@ import ( abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" sdk "github.com/Finschia/finschia-sdk/types" @@ -108,7 +106,7 @@ func (am AppModule) ConsensusVersion() uint64 { } // BeginBlock returns the begin blocker for the stakingplus module. -func (am AppModule) BeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { am.impl.BeginBlock(ctx, req) } diff --git a/x/token/client/testutil/query.go b/x/token/client/testutil/query.go index 422615ac40..e8ba981d8a 100644 --- a/x/token/client/testutil/query.go +++ b/x/token/client/testutil/query.go @@ -4,8 +4,7 @@ import ( "fmt" "github.com/gogo/protobuf/proto" - - ostcli "github.com/Finschia/ostracon/libs/cli" + tmcli "github.com/tendermint/tendermint/libs/cli" "github.com/Finschia/finschia-sdk/client/flags" clitestutil "github.com/Finschia/finschia-sdk/testutil/cli" @@ -18,7 +17,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdBalance() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -85,7 +84,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdToken() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -140,7 +139,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdGranteeGrants() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -215,7 +214,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdIsOperatorFor() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { @@ -277,7 +276,7 @@ func (s *IntegrationTestSuite) TestNewQueryCmdHoldersByOperator() { val := s.network.Validators[0] commonArgs := []string{ fmt.Sprintf("--%s=%d", flags.FlagHeight, s.setupHeight), - fmt.Sprintf("--%s=json", ostcli.OutputFlag), + fmt.Sprintf("--%s=json", tmcli.OutputFlag), } testCases := map[string]struct { diff --git a/x/upgrade/abci.go b/x/upgrade/abci.go index cf3180ec80..5355d0ed71 100644 --- a/x/upgrade/abci.go +++ b/x/upgrade/abci.go @@ -4,7 +4,7 @@ import ( "fmt" "time" - ocabci "github.com/Finschia/ostracon/abci/types" + abci "github.com/tendermint/tendermint/abci/types" "github.com/Finschia/finschia-sdk/telemetry" sdk "github.com/Finschia/finschia-sdk/types" @@ -20,7 +20,7 @@ import ( // The purpose is to ensure the binary is switched EXACTLY at the desired block, and to allow // a migration to be executed if needed upon this switch (migration defined in the new binary) // skipUpgradeHeightArray is a set of block heights for which the upgrade must be skipped -func BeginBlocker(k keeper.Keeper, ctx sdk.Context, _ ocabci.RequestBeginBlock) { +func BeginBlocker(k keeper.Keeper, ctx sdk.Context, _ abci.RequestBeginBlock) { defer telemetry.ModuleMeasureSince(types.ModuleName, time.Now(), telemetry.MetricKeyBeginBlocker) plan, found := k.GetUpgradePlan(ctx) diff --git a/x/upgrade/abci_test.go b/x/upgrade/abci_test.go index 2927f039b0..d7175701f9 100644 --- a/x/upgrade/abci_test.go +++ b/x/upgrade/abci_test.go @@ -9,12 +9,10 @@ import ( "github.com/stretchr/testify/require" abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/simapp" storetypes "github.com/Finschia/finschia-sdk/store/types" sdk "github.com/Finschia/finschia-sdk/types" @@ -98,7 +96,7 @@ func VerifyDoUpgrade(t *testing.T) { t.Log("Verify that a panic happens at the upgrade height") newCtx := s.ctx.WithBlockHeight(s.ctx.BlockHeight() + 1).WithBlockTime(time.Now()) - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} require.Panics(t, func() { s.module.BeginBlock(newCtx, req) }) @@ -117,7 +115,7 @@ func VerifyDoUpgrade(t *testing.T) { func VerifyDoUpgradeWithCtx(t *testing.T, newCtx sdk.Context, proposalName string) { t.Helper() t.Log("Verify that a panic happens at the upgrade height") - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} require.Panics(t, func() { s.module.BeginBlock(newCtx, req) }) @@ -143,7 +141,7 @@ func TestHaltIfTooNew(t *testing.T) { }) newCtx := s.ctx.WithBlockHeight(s.ctx.BlockHeight() + 1).WithBlockTime(time.Now()) - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} require.NotPanics(t, func() { s.module.BeginBlock(newCtx, req) }) @@ -160,7 +158,7 @@ func TestHaltIfTooNew(t *testing.T) { t.Log("Verify we no longer panic if the plan is on time") futCtx := s.ctx.WithBlockHeight(s.ctx.BlockHeight() + 3).WithBlockTime(time.Now()) - req = ocabci.RequestBeginBlock{Header: futCtx.BlockHeader()} + req = abci.RequestBeginBlock{Header: futCtx.BlockHeader()} require.NotPanics(t, func() { s.module.BeginBlock(futCtx, req) }) @@ -204,7 +202,7 @@ func TestCantApplySameUpgradeTwice(t *testing.T) { func TestNoSpuriousUpgrades(t *testing.T) { s := setupTest(10, map[int64]bool{}) t.Log("Verify that no upgrade panic is triggered in the BeginBlocker when we haven't scheduled an upgrade") - req := ocabci.RequestBeginBlock{Header: s.ctx.BlockHeader()} + req := abci.RequestBeginBlock{Header: s.ctx.BlockHeader()} require.NotPanics(t, func() { s.module.BeginBlock(s.ctx, req) }) @@ -266,7 +264,7 @@ func TestSkipUpgradeSkippingAll(t *testing.T) { newCtx := s.ctx - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: skipOne}}) require.NoError(t, err) @@ -303,7 +301,7 @@ func TestUpgradeSkippingOne(t *testing.T) { newCtx := s.ctx - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: skipOne}}) require.NoError(t, err) @@ -338,7 +336,7 @@ func TestUpgradeSkippingOnlyTwo(t *testing.T) { newCtx := s.ctx - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: skipOne}}) require.NoError(t, err) @@ -375,7 +373,7 @@ func TestUpgradeSkippingOnlyTwo(t *testing.T) { func TestUpgradeWithoutSkip(t *testing.T) { s := setupTest(10, map[int64]bool{}) newCtx := s.ctx.WithBlockHeight(s.ctx.BlockHeight() + 1).WithBlockTime(time.Now()) - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "prop", Plan: types.Plan{Name: "test", Height: s.ctx.BlockHeight() + 1}}) require.NoError(t, err) t.Log("Verify if upgrade happens without skip upgrade") @@ -421,20 +419,20 @@ func TestBinaryVersion(t *testing.T) { testCases := []struct { name string - preRun func() (sdk.Context, ocabci.RequestBeginBlock) + preRun func() (sdk.Context, abci.RequestBeginBlock) expectPanic bool }{ { "test not panic: no scheduled upgrade or applied upgrade is present", - func() (sdk.Context, ocabci.RequestBeginBlock) { - req := ocabci.RequestBeginBlock{Header: s.ctx.BlockHeader()} + func() (sdk.Context, abci.RequestBeginBlock) { + req := abci.RequestBeginBlock{Header: s.ctx.BlockHeader()} return s.ctx, req }, false, }, { "test not panic: upgrade handler is present for last applied upgrade", - func() (sdk.Context, ocabci.RequestBeginBlock) { + func() (sdk.Context, abci.RequestBeginBlock) { s.keeper.SetUpgradeHandler("test0", func(_ sdk.Context, _ types.Plan, vm module.VersionMap) (module.VersionMap, error) { return vm, nil }) @@ -448,19 +446,19 @@ func TestBinaryVersion(t *testing.T) { Height: 12, }) - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} return newCtx, req }, false, }, { "test panic: upgrade needed", - func() (sdk.Context, ocabci.RequestBeginBlock) { + func() (sdk.Context, abci.RequestBeginBlock) { err := s.handler(s.ctx, &types.SoftwareUpgradeProposal{Title: "Upgrade test", Plan: types.Plan{Name: "test2", Height: 13}}) require.NoError(t, err) newCtx := s.ctx.WithBlockHeight(13) - req := ocabci.RequestBeginBlock{Header: newCtx.BlockHeader()} + req := abci.RequestBeginBlock{Header: newCtx.BlockHeader()} return newCtx, req }, true, diff --git a/x/upgrade/keeper/keeper.go b/x/upgrade/keeper/keeper.go index 65b48ed830..2e2fa10251 100644 --- a/x/upgrade/keeper/keeper.go +++ b/x/upgrade/keeper/keeper.go @@ -9,8 +9,8 @@ import ( "path/filepath" "sort" - "github.com/Finschia/ostracon/libs/log" - ostos "github.com/Finschia/ostracon/libs/os" + "github.com/tendermint/tendermint/libs/log" + tmos "github.com/tendermint/tendermint/libs/os" "github.com/Finschia/finschia-sdk/codec" "github.com/Finschia/finschia-sdk/store/prefix" @@ -398,7 +398,7 @@ func (k Keeper) DumpUpgradeInfoWithInfoToDisk(height int64, name, info string) e // GetUpgradeInfoPath returns the upgrade info file path func (k Keeper) GetUpgradeInfoPath() (string, error) { upgradeInfoFileDir := path.Join(k.getHomeDir(), "data") - err := ostos.EnsureDir(upgradeInfoFileDir, os.ModePerm) + err := tmos.EnsureDir(upgradeInfoFileDir, os.ModePerm) if err != nil { return "", err } diff --git a/x/upgrade/module.go b/x/upgrade/module.go index edcb3ccd7c..3da462e2b8 100644 --- a/x/upgrade/module.go +++ b/x/upgrade/module.go @@ -8,8 +8,6 @@ import ( "github.com/spf13/cobra" abci "github.com/tendermint/tendermint/abci/types" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/finschia-sdk/client" "github.com/Finschia/finschia-sdk/codec" codectypes "github.com/Finschia/finschia-sdk/codec/types" @@ -129,6 +127,6 @@ func (AppModule) ConsensusVersion() uint64 { return 1 } // BeginBlock calls the upgrade module hooks // // CONTRACT: this is registered in BeginBlocker *before* all other modules' BeginBlock functions -func (am AppModule) BeginBlock(ctx sdk.Context, req ocabci.RequestBeginBlock) { +func (am AppModule) BeginBlock(ctx sdk.Context, req abci.RequestBeginBlock) { BeginBlocker(am.keeper, ctx, req) } diff --git a/x/upgrade/types/plan_test.go b/x/upgrade/types/plan_test.go index 42b7770f13..484a7ac5b0 100644 --- a/x/upgrade/types/plan_test.go +++ b/x/upgrade/types/plan_test.go @@ -6,10 +6,9 @@ import ( "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" - "github.com/Finschia/ostracon/libs/log" - codectypes "github.com/Finschia/finschia-sdk/codec/types" sdk "github.com/Finschia/finschia-sdk/types" "github.com/Finschia/finschia-sdk/x/upgrade/types" diff --git a/x/upgrade/types/storeloader_test.go b/x/upgrade/types/storeloader_test.go index 28805f47ce..50d9dcf066 100644 --- a/x/upgrade/types/storeloader_test.go +++ b/x/upgrade/types/storeloader_test.go @@ -7,12 +7,11 @@ import ( "testing" "github.com/stretchr/testify/require" + abci "github.com/tendermint/tendermint/abci/types" + "github.com/tendermint/tendermint/libs/log" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" dbm "github.com/tendermint/tm-db" - ocabci "github.com/Finschia/ostracon/abci/types" - "github.com/Finschia/ostracon/libs/log" - "github.com/Finschia/finschia-sdk/baseapp" "github.com/Finschia/finschia-sdk/store/rootmulti" store "github.com/Finschia/finschia-sdk/store/types" @@ -26,7 +25,7 @@ func useUpgradeLoader(height int64, upgrades *store.StoreUpgrades) func(*baseapp } func defaultLogger() log.Logger { - return log.NewOCLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") + return log.NewTMLogger(log.NewSyncWriter(os.Stdout)).With("module", "sdk/app") } func initStore(t *testing.T, db dbm.DB, storeKey string, k, v []byte) { @@ -127,7 +126,7 @@ func TestSetLoader(t *testing.T) { require.Nil(t, err) for i := int64(2); i <= upgradeHeight-1; i++ { - origapp.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) + origapp.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: i}}) res := origapp.Commit() require.NotNil(t, res.Data) } @@ -143,7 +142,7 @@ func TestSetLoader(t *testing.T) { require.Nil(t, err) // "execute" one block - app.BeginBlock(ocabci.RequestBeginBlock{Header: tmproto.Header{Height: upgradeHeight}}) + app.BeginBlock(abci.RequestBeginBlock{Header: tmproto.Header{Height: upgradeHeight}}) res := app.Commit() require.NotNil(t, res.Data)