diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 93e35d11c3..96755b5706 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -40,15 +40,3 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v1 - - - name: Login to DockerHub - uses: docker/login-action@v1 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKERHUB_TOKEN }} - - - name: Publish to Docker Hub - uses: docker/build-push-action@v2 - with: - push: ${{ github.event_name != 'pull_request' }} - tags: ${{ steps.prep.outputs.tags }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d11ccc8fd2..5218046de0 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,10 +15,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 6 steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: technote-space/get-diff-action@v4 with: @@ -31,5 +27,5 @@ jobs: # Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version. version: v1.28 args: --timeout 10m - github-token: ${{ secrets.github_token }} + github-token: ${{ secrets.GITHUB_TOKEN }} if: env.GIT_DIFF diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml index d1b99b3571..bde140071d 100644 --- a/.github/workflows/release-sims.yml +++ b/.github/workflows/release-sims.yml @@ -12,7 +12,7 @@ jobs: steps: - uses: rokroskar/workflow-run-cleanup-action@master env: - GITHUB_TOKEN: "${{ secrets.TOKEN }}" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" build: diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index e61eb225f6..f607f17d4c 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -18,16 +18,12 @@ jobs: steps: - uses: rokroskar/workflow-run-cleanup-action@master env: - GITHUB_TOKEN: "${{ secrets.TOKEN }}" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" build: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-sims')" steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -56,10 +52,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -86,10 +78,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index e4eb648e0d..79b54186ee 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -9,7 +9,7 @@ jobs: steps: - uses: actions/stale@v3 with: - repo-token: ${{ secrets.TOKEN }} + repo-token: ${{ secrets.GITHUB_TOKEN }} stale-pr-message: "This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions." diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml index a29dfef49f..7e1068f303 100644 --- a/.github/workflows/tag.yml +++ b/.github/workflows/tag.yml @@ -23,4 +23,4 @@ jobs: with: args: release --rm-dist --release-notes ./RELEASE_CHANGELOG.md env: - GITHUB_TOKEN: ${{ secrets.TOKEN }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 492b0e333f..f421723cc6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,7 +15,7 @@ jobs: steps: - uses: rokroskar/workflow-run-cleanup-action@master env: - GITHUB_TOKEN: "${{ secrets.TOKEN }}" + GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/develop'" install-tparse: @@ -40,10 +40,6 @@ jobs: matrix: go-arch: ["amd64", "arm", "arm64"] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -62,10 +58,6 @@ jobs: # test-cosmovisor: # runs-on: ubuntu-latest # steps: - # - name: Configure git for private modules - # env: - # TOKEN: ${{ secrets.TOKEN }} - # run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" # - uses: actions/checkout@v2 # - uses: actions/setup-go@v2.1.3 # with: @@ -88,10 +80,6 @@ jobs: split-test-files: runs-on: ubuntu-latest steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - name: Create a file with all the pkgs run: go list ./... > pkgs.txt @@ -123,10 +111,6 @@ jobs: matrix: part: ["00", "01", "02", "03"] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -204,10 +188,6 @@ jobs: matrix: part: ["00", "01", "02", "03"] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -274,10 +254,6 @@ jobs: # runs-on: ubuntu-latest # timeout-minutes: 10 # steps: -# - name: Configure git for private modules -# env: -# TOKEN: ${{ secrets.TOKEN }} -# run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" # - uses: actions/checkout@v2 # - uses: actions/setup-go@v2.1.3 # with: diff --git a/CHANGELOG.md b/CHANGELOG.md index e136c50bb1..70534bae75 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ * (x/wasm) [\#194](https://github.com/line/lfb-sdk/pull/194) Replace importing CosmWasm/wasmvm with line/wasmvm. * (x/auth) [\#176](https://github.com/line/lfb-sdk/pull/176) Add MsgEmpty to auth module * (metric) [\#184](https://github.com/line/lfb-sdk/pull/184) Add prometheus metrics for caches reverting telemetry metrics +* (grpc) [\#291](https://github.com/line/lfb-sdk/pull/291) Add GRPC API the BlockByHash and BlockResultsByHeight, add prove parameter to GetTxsEvent ### Improvements * (bump-up) [\#93](https://github.com/line/lfb-sdk/pull/93) Adopt ostracon, line/tm-db and line/iavl @@ -32,6 +33,24 @@ * (perf) [\#198](https://github.com/line/lfb-sdk/pull/198) Caching paramset * (global) [\#200](https://github.com/line/lfb-sdk/pull/200) Add a env prefix * (store) [\#202](https://github.com/line/lfb-sdk/pull/202) param store doesn't use gas kv +* (store) [\#202](https://github.com/line/lfb-sdk/pull/202) Param store doesn't use gas kv +* (store) [\#203](https://github.com/line/lfb-sdk/pull/203) Remove transient store that is not used now +* (perf) [\#204](https://github.com/line/lfb-sdk/pull/204) Apply rw mutex to cachekv +* (perf) [\#208](https://github.com/line/lfb-sdk/pull/208) Use easyjson instead of amino when marshal abci logs +* (perf) [\#209](https://github.com/line/lfb-sdk/pull/209) Apply async reactor ostracon +* (proto) [\#212](https://github.com/line/lfb-sdk/pull/212) Reformat proto files and restore proto docs +* (perf) [\#216](https://github.com/line/lfb-sdk/pull/216) Memoize bech32 encoding and decoding +* (perf) [\#218](https://github.com/line/lfb-sdk/pull/218) Rootmulti store parallel commit +* (perf) [\#219](https://github.com/line/lfb-sdk/pull/219) Fix bech32 cache to get bech32 from proper cache +* (bump-up) [\#221](https://github.com/line/lfb-sdk/pull/221) Bump up iavl for parallel processing of batches +* (perf) [\#224](https://github.com/line/lfb-sdk/pull/224) Updated log time to have milliseconds +* (bump-up) [\#228](https://github.com/line/lfb-sdk/pull/228) Bump up ostracon to optimize checking the txs size +* (global) [\#230](https://github.com/line/lfb-sdk/pull/230) Modify module name to lfb-sdk +* (bump-up) [\#246](https://github.com/line/lfb-sdk/pull/246) Bump up ostracon to not flush wal when receive consensus msgs +* (wasm) [\#250](https://github.com/line/lfb-sdk/pull/250) Migrate linkwasmd to the latest commit +* (wasm) [\#253](https://github.com/line/lfb-sdk/pull/253) remove MaxGas const +* (wasm) [\#254](https://github.com/line/lfb-sdk/pull/254) Specify wasm event types +* (x) [\#255](https://github.com/line/lfb-sdk/pull/255) Remove legacy from modules ### Bug Fixes * (test) [\#92](https://github.com/line/lfb-sdk/pull/92) Fix SendToModuleAccountTest @@ -40,12 +59,27 @@ * (config) [\#138](https://github.com/line/lfb-sdk/pull/138) Fix getting coin type at running cmd * (race) [\#159](https://github.com/line/lfb-sdk/pull/159) Fix test-race failure * (test) [\#193](https://github.com/line/lfb-sdk/pull/193) Allow to add new validator in test network - + ### Breaking Changes * (global) [\#90](https://github.com/line/lfb-sdk/pull/90) Revise module path to `github.com/line/lfb-sdk` * (rpc) [\#97](https://github.com/line/lfb-sdk/pull/97) Send response with 404 status when quering non-exist account * (proto) [\#106](https://github.com/line/lfb-sdk/pull/106) Rename package of proto files * (api) [\#130](https://github.com/line/lfb-sdk/pull/130) Rename rest apis +* (auth) [\#265](https://github.com/line/lfb-sdk/pull/265) Introduce sig block height for the new replay protection + +### Build, CI +* (ci) [\#234](https://github.com/line/lfb-sdk/pull/234) Fix branch name in ci script +* (docker) [\#264](https://github.com/line/lfb-sdk/pull/264) Remove docker publish + +### Document Updates +* (docs) [\#205](https://github.com/line/lfb-sdk/pull/205) Renewal docs for open source +* (docs) [\#207](https://github.com/line/lfb-sdk/pull/207) Fix license +* (docs) [\#211](https://github.com/line/lfb-sdk/pull/211) Remove codeowners +* (docs) [\#248](https://github.com/line/lfb-sdk/pull/248) Add PR procedure, apply main branch +* (docs) [\#256](https://github.com/line/lfb-sdk/pull/256) Modify copyright and contributing +* (docs) [\#259](https://github.com/line/lfb-sdk/pull/259) Modify copyright, verified from legal team +* (docs) [\#260](https://github.com/line/lfb-sdk/pull/260) Remove gov, ibc and readme of wasm module +* (docs) [\#262](https://github.com/line/lfb-sdk/pull/262) Fix link urls, remove invalid reference ## [cosmos-sdk v0.42.1] - 2021-03-15 Initial lfb-sdk is based on the cosmos-sdk v0.42.1 diff --git a/Dockerfile b/Dockerfile index 33ddcc731e..0b9457021d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,6 @@ WORKDIR /go/src/github.com/line/lfb-sdk COPY . . # install simapp, remove packages -# TODO ebony: fix module download error in docker -RUN go env -w GOPRIVATE=github.com/line/* -RUN git config --global url."https://$GITHUB_TOKEN:x-oauth-basic@github.com/".insteadOf "https://github.com/" RUN make build-linux diff --git a/Makefile b/Makefile index 88a449e7e2..a88b408d67 100644 --- a/Makefile +++ b/Makefile @@ -394,7 +394,7 @@ proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" - $(DOCKER) run --rm -e GITHUB_TOKEN=$(GITHUB_TOKEN) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh + $(DOCKER) run --rm -e -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh proto-format: @echo "Formatting Protobuf files" @@ -407,7 +407,7 @@ proto-gen-any: $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen-any.sh proto-swagger-gen: - @./scripts/protoc-swagger-gen.sh + $(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protoc-swagger-gen.sh proto-lint: @$(DOCKER_BUF) check lint --error-format=json diff --git a/baseapp/accountwgs_test.go b/baseapp/accountwgs_test.go index 4c2e07db4b..859dc06c4f 100644 --- a/baseapp/accountwgs_test.go +++ b/baseapp/accountwgs_test.go @@ -77,6 +77,10 @@ func (tx AccountLockTestTx) ValidateBasic() error { return nil } +func (tx AccountLockTestTx) GetSigBlockHeight() uint64 { + return 0 +} + func newTestPrivKeys(num int) []*secp256k1.PrivKey { privs := make([]*secp256k1.PrivKey, 0, num) for i := 0; i < num; i++ { diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 1125bdec70..b1e02b7061 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -696,8 +696,9 @@ func (tx *txTest) setFailOnHandler(fail bool) { } // Implements Tx -func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs } -func (tx txTest) ValidateBasic() error { return nil } +func (tx txTest) GetMsgs() []sdk.Msg { return tx.Msgs } +func (tx txTest) ValidateBasic() error { return nil } +func (tx txTest) GetSigBlockHeight() uint64 { return 0 } const ( routeMsgCounter = "msgCounter" diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 6e3a278f60..0b889f688a 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -104,7 +104,6 @@ func TestMsgService(t *testing.T) { // Second round: all signer infos are set, so each signer can sign. signerData := authsigning.SignerData{ ChainID: "test", - AccountNumber: 0, Sequence: 0, } sigV2, err = tx.SignWithPrivKey( diff --git a/client/account_retriever.go b/client/account_retriever.go index 9f300256e3..75c9378ffa 100644 --- a/client/account_retriever.go +++ b/client/account_retriever.go @@ -9,7 +9,6 @@ import ( type Account interface { GetAddress() sdk.AccAddress GetPubKey() cryptotypes.PubKey // can return nil. - GetAccountNumber() uint64 GetSequence() uint64 } @@ -18,7 +17,8 @@ type Account interface { // for signing. type AccountRetriever interface { GetAccount(clientCtx Context, addr sdk.AccAddress) (Account, error) + GetLatestHeight(clientCtx Context) (uint64, error) GetAccountWithHeight(clientCtx Context, addr sdk.AccAddress) (Account, int64, error) EnsureExists(clientCtx Context, addr sdk.AccAddress) error - GetAccountNumberSequence(clientCtx Context, addr sdk.AccAddress) (accNum uint64, accSeq uint64, err error) + GetAccountSequence(clientCtx Context, addr sdk.AccAddress) (accSeq uint64, err error) } diff --git a/client/docs/config.json b/client/docs/config.json index 2865fb7ad4..f778fffb5d 100644 --- a/client/docs/config.json +++ b/client/docs/config.json @@ -1,7 +1,7 @@ { "swagger": "2.0", "info": { - "title": "Cosmos SDK - Legacy REST and gRPC Gateway docs", + "title": "LFB SDK - Legacy REST and gRPC Gateway docs", "description": "A REST interface for state queries, legacy transactions", "version": "1.0.0" }, @@ -13,7 +13,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/auth/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/auth/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "AuthParams" @@ -21,7 +21,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/bank/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/bank/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "BankParams" @@ -29,7 +29,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/base/tendermint/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/base/ostracon/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "BaseParams" @@ -37,7 +37,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/distribution/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/distribution/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "DistributionParams" @@ -45,7 +45,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/evidence/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/evidence/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "EvidenceParams" @@ -53,7 +53,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/gov/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/gov/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "GovParams" @@ -61,7 +61,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/mint/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/mint/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "MintParams" @@ -69,7 +69,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/params/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/params/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "Params" @@ -77,7 +77,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/slashing/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/slashing/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "SlashingParams" @@ -85,7 +85,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/staking/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/staking/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "StakingParams", @@ -100,7 +100,7 @@ } }, { - "url": "./tmp-swagger-gen/cosmos/upgrade/v1beta1/query.swagger.json", + "url": "./tmp-swagger-gen/lfb/upgrade/v1beta1/query.swagger.json", "operationIds": { "rename": { "Params": "UpgradeParams" diff --git a/client/docs/swagger-ui/swagger.yaml b/client/docs/swagger-ui/swagger.yaml index 219519c55e..0150011a95 100644 --- a/client/docs/swagger-ui/swagger.yaml +++ b/client/docs/swagger-ui/swagger.yaml @@ -4614,7 +4614,7 @@ paths: description: Invalid coin denomination '500': description: Internal Server Error - '/cosmos/auth/v1beta1/accounts/{address}': + '/lfb/auth/v1beta1/accounts/{address}': get: summary: Account returns account details based on address. operationId: Account @@ -4695,7 +4695,7 @@ paths: QueryAccountResponse is the response type for the Query/Account RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -4891,7 +4891,7 @@ paths: type: string tags: - Query - /cosmos/auth/v1beta1/params: + /lfb/auth/v1beta1/params: get: summary: Params queries all parameters. operationId: AuthParams @@ -4924,7 +4924,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -5114,7 +5114,7 @@ paths: } tags: - Query - '/cosmos/bank/v1beta1/balances/{address}': + '/lfb/bank/v1beta1/balances/{address}': get: summary: AllBalances queries the balance of all coins for a single account. operationId: AllBalances @@ -5166,7 +5166,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -5239,9 +5239,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/bank/v1beta1/balances/{address}/{denom}': + '/lfb/bank/v1beta1/balances/{address}/{denom}': get: summary: Balance queries the balance of a single coin for a single account. operationId: Balance @@ -5252,18 +5253,1508 @@ paths: type: object properties: balance: - description: balance is the balance of the 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. + description: >- + 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: address + description: address is the address to query balances for. + in: path + required: true + type: string + - name: denom + description: denom is the coin denom to query balances for. + in: path + required: true + type: string + tags: + - Query + /lfb/bank/v1beta1/denoms_metadata: + get: + summary: >- + DenomsMetadata queries the client metadata for all registered coin + denominations. + operationId: DenomsMetadata + responses: + '200': + description: A successful response. + schema: + 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. + 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. + 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: 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 + tags: + - Query + '/lfb/bank/v1beta1/denoms_metadata/{denom}': + get: + summary: DenomsMetadata queries the client metadata of a given coin denomination. + operationId: DenomMetadata + responses: + '200': + description: A successful response. + schema: + 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. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata 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: denom + description: denom is the coin denom to query the metadata for. + in: path + required: true + type: string + tags: + - Query + /lfb/bank/v1beta1/params: + get: + summary: Params queries the parameters of x/bank module. + operationId: BankParams + responses: + '200': + description: A successful response. + schema: + 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. + 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 + /lfb/bank/v1beta1/supply: + get: + summary: TotalSupply queries the total supply of all coins. + operationId: TotalSupply + responses: + '200': + description: A successful response. + schema: + 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 + title: >- + QueryTotalSupplyResponse is the response type for the + Query/TotalSupply 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 + '/lfb/bank/v1beta1/supply/{denom}': + get: + summary: SupplyOf queries the supply of a single coin. + operationId: SupplyOf + responses: + '200': + description: A successful response. + schema: + 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. + 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: denom + description: denom is the coin denom to query balances for. + in: path + required: true + type: string + tags: + - Query + '/lfb/base/ostracon/v1beta1/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 + Ostracon 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. + 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 + in: path + required: true + type: string + format: int64 + tags: + - Service + /lfb/base/ostracon/v1beta1/blocks/latest: + get: + summary: GetLatestBlock returns the latest block. + operationId: GetLatestBlock + 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, + + 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 Ostracon 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 Ostracon 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 Ostracon 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: >- - QueryBalanceResponse is the response type for the Query/Balance - RPC method. + GetLatestBlockResponse is the response type for the + Query/GetLatestBlock RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -5281,191 +6772,182 @@ paths: properties: type_url: type: string - value: - type: string - format: byte - parameters: - - name: address - description: address is the address to query balances for. - in: path - required: true - type: string - - name: denom - description: denom is the coin denom to query balances for. - in: path - required: true - type: string - tags: - - Query - /cosmos/bank/v1beta1/params: - get: - summary: Params queries the parameters of x/bank module. - operationId: BankParams - responses: - '200': - description: A successful response. - schema: - type: object - properties: - params: - type: object - properties: - send_enabled: - type: array - items: - type: object - properties: - denom: - type: string - enabled: - type: boolean description: >- - SendEnabled maps coin denom to a send_enabled status - (whether a denom is + A URL/resource name that uniquely identifies the type of + the serialized - sendable). - default_send_enabled: - type: boolean - description: Params defines the parameters for the bank module. - description: >- - QueryParamsResponse defines the response type for querying x/bank - parameters. - 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 + 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 - tags: - - Query - /cosmos/bank/v1beta1/supply: - get: - summary: TotalSupply queries the total supply of all coins. - operationId: TotalSupply - responses: - '200': - description: A successful response. - schema: - type: object - properties: - supply: - type: array - items: - type: object - properties: - denom: - type: string - amount: - type: string + description: >- + Must be a valid serialized protocol buffer of the above + specified type. description: >- - Coin defines a token with a denomination and an amount. + `Any` contains an arbitrary serialized protocol buffer + message along with a + URL that describes the type of the serialized message. - NOTE: The amount field is an Int which implements the custom - method - signatures required by gogoproto. - title: supply is the supply of the coins - title: >- - QueryTotalSupplyResponse is the response type for the - Query/TotalSupply RPC + Protobuf library provides support to pack/unpack Any values + in the form - 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/bank/v1beta1/supply/{denom}': - get: - summary: SupplyOf queries the supply of a single coin. - operationId: SupplyOf - responses: - '200': - description: A successful response. - schema: - type: object - properties: - amount: - description: amount is the supply of the coin. - type: object - properties: - denom: - type: string - amount: - type: string - description: >- - QuerySupplyOfResponse is the response type for the Query/SupplyOf - 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: denom - description: denom is the coin denom to query balances for. - in: path - required: true - type: string + 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/base/tendermint/v1beta1/blocks/latest: + - Service + '/lfb/base/ostracon/v1beta1/blocks/{hash}': get: - summary: GetLatestBlock returns the latest block. - operationId: GetLatestBlock + summary: GetBlockByHash queries block for given hash. + operationId: GetBlockByHash responses: '200': description: A successful response. @@ -5522,7 +7004,6 @@ paths: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -5538,6 +7019,7 @@ paths: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -5765,7 +7247,6 @@ paths: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -5781,6 +7262,7 @@ paths: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -5896,7 +7378,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -5920,7 +7402,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -5952,7 +7434,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -6027,10 +7509,10 @@ paths: 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. + GetBlockByHashResponse is the response type for the + Query/GetBlockByHash RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -6218,9 +7700,15 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + parameters: + - name: hash + in: path + required: true + type: string + format: byte tags: - Service - '/cosmos/base/tendermint/v1beta1/blocks/{height}': + '/lfb/base/ostracon/v1beta1/blocks/{height}': get: summary: GetBlockByHeight queries block for given height. operationId: GetBlockByHeight @@ -6280,7 +7768,6 @@ paths: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -6296,6 +7783,7 @@ paths: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -6523,7 +8011,6 @@ paths: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -6539,6 +8026,7 @@ paths: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -6654,7 +8142,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -6678,7 +8166,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -6710,7 +8198,7 @@ paths: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -6788,7 +8276,7 @@ paths: GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -6984,7 +8472,7 @@ paths: format: int64 tags: - Service - /cosmos/base/tendermint/v1beta1/node_info: + /lfb/base/ostracon/v1beta1/node_info: get: summary: GetNodeInfo queries the current node info. operationId: GetNodeInfo @@ -7064,7 +8552,7 @@ paths: GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -7254,7 +8742,7 @@ paths: } tags: - Service - /cosmos/base/tendermint/v1beta1/syncing: + /lfb/base/ostracon/v1beta1/syncing: get: summary: GetSyncing queries node syncing. operationId: GetSyncing @@ -7266,11 +8754,12 @@ paths: properties: syncing: type: boolean + format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -7460,7 +8949,7 @@ paths: } tags: - Service - /cosmos/base/tendermint/v1beta1/validatorsets/latest: + /lfb/base/ostracon/v1beta1/validatorsets/latest: get: summary: GetLatestValidatorSet queries latest validator-set. operationId: GetLatestValidatorSet @@ -7686,7 +9175,7 @@ paths: GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -7921,9 +9410,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Service - '/cosmos/base/tendermint/v1beta1/validatorsets/{height}': + '/lfb/base/ostracon/v1beta1/validatorsets/{height}': get: summary: GetValidatorSetByHeight queries validator-set at a given height. operationId: GetValidatorSetByHeight @@ -8149,7 +9639,7 @@ paths: GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8389,9 +9879,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Service - /cosmos/distribution/v1beta1/community_pool: + /lfb/distribution/v1beta1/community_pool: get: summary: CommunityPool queries the community pool coins. operationId: CommunityPool @@ -8426,7 +9917,7 @@ paths: RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8449,7 +9940,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards': + '/lfb/distribution/v1beta1/delegators/{delegator_address}/rewards': get: summary: |- DelegationTotalRewards queries the total rewards accrued by a each @@ -8513,7 +10004,7 @@ paths: QueryDelegationTotalRewardsResponse is the response type for the Query/DelegationTotalRewards RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8542,7 +10033,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': + '/lfb/distribution/v1beta1/delegators/{delegator_address}/rewards/{validator_address}': get: summary: DelegationRewards queries the total rewards accrued by a delegation. operationId: DelegationRewards @@ -8575,7 +10066,7 @@ paths: QueryDelegationRewardsResponse is the response type for the Query/DelegationRewards RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8609,7 +10100,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/validators': + '/lfb/distribution/v1beta1/delegators/{delegator_address}/validators': get: summary: DelegatorValidators queries the validators of a delegator. operationId: DelegatorValidators @@ -8630,7 +10121,7 @@ paths: QueryDelegatorValidatorsResponse is the response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8659,7 +10150,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': + '/lfb/distribution/v1beta1/delegators/{delegator_address}/withdraw_address': get: summary: DelegatorWithdrawAddress queries withdraw address of a delegator. operationId: DelegatorWithdrawAddress @@ -8676,7 +10167,7 @@ paths: QueryDelegatorWithdrawAddressResponse is the response type for the Query/DelegatorWithdrawAddress RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8705,7 +10196,7 @@ paths: type: string tags: - Query - /cosmos/distribution/v1beta1/params: + /lfb/distribution/v1beta1/params: get: summary: Params queries params of the distribution module. operationId: DistributionParams @@ -8727,11 +10218,12 @@ paths: 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. + description: An unexpected error response schema: type: object properties: @@ -8754,7 +10246,7 @@ paths: format: byte tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/commission': + '/lfb/distribution/v1beta1/validators/{validator_address}/commission': get: summary: ValidatorCommission queries accumulated commission for a validator. operationId: ValidatorCommission @@ -8790,7 +10282,7 @@ paths: QueryValidatorCommissionResponse is the response type for the Query/ValidatorCommission RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8819,7 +10311,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': + '/lfb/distribution/v1beta1/validators/{validator_address}/outstanding_rewards': get: summary: ValidatorOutstandingRewards queries rewards of a validator address. operationId: ValidatorOutstandingRewards @@ -8862,7 +10354,7 @@ paths: Query/ValidatorOutstandingRewards RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -8891,7 +10383,7 @@ paths: type: string tags: - Query - '/cosmos/distribution/v1beta1/validators/{validator_address}/slashes': + '/lfb/distribution/v1beta1/validators/{validator_address}/slashes': get: summary: ValidatorSlashes queries slash events of a validator. operationId: ValidatorSlashes @@ -8944,7 +10436,7 @@ paths: QueryValidatorSlashesResponse is the response type for the Query/ValidatorSlashes RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -9033,9 +10525,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - /cosmos/evidence/v1beta1/evidence: + /lfb/evidence/v1beta1/evidence: get: summary: AllEvidence queries all evidence. operationId: AllEvidence @@ -9247,7 +10740,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -9482,9 +10975,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/evidence/v1beta1/evidence/{evidence_hash}': + '/lfb/evidence/v1beta1/evidence/{evidence_hash}': get: summary: Evidence queries evidence based on evidence hash. operationId: Evidence @@ -9495,7 +10989,6 @@ paths: type: object properties: evidence: - description: evidence returns the requested evidence. type: object properties: type_url: @@ -9561,11 +11054,116 @@ paths: 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. + description: An unexpected error response schema: type: object properties: @@ -9762,7 +11360,7 @@ paths: format: byte tags: - Query - '/cosmos/gov/v1beta1/params/{params_type}': + '/lfb/gov/v1beta1/params/{params_type}': get: summary: Params queries all parameters of the gov module. operationId: GovParams @@ -9835,7 +11433,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -10035,7 +11633,7 @@ paths: type: string tags: - Query - /cosmos/gov/v1beta1/proposals: + /lfb/gov/v1beta1/proposals: get: summary: Proposals queries all proposals based on given status. operationId: Proposals @@ -10326,7 +11924,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -10597,9 +12195,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}': + '/lfb/gov/v1beta1/proposals/{proposal_id}': get: summary: Proposal queries proposal details based on ProposalID. operationId: Proposal @@ -10865,7 +12464,7 @@ paths: QueryProposalResponse is the response type for the Query/Proposal RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -11062,7 +12661,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits': + '/lfb/gov/v1beta1/proposals/{proposal_id}/deposits': get: summary: Deposits queries all deposits of a single proposal. operationId: Deposits @@ -11127,7 +12726,7 @@ paths: QueryDepositsResponse is the response type for the Query/Deposits RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -11368,9 +12967,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': + '/lfb/gov/v1beta1/proposals/{proposal_id}/deposits/{depositor}': get: summary: >- Deposit queries single deposit information based proposalID, @@ -11383,7 +12983,6 @@ paths: type: object properties: deposit: - description: deposit defines the requested deposit. type: object properties: proposal_id: @@ -11408,11 +13007,16 @@ paths: 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. + description: An unexpected error response schema: type: object properties: @@ -11614,7 +13218,7 @@ paths: type: string tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/tally': + '/lfb/gov/v1beta1/proposals/{proposal_id}/tally': get: summary: TallyResult queries the tally of a proposal vote. operationId: TallyResult @@ -11625,7 +13229,6 @@ paths: type: object properties: tally: - description: tally defines the requested tally. type: object properties: 'yes': @@ -11636,11 +13239,14 @@ paths: type: string no_with_veto: type: string + description: >- + TallyResult defines a standard tally for a governance + proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -11837,7 +13443,7 @@ paths: format: uint64 tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes': + '/lfb/gov/v1beta1/proposals/{proposal_id}/votes': get: summary: Votes queries votes of a given proposal. operationId: Votes @@ -11903,7 +13509,7 @@ paths: QueryVotesResponse is the response type for the Query/Votes RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12144,9 +13750,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': + '/lfb/gov/v1beta1/proposals/{proposal_id}/votes/{voter}': get: summary: 'Vote queries voted information based on proposalID, voterAddr.' operationId: Vote @@ -12157,7 +13764,6 @@ paths: type: object properties: vote: - description: vote defined the queried vote. type: object properties: proposal_id: @@ -12183,11 +13789,16 @@ paths: - 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. + description: >- + Vote defines a vote on a governance proposal. + + A Vote consists of a proposal ID, the voter, and the vote + option. description: >- QueryVoteResponse is the response type for the Query/Vote RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12389,7 +14000,7 @@ paths: type: string tags: - Query - /cosmos/mint/v1beta1/annual_provisions: + /lfb/mint/v1beta1/annual_provisions: get: summary: AnnualProvisions current minting annual provisions value. operationId: AnnualProvisions @@ -12409,7 +14020,7 @@ paths: QueryAnnualProvisionsResponse is the response type for the Query/AnnualProvisions RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12432,7 +14043,7 @@ paths: format: byte tags: - Query - /cosmos/mint/v1beta1/inflation: + /lfb/mint/v1beta1/inflation: get: summary: Inflation returns the current minting inflation value. operationId: Inflation @@ -12452,7 +14063,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12475,7 +14086,7 @@ paths: format: byte tags: - Query - /cosmos/mint/v1beta1/params: + /lfb/mint/v1beta1/params: get: summary: Params returns the total set of minting parameters. operationId: MintParams @@ -12512,7 +14123,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12535,7 +14146,7 @@ paths: format: byte tags: - Query - /cosmos/params/v1beta1/params: + /lfb/params/v1beta1/params: get: summary: |- Params queries a specific parameter of a module, given its subspace and @@ -12561,7 +14172,7 @@ paths: QueryParamsResponse is response type for the Query/Params RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12595,7 +14206,7 @@ paths: type: string tags: - Query - /cosmos/slashing/v1beta1/params: + /lfb/slashing/v1beta1/params: get: summary: Params queries the parameters of slashing module operationId: SlashingParams @@ -12629,7 +14240,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12652,7 +14263,7 @@ paths: format: byte tags: - Query - /cosmos/slashing/v1beta1/signing_infos: + /lfb/slashing/v1beta1/signing_infos: get: summary: SigningInfos queries signing info of all validators operationId: SigningInfos @@ -12685,6 +14296,7 @@ paths: title: timestamp validator cannot be unjailed until tombstoned: type: boolean + format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -12735,7 +14347,7 @@ paths: method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -12803,9 +14415,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/slashing/v1beta1/signing_infos/{cons_address}': + '/lfb/slashing/v1beta1/signing_infos/{cons_address}': get: summary: SigningInfo queries the signing info of given cons address operationId: SigningInfo @@ -12816,9 +14429,6 @@ paths: type: object properties: val_signing_info: - title: >- - val_signing_info is the signing info of requested val cons - address type: object properties: address: @@ -12839,6 +14449,7 @@ paths: title: timestamp validator cannot be unjailed until tombstoned: type: boolean + format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -12855,13 +14466,16 @@ paths: 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. + description: An unexpected error response schema: type: object properties: @@ -12890,7 +14504,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/delegations/{delegator_addr}': + '/lfb/staking/v1beta1/delegations/{delegator_addr}': get: summary: >- DelegatorDelegations queries all delegations of a given delegator @@ -12912,10 +14526,17 @@ paths: 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 @@ -12970,7 +14591,7 @@ paths: QueryDelegatorDelegationsResponse is response type for the Query/DelegatorDelegations RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -13210,9 +14831,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/redelegations': + '/lfb/staking/v1beta1/delegators/{delegator_addr}/redelegations': get: summary: Redelegations queries redelegations of given address. operationId: Redelegations @@ -13232,10 +14854,19 @@ paths: 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: @@ -13244,16 +14875,30 @@ paths: 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 @@ -13271,13 +14916,26 @@ paths: 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. @@ -13323,7 +14981,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -13573,9 +15231,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': + '/lfb/staking/v1beta1/delegators/{delegator_addr}/unbonding_delegations': get: summary: >- DelegatorUnbondingDelegations queries all unbonding delegations of a @@ -13596,8 +15255,14 @@ paths: 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: @@ -13606,16 +15271,29 @@ paths: 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 @@ -13645,7 +15323,7 @@ paths: Query/UnbondingDelegatorDelegations RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -13885,9 +15563,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators': + '/lfb/staking/v1beta1/delegators/{delegator_addr}/validators': get: summary: |- DelegatorValidators queries all validators info for given delegator @@ -13906,6 +15585,9 @@ paths: 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: @@ -14085,7 +15767,14 @@ paths: } 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 @@ -14093,62 +15782,92 @@ paths: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates - to be used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. update_time: type: string format: date-time - description: >- - Commission defines commission parameters for a given - validator. + 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 @@ -14195,7 +15914,7 @@ paths: QueryDelegatorValidatorsResponse is response type for the Query/DelegatorValidators RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -14435,9 +16154,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': + '/lfb/staking/v1beta1/delegators/{delegator_addr}/validators/{validator_addr}': get: summary: |- DelegatorValidator queries validator info for given delegator validator @@ -14450,11 +16170,13 @@ paths: type: object properties: validator: - description: validator defines the the validator info. 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: @@ -14632,7 +16354,14 @@ paths: } 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 @@ -14640,67 +16369,119 @@ paths: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates - to be used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. update_time: type: string format: date-time - description: >- - Commission defines commission parameters for a given - validator. + 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: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -14901,7 +16682,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/historical_info/{height}': + '/lfb/staking/v1beta1/historical_info/{height}': get: summary: HistoricalInfo queries the historical info for given height. operationId: HistoricalInfo @@ -14999,6 +16780,9 @@ paths: 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: @@ -15179,7 +16963,14 @@ paths: } 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 @@ -15187,62 +16978,93 @@ paths: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission - rates to be used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. update_time: type: string format: date-time - description: >- - Commission defines commission parameters for a given - validator. + 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 @@ -15272,7 +17094,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -15469,7 +17291,7 @@ paths: format: int64 tags: - Query - /cosmos/staking/v1beta1/params: + /lfb/staking/v1beta1/params: get: summary: Parameters queries the staking parameters. operationId: StakingParams @@ -15485,22 +17307,31 @@ paths: 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. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -15690,7 +17521,7 @@ paths: } tags: - Query - /cosmos/staking/v1beta1/pool: + /lfb/staking/v1beta1/pool: get: summary: Pool queries the pool info. operationId: Pool @@ -15710,7 +17541,7 @@ paths: type: string description: QueryPoolResponse is response type for the Query/Pool RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -15900,7 +17731,7 @@ paths: } tags: - Query - /cosmos/staking/v1beta1/validators: + /lfb/staking/v1beta1/validators: get: summary: Validators queries all validators that match the given status. operationId: Validators @@ -15917,6 +17748,9 @@ paths: 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: @@ -16096,7 +17930,14 @@ paths: } 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 @@ -16104,62 +17945,92 @@ paths: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates - to be used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily + increase of the validator commission, as a + fraction. update_time: type: string format: date-time - description: >- - Commission defines commission parameters for a given - validator. + 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 @@ -16206,7 +18077,7 @@ paths: QueryValidatorsResponse is response type for the Query/Validators RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -16446,9 +18317,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}': + '/lfb/staking/v1beta1/validators/{validator_addr}': get: summary: Validator queries validator info for given validator address. operationId: Validator @@ -16459,11 +18331,13 @@ paths: type: object properties: validator: - description: validator defines the the validator info. 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: @@ -16641,7 +18515,14 @@ paths: } 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 @@ -16649,67 +18530,119 @@ paths: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates - to be used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. update_time: type: string format: date-time - description: >- - Commission defines commission parameters for a given - validator. + 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. + description: An unexpected error response schema: type: object properties: @@ -16905,7 +18838,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations': + '/lfb/staking/v1beta1/validators/{validator_addr}/delegations': get: summary: ValidatorDelegations queries delegate info for given validator. operationId: ValidatorDelegations @@ -16925,10 +18858,17 @@ paths: 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 @@ -16980,7 +18920,7 @@ paths: QueryValidatorDelegationsResponse is response type for the Query/ValidatorDelegations RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -17220,9 +19160,10 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': + '/lfb/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}': get: summary: Delegation queries delegate info for given validator delegator pair. operationId: Delegation @@ -17233,9 +19174,6 @@ paths: type: object properties: delegation_response: - description: >- - delegation_responses defines the delegation info of a - delegation. type: object properties: delegation: @@ -17243,10 +19181,17 @@ paths: 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 @@ -17270,11 +19215,17 @@ paths: 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: >- QueryDelegationResponse is response type for the Query/Delegation RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -17475,7 +19426,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': + '/lfb/staking/v1beta1/validators/{validator_addr}/delegations/{delegator_addr}/unbonding_delegation': get: summary: |- UnbondingDelegation queries unbonding info for given validator delegator @@ -17488,13 +19439,18 @@ paths: type: object properties: unbond: - description: unbond defines the unbonding information of a 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. entries: type: array items: @@ -17503,23 +19459,39 @@ paths: 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. description: >- QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -17720,7 +19692,7 @@ paths: type: string tags: - Query - '/cosmos/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': + '/lfb/staking/v1beta1/validators/{validator_addr}/unbonding_delegations': get: summary: >- ValidatorUnbondingDelegations queries unbonding delegations of a @@ -17739,8 +19711,14 @@ paths: 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: @@ -17749,16 +19727,29 @@ paths: 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 @@ -17788,7 +19779,7 @@ paths: Query/ValidatorUnbondingDelegations RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -18028,6 +20019,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query /lfb/tx/v1beta1/simulate: @@ -18092,6 +20084,7 @@ paths: format: byte index: type: boolean + format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -18112,7 +20105,7 @@ paths: SimulateResponse is the response type for the Service.SimulateRPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -18318,7 +20311,7 @@ paths: schema: $ref: '#/definitions/lfb.tx.v1beta1.GetTxsEventResponse' default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -18515,6 +20508,12 @@ paths: items: type: string collectionFormat: multi + - name: prove + description: prove is Include proofs of the transactions inclusion in the block. + in: query + required: false + type: boolean + format: boolean - name: pagination.key description: |- key is a value returned in PageResponse.next_key to begin @@ -18561,6 +20560,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Service post: @@ -18573,7 +20573,6 @@ paths: type: object properties: tx_response: - description: tx_response is the queried TxResponses. type: object properties: height: @@ -18660,7 +20659,6 @@ paths: format: int64 description: Amount of gas consumed by transaction. tx: - description: The request transaction bytes. type: object properties: type_url: @@ -18727,6 +20725,114 @@ paths: 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: >- @@ -18737,11 +20843,16 @@ paths: For height == 1, it's genesis time. + 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. + description: An unexpected error response schema: type: object properties: @@ -18976,7 +21087,7 @@ paths: schema: $ref: '#/definitions/lfb.tx.v1beta1.GetTxResponse' default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -19172,7 +21283,7 @@ paths: type: string tags: - Service - '/cosmos/upgrade/v1beta1/applied_plan/{name}': + '/lfb/upgrade/v1beta1/applied_plan/{name}': get: summary: AppliedPlan queries a previously applied upgrade plan by its name. operationId: AppliedPlan @@ -19192,7 +21303,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -19388,7 +21499,7 @@ paths: type: string tags: - Query - /cosmos/upgrade/v1beta1/current_plan: + /lfb/upgrade/v1beta1/current_plan: get: summary: CurrentPlan queries the current upgrade plan. operationId: CurrentPlan @@ -19447,20 +21558,6 @@ paths: such as a git commit that validators could automatically upgrade to upgraded_client_state: - title: >- - IBC-enabled chains can opt-in to including the upgraded - client state in its upgrade plan - - This will make the chain commit to the correct upgraded - (self) client state before the upgrade occurs, - - so that connecting chains can verify that the new upgraded - client is valid by verifying a proof on the - - previous version of the chain. - - This will allow IBC connections to persist smoothly across - planned chain upgrades type: object properties: type_url: @@ -19635,13 +21732,27 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: >- + IBC-enabled chains can opt-in to including the upgraded + client state in its upgrade plan + + This will make the chain commit to the correct upgraded + (self) client state before the upgrade occurs, + + so that connecting chains can verify that the new upgraded + client is valid by verifying a proof on the + + previous version of the chain. + + This will allow IBC connections to persist smoothly across + planned chain upgrades description: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -19831,7 +21942,7 @@ paths: } tags: - Query - '/cosmos/upgrade/v1beta1/upgraded_consensus_state/{last_height}': + '/lfb/upgrade/v1beta1/upgraded_consensus_state/{last_height}': get: summary: |- UpgradedConsensusState queries the consensus state that will serve @@ -20022,7 +22133,7 @@ paths: RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -20370,7 +22481,7 @@ paths: QueryChannelsResponse is the response type for the Query/Channels RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -20605,6 +22716,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}': @@ -20731,7 +22843,7 @@ paths: proof was retrieved. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -20954,7 +23066,6 @@ paths: type: string title: client identifier client_state: - title: client state type: object properties: type_url: @@ -21129,6 +23240,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -21169,7 +23281,7 @@ paths: QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -21383,7 +23495,6 @@ paths: type: object properties: consensus_state: - title: consensus state associated with the channel type: object properties: type_url: @@ -21554,6 +23665,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -21592,7 +23704,7 @@ paths: QueryChannelClientStateResponse is the Response type for the Query/QueryChannelClientState RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -21856,7 +23968,7 @@ paths: QuerySequenceResponse is the request type for the Query/QueryNextSequenceReceiveResponse RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -22159,7 +24271,7 @@ paths: QueryPacketAcknowledgemetsResponse is the request type for the Query/QueryPacketAcknowledgements RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -22404,6 +24516,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_acks/{sequence}': @@ -22459,7 +24572,7 @@ paths: proof was retrieved default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -22766,7 +24879,7 @@ paths: QueryPacketCommitmentsResponse is the request type for the Query/QueryPacketCommitments RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -23011,6 +25124,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/core/channel/v1beta1/channels/{channel_id}/ports/{port_id}/packet_commitments/{packet_ack_sequences}/unreceived_acks': @@ -23064,7 +25178,7 @@ paths: QueryUnreceivedAcksResponse is the response type for the Query/UnreceivedAcks RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -23326,7 +25440,7 @@ paths: QueryUnreceivedPacketsResponse is the response type for the Query/UnreceivedPacketCommitments RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -23591,7 +25705,7 @@ paths: retrieved default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -23812,6 +25926,7 @@ paths: properties: received: type: boolean + format: boolean title: success flag for if receipt exists proof: type: string @@ -23853,7 +25968,7 @@ paths: retrieved default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -24211,7 +26326,7 @@ paths: QueryConnectionChannelsResponse is the Response type for the Query/QueryConnectionChannels RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -24451,6 +26566,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query /ibc/client/v1beta1/params: @@ -24478,7 +26594,7 @@ paths: QueryClientParamsResponse is the response type for the Query/ClientParams RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -24687,7 +26803,6 @@ paths: type: string title: client identifier client_state: - title: client state type: object properties: type_url: @@ -24864,6 +26979,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -24904,7 +27020,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -25139,6 +27255,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/core/client/v1beta1/client_states/{client_id}': @@ -25152,7 +27269,6 @@ paths: type: object properties: client_state: - title: client state associated with the request identifier type: object properties: type_url: @@ -25323,6 +27439,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state associated with the request identifier proof: type: string format: byte @@ -25363,7 +27480,7 @@ paths: which the proof was retrieved. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -25604,7 +27721,6 @@ paths: be monitonically increasing even as the RevisionHeight gets reset consensus_state: - title: consensus state type: object properties: type_url: @@ -25781,6 +27897,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: consensus state description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. @@ -25817,7 +27934,7 @@ paths: QueryConsensusStatesResponse is the response type for the Query/ConsensusStates RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -26057,6 +28174,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/core/client/v1beta1/consensus_states/{client_id}/revision/{revision_number}/height/{revision_height}': @@ -26074,9 +28192,6 @@ paths: type: object properties: consensus_state: - title: >- - consensus state associated with the client identifier at the - given height type: object properties: type_url: @@ -26247,6 +28362,9 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: >- + consensus state associated with the client identifier at the + given height proof: type: string format: byte @@ -26284,7 +28402,7 @@ paths: RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -26499,6 +28617,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/core/connection/v1beta1/client_connections/{client_id}': @@ -26553,7 +28672,7 @@ paths: QueryClientConnectionsResponse is the response type for the Query/ClientConnections RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -26907,7 +29026,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -27142,6 +29261,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/core/connection/v1beta1/connections/{connection_id}': @@ -27285,7 +29405,7 @@ paths: which the proof was retrieved. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -27501,7 +29621,6 @@ paths: type: string title: client identifier client_state: - title: client state type: object properties: type_url: @@ -27676,6 +29795,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -27716,7 +29836,7 @@ paths: QueryConnectionClientStateResponse is the response type for the Query/ConnectionClientState RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -27925,7 +30045,6 @@ paths: type: object properties: consensus_state: - title: consensus state associated with the channel type: object properties: type_url: @@ -28096,6 +30215,7 @@ paths: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -28134,7 +30254,7 @@ paths: QueryConnectionConsensusStateResponse is the response type for the Query/ConnectionConsensusState RPC method default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -28395,7 +30515,7 @@ paths: method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -28463,6 +30583,7 @@ paths: in: query required: false type: boolean + format: boolean tags: - Query '/ibc/applications/transfer/v1beta1/denom_traces/{hash}': @@ -28476,9 +30597,6 @@ paths: type: object properties: denom_trace: - description: >- - denom_trace returns the requested denomination trace - information. type: object properties: path: @@ -28491,13 +30609,18 @@ paths: base_denom: type: string description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible + tokens and the + + source tracing information path. description: >- QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -28542,6 +30665,7 @@ paths: properties: send_enabled: type: boolean + format: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this @@ -28549,6 +30673,7 @@ paths: chain. receive_enabled: type: boolean + format: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this @@ -28558,7 +30683,7 @@ paths: QueryParamsResponse is the response type for the Query/Params RPC method. default: - description: An unexpected error response. + description: An unexpected error response schema: type: object properties: @@ -29845,133 +31970,23 @@ definitions: example: MaxValidators subkey: type: string - example: '' - value: - type: object - Supply: - type: object - properties: - total: - type: array - items: - type: object - properties: - denom: - type: string - example: stake - amount: - type: string - example: '50' - lfb.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. - lfb.auth.v1beta1.QueryAccountResponse: - type: object - properties: - account: - description: account defines the account of the corresponding address. - 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: >- - QueryAccountResponse is the response type for the Query/Account RPC - method. - lfb.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. + example: '' + value: + type: object + Supply: + type: object + properties: + total: + type: array + items: + type: object + properties: + denom: + type: string + example: stake + amount: + type: string + example: '50' google.protobuf.Any: type: object properties: @@ -30301,6 +32316,196 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + lfb.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. + lfb.auth.v1beta1.QueryAccountResponse: + type: object + properties: + account: + description: account defines the account of the corresponding address. + 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: >- + QueryAccountResponse is the response type for the Query/Account RPC + method. + lfb.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. + lfb.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. + lfb.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. + description: |- + Metadata represents a struct that describes + a basic token. lfb.bank.v1beta1.Params: type: object properties: @@ -30313,6 +32518,7 @@ definitions: type: string enabled: type: boolean + format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -30320,6 +32526,7 @@ definitions: sendable). default_send_enabled: type: boolean + format: boolean description: Params defines the parameters for the bank module. lfb.bank.v1beta1.QueryAllBalancesResponse: type: object @@ -30366,15 +32573,162 @@ definitions: type: object properties: balance: - description: balance is the balance of the 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. description: >- QueryBalanceResponse is the response type for the Query/Balance RPC + method. + lfb.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. + description: |- + Metadata represents a struct that describes + a basic token. + description: >- + QueryDenomMetadataResponse is the response type for the + Query/DenomMetadata RPC + + method. + lfb.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. + 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. lfb.bank.v1beta1.QueryParamsResponse: type: object @@ -30391,6 +32745,7 @@ definitions: type: string enabled: type: boolean + format: boolean description: >- SendEnabled maps coin denom to a send_enabled status (whether a denom is @@ -30398,6 +32753,7 @@ definitions: 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 @@ -30406,13 +32762,17 @@ definitions: type: object properties: amount: - description: amount is the supply of the 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. description: >- QuerySupplyOfResponse is the response type for the Query/SupplyOf RPC method. @@ -30446,6 +32806,7 @@ definitions: type: string enabled: type: boolean + format: boolean description: |- SendEnabled maps coin denom to a send_enabled status (whether a denom is sendable). @@ -30476,6 +32837,7 @@ definitions: 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 @@ -30513,23 +32875,574 @@ definitions: 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; - } - lfb.base.v1beta1.Coin: - type: object - properties: - denom: - type: string - amount: - type: string - description: |- - Coin defines a token with a denomination and an amount. + message SomeResponse { + repeated Bar results = 1; + PageResponse page = 2; + } + lfb.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. + lfb.base.ostracon.v1beta1.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, - NOTE: The amount field is an Int which implements the custom method - signatures required by gogoproto. - lfb.base.tendermint.v1beta1.GetBlockByHeightResponse: + 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 Ostracon 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 Ostracon 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 Ostracon 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: >- + GetBlockByHashResponse is the response type for the Query/GetBlockByHash + RPC method. + lfb.base.ostracon.v1beta1.GetBlockByHeightResponse: type: object properties: block_id: @@ -30582,7 +33495,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -30598,6 +33510,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -30822,7 +33735,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -30838,6 +33750,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -30952,7 +33865,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -30976,7 +33889,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -31008,7 +33921,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Ostracon Validators voting_power: type: string format: int64 @@ -31080,7 +33993,238 @@ definitions: description: >- GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC method. - lfb.base.tendermint.v1beta1.GetLatestBlockResponse: + lfb.base.ostracon.v1beta1.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 Ostracon + 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. + lfb.base.ostracon.v1beta1.GetLatestBlockResponse: type: object properties: block_id: @@ -31133,7 +34277,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -31149,6 +34292,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -31373,7 +34517,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -31389,6 +34532,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -31503,7 +34647,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -31527,7 +34671,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -31559,7 +34703,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Ostracon Validators voting_power: type: string format: int64 @@ -31631,7 +34775,7 @@ definitions: description: >- GetLatestBlockResponse is the response type for the Query/GetLatestBlock RPC method. - lfb.base.tendermint.v1beta1.GetLatestValidatorSetResponse: + lfb.base.ostracon.v1beta1.GetLatestValidatorSetResponse: type: object properties: block_height: @@ -31841,7 +34985,7 @@ definitions: description: >- GetLatestValidatorSetResponse is the response type for the Query/GetValidatorSetByHeight RPC method. - lfb.base.tendermint.v1beta1.GetNodeInfoResponse: + lfb.base.ostracon.v1beta1.GetNodeInfoResponse: type: object properties: default_node_info: @@ -31913,15 +35057,16 @@ definitions: description: >- GetNodeInfoResponse is the request type for the Query/GetNodeInfo RPC method. - lfb.base.tendermint.v1beta1.GetSyncingResponse: + lfb.base.ostracon.v1beta1.GetSyncingResponse: type: object properties: syncing: type: boolean + format: boolean description: >- GetSyncingResponse is the response type for the Query/GetSyncing RPC method. - lfb.base.tendermint.v1beta1.GetValidatorSetByHeightResponse: + lfb.base.ostracon.v1beta1.GetValidatorSetByHeightResponse: type: object properties: block_height: @@ -32131,7 +35276,7 @@ definitions: description: >- GetValidatorSetByHeightResponse is the response type for the Query/GetValidatorSetByHeight RPC method. - lfb.base.tendermint.v1beta1.Module: + lfb.base.ostracon.v1beta1.Module: type: object properties: path: @@ -32144,7 +35289,7 @@ definitions: type: string title: checksum title: Module is the type for VersionInfo - lfb.base.tendermint.v1beta1.Validator: + lfb.base.ostracon.v1beta1.Validator: type: object properties: address: @@ -32315,7 +35460,7 @@ definitions: type: string format: int64 description: Validator is the type for the validator-set. - lfb.base.tendermint.v1beta1.VersionInfo: + lfb.base.ostracon.v1beta1.VersionInfo: type: object properties: name: @@ -32346,7 +35491,364 @@ definitions: title: checksum title: Module is the type for VersionInfo description: VersionInfo is the type for the GetNodeInfoResponse message. - tendermint.crypto.PublicKey: + ostracon.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. + ostracon.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. + + + 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 + ostracon.abci.Event: + 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. + ostracon.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.' + ostracon.abci.ResponseBeginBlock: + 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. + ostracon.abci.ResponseDeliverTx: + 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 + ostracon.abci.ResponseEndBlock: + 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 Ostracon + 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. + ostracon.abci.ValidatorUpdate: + 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 Ostracon Validators + power: + type: string + format: int64 + title: ValidatorUpdate + ostracon.crypto.PublicKey: type: object properties: ed25519: @@ -32355,8 +35857,8 @@ definitions: secp256k1: type: string format: byte - title: PublicKey defines the keys available for use with Tendermint Validators - tendermint.p2p.DefaultNodeInfo: + title: PublicKey defines the keys available for use with Ostracon Validators + ostracon.p2p.DefaultNodeInfo: type: object properties: protocol_version: @@ -32391,14 +35893,14 @@ definitions: type: string rpc_address: type: string - tendermint.p2p.DefaultNodeInfoOther: + ostracon.p2p.DefaultNodeInfoOther: type: object properties: tx_index: type: string rpc_address: type: string - tendermint.p2p.ProtocolVersion: + ostracon.p2p.ProtocolVersion: type: object properties: p2p: @@ -32410,7 +35912,7 @@ definitions: app: type: string format: uint64 - tendermint.types.Block: + ostracon.types.Block: type: object properties: header: @@ -32443,7 +35945,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -32459,6 +35960,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -32682,7 +36184,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -32698,6 +36199,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -32812,7 +36314,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for - use with Tendermint Validators + use with Ostracon Validators voting_power: type: string format: int64 @@ -32836,7 +36338,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Ostracon Validators voting_power: type: string format: int64 @@ -32868,7 +36370,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Ostracon Validators voting_power: type: string format: int64 @@ -32937,7 +36439,7 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. - tendermint.types.BlockID: + ostracon.types.BlockID: type: object properties: hash: @@ -32954,7 +36456,7 @@ definitions: format: byte title: PartsetHeader title: BlockID - tendermint.types.BlockIDFlag: + ostracon.types.BlockIDFlag: type: string enum: - BLOCK_ID_FLAG_UNKNOWN @@ -32963,7 +36465,7 @@ definitions: - BLOCK_ID_FLAG_NIL default: BLOCK_ID_FLAG_UNKNOWN title: BlockIdFlag indicates which BlcokID the signature is for - tendermint.types.Commit: + ostracon.types.Commit: type: object properties: height: @@ -33016,7 +36518,7 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. - tendermint.types.CommitSig: + ostracon.types.CommitSig: type: object properties: block_id_flag: @@ -33038,7 +36540,7 @@ definitions: type: string format: byte description: CommitSig is a part of the Vote included in a Commit. - tendermint.types.Data: + ostracon.types.Data: type: object properties: txs: @@ -33054,7 +36556,7 @@ definitions: This means that block.AppHash does not include these txs. title: Data contains the set of transactions included in the block - tendermint.types.DuplicateVoteEvidence: + ostracon.types.DuplicateVoteEvidence: type: object properties: vote_a: @@ -33181,7 +36683,7 @@ definitions: description: >- DuplicateVoteEvidence contains evidence of a validator signed two conflicting votes. - tendermint.types.Evidence: + ostracon.types.Evidence: type: object properties: duplicate_vote_evidence: @@ -33350,7 +36852,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -33366,6 +36867,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -33476,7 +36978,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Ostracon Validators voting_power: type: string format: int64 @@ -33500,7 +37002,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Ostracon Validators voting_power: type: string format: int64 @@ -33531,7 +37033,7 @@ definitions: type: string format: byte title: >- - PublicKey defines the keys available for use with Tendermint + PublicKey defines the keys available for use with Ostracon Validators voting_power: type: string @@ -33548,7 +37050,7 @@ definitions: description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. - tendermint.types.EvidenceList: + ostracon.types.EvidenceList: type: object properties: evidence: @@ -33724,7 +37226,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -33740,6 +37241,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -33852,7 +37354,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Ostracon Validators voting_power: type: string format: int64 @@ -33876,7 +37378,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use - with Tendermint Validators + with Ostracon Validators voting_power: type: string format: int64 @@ -33908,7 +37410,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Ostracon Validators voting_power: type: string format: int64 @@ -33924,7 +37426,43 @@ definitions: description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. - tendermint.types.Header: + ostracon.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. + ostracon.types.Header: type: object properties: version: @@ -33954,7 +37492,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -33970,6 +37507,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -34001,7 +37539,7 @@ definitions: type: string format: byte description: Header defines the structure of a Tendermint block header. - tendermint.types.LightBlock: + ostracon.types.LightBlock: type: object properties: signed_header: @@ -34037,7 +37575,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -34053,6 +37590,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -34158,7 +37696,7 @@ definitions: type: string format: byte title: >- - PublicKey defines the keys available for use with Tendermint + PublicKey defines the keys available for use with Ostracon Validators voting_power: type: string @@ -34182,7 +37720,7 @@ definitions: type: string format: byte title: >- - PublicKey defines the keys available for use with Tendermint + PublicKey defines the keys available for use with Ostracon Validators voting_power: type: string @@ -34193,7 +37731,7 @@ definitions: total_voting_power: type: string format: int64 - tendermint.types.LightClientAttackEvidence: + ostracon.types.LightClientAttackEvidence: type: object properties: conflicting_block: @@ -34232,7 +37770,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -34248,6 +37785,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -34356,7 +37894,7 @@ definitions: format: byte title: >- PublicKey defines the keys available for use with - Tendermint Validators + Ostracon Validators voting_power: type: string format: int64 @@ -34379,8 +37917,8 @@ definitions: type: string format: byte title: >- - PublicKey defines the keys available for use with - Tendermint Validators + PublicKey defines the keys available for use with Ostracon + Validators voting_power: type: string format: int64 @@ -34411,7 +37949,7 @@ definitions: type: string format: byte title: >- - PublicKey defines the keys available for use with Tendermint + PublicKey defines the keys available for use with Ostracon Validators voting_power: type: string @@ -34428,7 +37966,7 @@ definitions: description: >- LightClientAttackEvidence contains evidence of a set of validators attempting to mislead a light client. - tendermint.types.PartSetHeader: + ostracon.types.PartSetHeader: type: object properties: total: @@ -34438,7 +37976,7 @@ definitions: type: string format: byte title: PartsetHeader - tendermint.types.SignedHeader: + ostracon.types.SignedHeader: type: object properties: header: @@ -34471,7 +38009,6 @@ definitions: type: string format: date-time last_block_id: - title: prev block info type: object properties: hash: @@ -34487,6 +38024,7 @@ definitions: type: string format: byte title: PartsetHeader + title: BlockID last_commit_hash: type: string format: byte @@ -34571,7 +38109,7 @@ definitions: description: >- Commit contains the evidence that a block was committed by a set of validators. - tendermint.types.SignedMsgType: + ostracon.types.SignedMsgType: type: string enum: - SIGNED_MSG_TYPE_UNKNOWN @@ -34584,7 +38122,7 @@ definitions: - SIGNED_MSG_TYPE_PREVOTE: Votes - SIGNED_MSG_TYPE_PROPOSAL: Proposals - tendermint.types.Validator: + ostracon.types.Validator: type: object properties: address: @@ -34599,16 +38137,24 @@ definitions: secp256k1: type: string format: byte - title: >- - PublicKey defines the keys available for use with Tendermint - Validators + title: PublicKey defines the keys available for use with Ostracon Validators voting_power: type: string format: int64 proposer_priority: type: string format: int64 - tendermint.types.ValidatorSet: + ostracon.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. + ostracon.types.ValidatorSet: type: object properties: validators: @@ -34629,7 +38175,7 @@ definitions: type: string format: byte title: >- - PublicKey defines the keys available for use with Tendermint + PublicKey defines the keys available for use with Ostracon Validators voting_power: type: string @@ -34653,7 +38199,7 @@ definitions: type: string format: byte title: >- - PublicKey defines the keys available for use with Tendermint + PublicKey defines the keys available for use with Ostracon Validators voting_power: type: string @@ -34664,7 +38210,14 @@ definitions: total_voting_power: type: string format: int64 - tendermint.types.Vote: + ostracon.types.VersionParams: + type: object + properties: + app_version: + type: string + format: uint64 + description: VersionParams contains the ABCI application version. + ostracon.types.Vote: type: object properties: type: @@ -34718,7 +38271,7 @@ definitions: description: |- Vote represents a prevote, precommit, or commit vote from validators for consensus. - tendermint.version.Consensus: + ostracon.version.Consensus: type: object properties: block: @@ -34780,6 +38333,7 @@ definitions: type: string withdraw_addr_enabled: type: boolean + format: boolean description: Params defines the set of params for the distribution module. lfb.distribution.v1beta1.QueryCommunityPoolResponse: type: object @@ -34910,6 +38464,7 @@ definitions: type: string withdraw_addr_enabled: type: boolean + format: boolean description: QueryParamsResponse is the response type for the Query/Params RPC method. lfb.distribution.v1beta1.QueryValidatorCommissionResponse: type: object @@ -35259,7 +38814,6 @@ definitions: type: object properties: evidence: - description: evidence returns the requested evidence. type: object properties: type_url: @@ -35320,6 +38874,104 @@ definitions: 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. @@ -35629,7 +39281,6 @@ definitions: type: object properties: deposit: - description: deposit defines the requested deposit. type: object properties: proposal_id: @@ -35654,6 +39305,9 @@ definitions: 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. @@ -36290,7 +39944,6 @@ definitions: type: object properties: tally: - description: tally defines the requested tally. type: object properties: 'yes': @@ -36301,6 +39954,7 @@ definitions: type: string no_with_veto: type: string + description: TallyResult defines a standard tally for a governance proposal. description: >- QueryTallyResultResponse is the response type for the Query/Tally RPC method. @@ -36308,7 +39962,6 @@ definitions: type: object properties: vote: - description: vote defined the queried vote. type: object properties: proposal_id: @@ -36334,6 +39987,9 @@ definitions: - 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. + description: |- + Vote defines a vote on a governance proposal. + A Vote consists of a proposal ID, the voter, and the vote option. description: QueryVoteResponse is the response type for the Query/Vote RPC method. lfb.gov.v1beta1.QueryVotesResponse: type: object @@ -36617,7 +40273,6 @@ definitions: type: object properties: val_signing_info: - title: val_signing_info is the signing info of requested val cons address type: object properties: address: @@ -36636,6 +40291,7 @@ definitions: title: timestamp validator cannot be unjailed until tombstoned: type: boolean + format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -36650,6 +40306,7 @@ definitions: 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 @@ -36679,6 +40336,7 @@ definitions: title: timestamp validator cannot be unjailed until tombstoned: type: boolean + format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -36743,6 +40401,7 @@ definitions: title: timestamp validator cannot be unjailed until tombstoned: type: boolean + format: boolean title: >- whether or not a validator has been tombstoned (killed out of validator @@ -36776,32 +40435,45 @@ definitions: 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: >- - CommissionRates defines the initial commission rates to be used for - creating - - a validator. + 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. description: Commission defines commission parameters for a given validator. lfb.staking.v1beta1.CommissionRates: 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. description: >- CommissionRates defines the initial commission rates to be used for creating @@ -36812,10 +40484,13 @@ definitions: 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 @@ -36828,10 +40503,13 @@ definitions: 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 @@ -36856,14 +40534,21 @@ definitions: 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. description: Description defines a validator description. lfb.staking.v1beta1.HistoricalInfo: type: object @@ -36952,6 +40637,9 @@ definitions: 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: @@ -37123,7 +40811,12 @@ definitions: } 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 @@ -37131,60 +40824,85 @@ definitions: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates to be - used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. update_time: type: string format: date-time - description: Commission defines commission parameters for a given validator. + 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 @@ -37221,17 +40939,24 @@ definitions: 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: Params defines the parameters for the staking module. lfb.staking.v1beta1.Pool: type: object @@ -37247,7 +40972,6 @@ definitions: type: object properties: delegation_response: - description: delegation_responses defines the delegation info of a delegation. type: object properties: delegation: @@ -37255,10 +40979,17 @@ definitions: 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 @@ -37282,6 +41013,12 @@ definitions: 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: >- QueryDelegationResponse is response type for the Query/Delegation RPC method. @@ -37298,10 +41035,17 @@ definitions: 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 @@ -37363,8 +41107,14 @@ definitions: 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: @@ -37373,16 +41123,25 @@ definitions: 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 @@ -37413,11 +41172,13 @@ definitions: type: object properties: validator: - description: validator defines the the validator info. 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: @@ -37585,7 +41346,12 @@ definitions: } 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 @@ -37593,60 +41359,104 @@ definitions: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates to be - used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. update_time: type: string format: date-time - description: Commission defines commission parameters for a given validator. + 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: |- QueryDelegatorValidatorResponse response type for the Query/DelegatorValidator RPC method. @@ -37660,6 +41470,9 @@ definitions: 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: @@ -37831,7 +41644,12 @@ definitions: } 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 @@ -37839,60 +41657,85 @@ definitions: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates to be - used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. update_time: type: string format: date-time - description: Commission defines commission parameters for a given validator. + 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 @@ -38027,6 +41870,9 @@ definitions: 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: @@ -38204,7 +42050,12 @@ definitions: } 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 @@ -38212,62 +42063,85 @@ definitions: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates to - be used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase + of the validator commission, as a fraction. update_time: type: string format: date-time - description: >- - Commission defines commission parameters for a given - validator. + 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 @@ -38305,17 +42179,24 @@ definitions: 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. lfb.staking.v1beta1.QueryPoolResponse: type: object @@ -38342,10 +42223,19 @@ definitions: 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: @@ -38354,16 +42244,29 @@ definitions: 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 @@ -38381,13 +42284,25 @@ definitions: 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. @@ -38436,13 +42351,14 @@ definitions: type: object properties: unbond: - description: unbond defines the unbonding information of a 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. entries: type: array items: @@ -38451,16 +42367,28 @@ definitions: 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. description: |- QueryDelegationResponse is response type for the Query/UnbondingDelegation RPC method. @@ -38477,10 +42405,17 @@ definitions: 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 @@ -38535,11 +42470,13 @@ definitions: type: object properties: validator: - description: validator defines the the validator info. 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: @@ -38707,7 +42644,12 @@ definitions: } 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 @@ -38715,60 +42657,104 @@ definitions: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates to be - used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. update_time: type: string format: date-time - description: Commission defines commission parameters for a given validator. + 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 lfb.staking.v1beta1.QueryValidatorUnbondingDelegationsResponse: type: object @@ -38780,8 +42766,14 @@ definitions: 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: @@ -38790,16 +42782,25 @@ definitions: 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 @@ -38836,6 +42837,9 @@ definitions: 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: @@ -39007,7 +43011,12 @@ definitions: } 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 @@ -39015,60 +43024,85 @@ definitions: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates to be - used for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase of + the validator commission, as a fraction. update_time: type: string format: date-time - description: Commission defines commission parameters for a given validator. + 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 @@ -39117,10 +43151,17 @@ definitions: 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: @@ -39129,16 +43170,29 @@ definitions: 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 @@ -39150,13 +43204,19 @@ definitions: 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. lfb.staking.v1beta1.RedelegationEntryResponse: type: object @@ -39167,13 +43227,23 @@ definitions: 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. @@ -39194,10 +43264,17 @@ definitions: 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: @@ -39206,16 +43283,29 @@ definitions: 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 @@ -39233,13 +43323,25 @@ definitions: 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. @@ -39265,8 +43367,10 @@ definitions: 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: @@ -39275,16 +43379,23 @@ definitions: 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. @@ -39294,13 +43405,19 @@ definitions: 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. @@ -39309,6 +43426,9 @@ definitions: 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: @@ -39470,7 +43590,12 @@ definitions: } 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 @@ -39478,60 +43603,81 @@ definitions: - BOND_STATUS_UNBONDING - BOND_STATUS_BONDED default: BOND_STATUS_UNSPECIFIED - description: |- - BondStatus is the status of a validator. - - - BOND_STATUS_UNSPECIFIED: UNSPECIFIED defines an invalid validator status. - - BOND_STATUS_UNBONDED: UNBONDED defines a validator that is not bonded. - - BOND_STATUS_UNBONDING: UNBONDING defines a validator that is unbonding. - - BOND_STATUS_BONDED: BONDED defines a validator that is bonded. 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: Description defines a validator description. + 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: >- - CommissionRates defines the initial commission rates to be used - for creating - - a validator. + description: >- + max_change_rate defines the maximum daily increase of the + validator commission, as a fraction. update_time: type: string format: date-time - description: Commission defines commission parameters for a given validator. + 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 @@ -39647,6 +43793,7 @@ definitions: format: byte index: type: boolean + format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -39768,7 +43915,6 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: - description: The request transaction bytes. type: object properties: type_url: @@ -39829,6 +43975,104 @@ definitions: 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: >- @@ -40011,7 +44255,6 @@ definitions: type: object properties: tx_response: - description: tx_response is the queried TxResponses. type: object properties: height: @@ -40096,7 +44339,6 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: - description: The request transaction bytes. type: object properties: type_url: @@ -40160,6 +44402,107 @@ definitions: 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: >- @@ -40170,6 +44513,11 @@ definitions: height == 1, it's genesis time. + 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. @@ -40234,7 +44582,6 @@ definitions: $ref: '#/definitions/lfb.tx.v1beta1.Tx' description: tx is the queried transaction. tx_response: - description: tx_response is the queried TxResponses. type: object properties: height: @@ -40319,7 +44666,6 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: - description: The request transaction bytes. type: object properties: type_url: @@ -40383,6 +44729,107 @@ definitions: 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: >- @@ -40393,6 +44840,11 @@ definitions: height == 1, it's genesis time. + description: >- + TxResponse defines a structure containing relevant tx data and + metadata. The + + tags are stringified and the log is JSON decoded. description: GetTxResponse is the response type for the Service.GetTx method. lfb.tx.v1beta1.GetTxsEventResponse: type: object @@ -40489,7 +44941,6 @@ definitions: format: int64 description: Amount of gas consumed by transaction. tx: - description: The request transaction bytes. type: object properties: type_url: @@ -40555,6 +45006,109 @@ definitions: 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: >- @@ -40691,14 +45245,6 @@ definitions: type: object properties: public_key: - description: >- - public_key is the public key of the signer. It is optional for - accounts - - that already exist in state. If unset, the verifier can use the - required \ - - signer address for this position and lookup the public key. type: object properties: type_url: @@ -40759,6 +45305,104 @@ definitions: 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" + } mode_info: $ref: '#/definitions/lfb.tx.v1beta1.ModeInfo' title: |- @@ -40841,6 +45485,7 @@ definitions: format: byte index: type: boolean + format: boolean description: >- EventAttribute is a single key-value pair, associated with an event. @@ -41050,7 +45695,6 @@ definitions: the list only the first time it occurs. - By convention, the first required signer (usually from the first message) @@ -41622,7 +46266,6 @@ definitions: the list only the first time it occurs. - By convention, the first required signer (usually from the first message) @@ -41808,217 +46451,179 @@ 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: - 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: + and can't be handled, the transaction will be rejected + non_critical_extension_options: 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 - 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: - type: object - properties: - key: - type: string - format: byte - value: - type: string - format: byte - index: - type: boolean - description: 'EventAttribute is a single key-value pair, associated with an event.' + + 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. lfb.upgrade.v1beta1.Plan: type: object properties: @@ -42060,20 +46665,6 @@ definitions: Any application specific upgrade info to be included on-chain such as a git commit that validators could automatically upgrade to upgraded_client_state: - title: >- - IBC-enabled chains can opt-in to including the upgraded client state - in its upgrade plan - - This will make the chain commit to the correct upgraded (self) client - state before the upgrade occurs, - - so that connecting chains can verify that the new upgraded client is - valid by verifying a proof on the - - previous version of the chain. - - This will allow IBC connections to persist smoothly across planned - chain upgrades type: object properties: type_url: @@ -42232,6 +46823,20 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: >- + IBC-enabled chains can opt-in to including the upgraded client state + in its upgrade plan + + This will make the chain commit to the correct upgraded (self) client + state before the upgrade occurs, + + so that connecting chains can verify that the new upgraded client is + valid by verifying a proof on the + + previous version of the chain. + + This will allow IBC connections to persist smoothly across planned + chain upgrades description: >- Plan specifies information about a planned upgrade and when it should occur. @@ -42296,20 +46901,6 @@ definitions: such as a git commit that validators could automatically upgrade to upgraded_client_state: - title: >- - IBC-enabled chains can opt-in to including the upgraded client - state in its upgrade plan - - This will make the chain commit to the correct upgraded (self) - client state before the upgrade occurs, - - so that connecting chains can verify that the new upgraded client - is valid by verifying a proof on the - - previous version of the chain. - - This will allow IBC connections to persist smoothly across planned - chain upgrades type: object properties: type_url: @@ -42474,6 +47065,20 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: >- + IBC-enabled chains can opt-in to including the upgraded client + state in its upgrade plan + + This will make the chain commit to the correct upgraded (self) + client state before the upgrade occurs, + + so that connecting chains can verify that the new upgraded client + is valid by verifying a proof on the + + previous version of the chain. + + This will allow IBC connections to persist smoothly across planned + chain upgrades description: >- QueryCurrentPlanResponse is the response type for the Query/CurrentPlan RPC @@ -42835,7 +47440,6 @@ definitions: type: string title: client identifier client_state: - title: client state type: object properties: type_url: @@ -43000,6 +47604,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state description: |- IdentifiedClientState defines a client state with an additional client identifier field. @@ -43039,7 +47644,6 @@ definitions: type: object properties: consensus_state: - title: consensus state associated with the channel type: object properties: type_url: @@ -43198,6 +47802,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -43902,6 +48507,7 @@ definitions: properties: received: type: boolean + format: boolean title: success flag for if receipt exists proof: type: string @@ -44071,7 +48677,6 @@ definitions: type: string title: client identifier client_state: - title: client state type: object properties: type_url: @@ -44230,6 +48835,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state description: |- IdentifiedClientState defines a client state with an additional client identifier field. @@ -44262,7 +48868,6 @@ definitions: be monitonically increasing even as the RevisionHeight gets reset consensus_state: - title: consensus state type: object properties: type_url: @@ -44421,6 +49026,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: consensus state description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. @@ -44452,7 +49058,6 @@ definitions: type: object properties: client_state: - title: client state associated with the request identifier type: object properties: type_url: @@ -44611,6 +49216,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state associated with the request identifier proof: type: string format: byte @@ -44659,7 +49265,6 @@ definitions: type: string title: client identifier client_state: - title: client state type: object properties: type_url: @@ -44828,6 +49433,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state description: >- IdentifiedClientState defines a client state with an additional client @@ -44869,9 +49475,6 @@ definitions: type: object properties: consensus_state: - title: >- - consensus state associated with the client identifier at the given - height type: object properties: type_url: @@ -45030,6 +49633,9 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: >- + consensus state associated with the client identifier at the given + height proof: type: string format: byte @@ -45100,7 +49706,6 @@ definitions: be monitonically increasing even as the RevisionHeight gets reset consensus_state: - title: consensus state type: object properties: type_url: @@ -45269,6 +49874,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: consensus state description: >- ConsensusStateWithHeight defines a consensus state with an additional height field. @@ -45560,7 +50166,6 @@ definitions: type: string title: client identifier client_state: - title: client state type: object properties: type_url: @@ -45725,6 +50330,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: client state description: |- IdentifiedClientState defines a client state with an additional client identifier field. @@ -45764,7 +50370,6 @@ definitions: type: object properties: consensus_state: - title: consensus state associated with the channel type: object properties: type_url: @@ -45923,6 +50528,7 @@ definitions: "@type": "type.googleapis.com/google.protobuf.Duration", "value": "1.212s" } + title: consensus state associated with the channel client_id: type: string title: client ID associated with the consensus state @@ -46281,6 +50887,7 @@ definitions: properties: send_enabled: type: boolean + format: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this @@ -46288,6 +50895,7 @@ definitions: chain. receive_enabled: type: boolean + format: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this @@ -46306,7 +50914,6 @@ definitions: type: object properties: denom_trace: - description: denom_trace returns the requested denomination trace information. type: object properties: path: @@ -46319,6 +50926,11 @@ definitions: base_denom: type: string description: base denomination of the relayed fungible token. + description: >- + DenomTrace contains the base denomination for ICS20 fungible tokens + and the + + source tracing information path. description: |- QueryDenomTraceResponse is the response type for the Query/DenomTrace RPC method. @@ -46378,6 +50990,7 @@ definitions: properties: send_enabled: type: boolean + format: boolean description: >- send_enabled enables or disables all cross-chain token transfers from this @@ -46385,6 +50998,7 @@ definitions: chain. receive_enabled: type: boolean + format: boolean description: >- receive_enabled enables or disables all cross-chain token transfers to this diff --git a/client/flags/flags.go b/client/flags/flags.go index 117313bc59..b5bf78d8bf 100644 --- a/client/flags/flags.go +++ b/client/flags/flags.go @@ -48,7 +48,7 @@ const ( FlagGasAdjustment = "gas-adjustment" FlagFrom = "from" FlagName = "name" - FlagAccountNumber = "account-number" + FlagSigBlockHeight = "sig-block-height" FlagSequence = "sequence" FlagMemo = "memo" FlagFees = "fees" @@ -96,7 +96,7 @@ func AddQueryFlagsToCmd(cmd *cobra.Command) { func AddTxFlagsToCmd(cmd *cobra.Command) { 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)") + cmd.Flags().Uint64P(FlagSigBlockHeight, "n", 0, "The block height to be included in the tx body to protect from replaying") cmd.Flags().Uint64P(FlagSequence, "s", 0, "The sequence number of the signing account (offline mode only)") cmd.Flags().String(FlagMemo, "", "Memo to send along with transaction") cmd.Flags().String(FlagFees, "", "Fees to pay along with transaction; eg: 10uatom") diff --git a/client/grpc/tmservice/block.go b/client/grpc/tmservice/block.go index 703bd81951..76de7d69df 100644 --- a/client/grpc/tmservice/block.go +++ b/client/grpc/tmservice/block.go @@ -17,3 +17,23 @@ func getBlock(clientCtx client.Context, height *int64) (*ctypes.ResultBlock, err return node.Block(context.Background(), height) } + +func getBlockByHash(clientCtx client.Context, hash []byte) (*ctypes.ResultBlock, error) { + // get the node + node, err := clientCtx.GetNode() + if err != nil { + return nil, err + } + + return node.BlockByHash(context.Background(), hash) +} + +func getBlockResultsByHeight(clientCtx client.Context, height *int64) (*ctypes.ResultBlockResults, error) { + // get the node + node, err := clientCtx.GetNode() + if err != nil { + return nil, err + } + + return node.BlockResults(context.Background(), height) +} diff --git a/client/grpc/tmservice/query.pb.go b/client/grpc/tmservice/query.pb.go index ffb1b41364..e999387c09 100644 --- a/client/grpc/tmservice/query.pb.go +++ b/client/grpc/tmservice/query.pb.go @@ -11,6 +11,7 @@ import ( proto "github.com/gogo/protobuf/proto" types "github.com/line/lfb-sdk/codec/types" query "github.com/line/lfb-sdk/types/query" + types2 "github.com/line/ostracon/abci/types" p2p "github.com/line/ostracon/proto/ostracon/p2p" types1 "github.com/line/ostracon/proto/ostracon/types" _ "google.golang.org/genproto/googleapis/api/annotations" @@ -424,6 +425,218 @@ func (m *GetBlockByHeightResponse) GetBlock() *types1.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_52842f5d9c655164, []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 *types1.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_52842f5d9c655164, []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() *types1.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_52842f5d9c655164, []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 []*types2.ResponseDeliverTx `protobuf:"bytes,2,rep,name=txs_results,json=txsResults,proto3" json:"txs_results,omitempty"` + ResBeginBlock *types2.ResponseBeginBlock `protobuf:"bytes,3,opt,name=res_begin_block,json=resBeginBlock,proto3" json:"res_begin_block,omitempty"` + ResEndBlock *types2.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_52842f5d9c655164, []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() []*types2.ResponseDeliverTx { + if m != nil { + return m.TxsResults + } + return nil +} + +func (m *GetBlockResultsByHeightResponse) GetResBeginBlock() *types2.ResponseBeginBlock { + if m != nil { + return m.ResBeginBlock + } + return nil +} + +func (m *GetBlockResultsByHeightResponse) GetResEndBlock() *types2.ResponseEndBlock { + if m != nil { + return m.ResEndBlock + } + return nil +} + // GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. type GetLatestBlockRequest struct { } @@ -432,7 +645,7 @@ 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_52842f5d9c655164, []int{7} + return fileDescriptor_52842f5d9c655164, []int{11} } func (m *GetLatestBlockRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -471,7 +684,7 @@ 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_52842f5d9c655164, []int{8} + return fileDescriptor_52842f5d9c655164, []int{12} } func (m *GetLatestBlockResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -522,7 +735,7 @@ 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_52842f5d9c655164, []int{9} + return fileDescriptor_52842f5d9c655164, []int{13} } func (m *GetSyncingRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -560,7 +773,7 @@ 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_52842f5d9c655164, []int{10} + return fileDescriptor_52842f5d9c655164, []int{14} } func (m *GetSyncingResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -604,7 +817,7 @@ 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_52842f5d9c655164, []int{11} + return fileDescriptor_52842f5d9c655164, []int{15} } func (m *GetNodeInfoRequest) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -643,7 +856,7 @@ 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_52842f5d9c655164, []int{12} + return fileDescriptor_52842f5d9c655164, []int{16} } func (m *GetNodeInfoResponse) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -701,7 +914,7 @@ 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_52842f5d9c655164, []int{13} + return fileDescriptor_52842f5d9c655164, []int{17} } func (m *VersionInfo) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -793,7 +1006,7 @@ 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_52842f5d9c655164, []int{14} + return fileDescriptor_52842f5d9c655164, []int{18} } func (m *Module) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -851,6 +1064,10 @@ func init() { proto.RegisterType((*Validator)(nil), "lfb.base.ostracon.v1beta1.Validator") proto.RegisterType((*GetBlockByHeightRequest)(nil), "lfb.base.ostracon.v1beta1.GetBlockByHeightRequest") proto.RegisterType((*GetBlockByHeightResponse)(nil), "lfb.base.ostracon.v1beta1.GetBlockByHeightResponse") + proto.RegisterType((*GetBlockByHashRequest)(nil), "lfb.base.ostracon.v1beta1.GetBlockByHashRequest") + proto.RegisterType((*GetBlockByHashResponse)(nil), "lfb.base.ostracon.v1beta1.GetBlockByHashResponse") + proto.RegisterType((*GetBlockResultsByHeightRequest)(nil), "lfb.base.ostracon.v1beta1.GetBlockResultsByHeightRequest") + proto.RegisterType((*GetBlockResultsByHeightResponse)(nil), "lfb.base.ostracon.v1beta1.GetBlockResultsByHeightResponse") proto.RegisterType((*GetLatestBlockRequest)(nil), "lfb.base.ostracon.v1beta1.GetLatestBlockRequest") proto.RegisterType((*GetLatestBlockResponse)(nil), "lfb.base.ostracon.v1beta1.GetLatestBlockResponse") proto.RegisterType((*GetSyncingRequest)(nil), "lfb.base.ostracon.v1beta1.GetSyncingRequest") @@ -866,73 +1083,86 @@ func init() { } var fileDescriptor_52842f5d9c655164 = []byte{ - // 1053 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x56, 0x4f, 0x6f, 0xdc, 0x44, - 0x14, 0x8f, 0xb3, 0x6d, 0x36, 0x79, 0x8b, 0x20, 0x99, 0xa4, 0x8d, 0xb3, 0x6a, 0x96, 0xd4, 0x84, - 0x12, 0xa5, 0x89, 0xdd, 0xdd, 0x1c, 0x4a, 0x39, 0x41, 0x1a, 0x29, 0x8d, 0x80, 0x2a, 0x72, 0x10, - 0x48, 0x5c, 0x56, 0xf6, 0x7a, 0xd6, 0x19, 0xc5, 0xeb, 0x99, 0x7a, 0xc6, 0x41, 0xab, 0xaa, 0x17, - 0x3e, 0x01, 0x12, 0xe2, 0xc2, 0x19, 0x89, 0x1b, 0x9c, 0x39, 0x73, 0x41, 0x42, 0x42, 0x91, 0xb8, - 0x70, 0x44, 0x09, 0x5f, 0x81, 0x3b, 0xf2, 0xcc, 0xd8, 0xeb, 0x6d, 0x12, 0x93, 0xf4, 0x80, 0xc4, - 0x6d, 0xe6, 0xfd, 0xfd, 0xfd, 0x9e, 0xdf, 0x7b, 0x1e, 0x78, 0x3b, 0xea, 0xfb, 0x8e, 0xef, 0x71, - 0xec, 0x50, 0x2e, 0x12, 0xaf, 0x47, 0x63, 0xe7, 0xb8, 0xed, 0x63, 0xe1, 0xb5, 0x9d, 0x67, 0x29, - 0x4e, 0x86, 0x36, 0x4b, 0xa8, 0xa0, 0x68, 0x29, 0xea, 0xfb, 0x76, 0x66, 0x66, 0xe7, 0x66, 0xb6, - 0x36, 0x6b, 0x2e, 0x84, 0x34, 0xa4, 0xd2, 0xca, 0xc9, 0x4e, 0xca, 0xa1, 0xb9, 0x14, 0x52, 0x1a, - 0x46, 0xd8, 0x91, 0x37, 0x3f, 0xed, 0x3b, 0x5e, 0xac, 0x63, 0x35, 0xef, 0x68, 0x95, 0xc7, 0x88, - 0xe3, 0xc5, 0x31, 0x15, 0x9e, 0x20, 0x34, 0xe6, 0x5a, 0x6b, 0x16, 0x38, 0x58, 0x87, 0x39, 0x62, - 0xc8, 0x70, 0xae, 0x69, 0x16, 0x1a, 0x29, 0x75, 0xfc, 0x88, 0xf6, 0x8e, 0x2e, 0xd1, 0x95, 0xfd, - 0xde, 0x29, 0x28, 0x4a, 0x46, 0x05, 0x3f, 0xe6, 0x85, 0x24, 0x96, 0xb9, 0x95, 0xa1, 0xf5, 0x02, - 0x5a, 0xbb, 0x58, 0x7c, 0xea, 0x45, 0x24, 0xf0, 0x04, 0x4d, 0x0e, 0xb0, 0xd8, 0x1e, 0x3e, 0xc1, - 0x24, 0x3c, 0x14, 0x2e, 0x7e, 0x96, 0x62, 0x2e, 0xd0, 0x6d, 0x98, 0x3a, 0x94, 0x02, 0xd3, 0x58, - 0x31, 0xd6, 0x6a, 0xae, 0xbe, 0xa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 0xd3, 0x96, 0xf1, 0xd5, 0x59, - 0x6b, 0xe2, 0xe4, 0xac, 0x35, 0xf1, 0xc7, 0x59, 0x6b, 0xe2, 0xf3, 0xcd, 0x90, 0x88, 0xc3, 0xd4, - 0xb7, 0x7b, 0x74, 0xe0, 0x44, 0x24, 0xc6, 0x59, 0xec, 0x4d, 0x1e, 0x1c, 0x39, 0xbd, 0x88, 0xe0, - 0x58, 0x38, 0x61, 0xc2, 0x7a, 0x8e, 0x18, 0x70, 0xb5, 0x6d, 0xfc, 0x29, 0xf9, 0xf8, 0xd8, 0xfa, - 0x27, 0x00, 0x00, 0xff, 0xff, 0xc7, 0x84, 0xfb, 0xd9, 0x5a, 0x0c, 0x00, 0x00, + // 1254 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xd4, 0x57, 0xcd, 0x6f, 0x1b, 0x45, + 0x14, 0xef, 0xda, 0x6d, 0xdc, 0x8c, 0x0b, 0x6d, 0x26, 0x69, 0xe3, 0x58, 0x8d, 0x9b, 0x2c, 0xa1, + 0x44, 0xf9, 0xd8, 0x8d, 0x9d, 0x43, 0x53, 0x4e, 0x34, 0x09, 0x4a, 0x23, 0xa0, 0x8a, 0x36, 0x15, + 0x48, 0x5c, 0x56, 0xbb, 0xde, 0xf1, 0x7a, 0x95, 0xf5, 0xce, 0x74, 0x67, 0x6c, 0x62, 0x45, 0xb9, + 0x70, 0xe6, 0x80, 0x84, 0xb8, 0x70, 0x06, 0x71, 0xe4, 0xcc, 0x99, 0x0b, 0x02, 0x09, 0x45, 0xe2, + 0xc2, 0x11, 0x25, 0xfc, 0x0b, 0xdc, 0xd1, 0xce, 0xcc, 0xae, 0xd7, 0x89, 0xbd, 0x76, 0x7a, 0xa8, + 0xc4, 0x6d, 0xe7, 0x7d, 0xfe, 0x7e, 0x6f, 0x66, 0xde, 0x9b, 0x05, 0xef, 0xfa, 0x0d, 0x5b, 0xb7, + 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, 0xac, 0xd9, 0xb6, 0xb5, 0x3a, 0x6e, 0xe9, 0xbe, 0x17, 0xa0, + 0x28, 0xf6, 0x3a, 0x75, 0x8e, 0xf4, 0xba, 0xef, 0xa1, 0x80, 0xe9, 0x6e, 0x48, 0xea, 0x3a, 0x6b, + 0x51, 0xd1, 0xe4, 0xed, 0x09, 0xfe, 0xc8, 0xdf, 0xfc, 0x2f, 0x00, 0x00, 0xff, 0xff, 0xd2, 0xb6, + 0xd0, 0x9b, 0xdd, 0x0f, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -955,6 +1185,10 @@ type ServiceClient interface { 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. @@ -1005,6 +1239,24 @@ func (c *serviceClient) GetBlockByHeight(ctx context.Context, in *GetBlockByHeig 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, "/lfb.base.ostracon.v1beta1.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, "/lfb.base.ostracon.v1beta1.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, "/lfb.base.ostracon.v1beta1.Service/GetLatestValidatorSet", in, out, opts...) @@ -1033,6 +1285,10 @@ type ServiceServer interface { 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. @@ -1055,6 +1311,12 @@ func (*UnimplementedServiceServer) GetLatestBlock(ctx context.Context, req *GetL 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") } @@ -1138,6 +1400,42 @@ func _Service_GetBlockByHeight_Handler(srv interface{}, ctx context.Context, dec 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: "/lfb.base.ostracon.v1beta1.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: "/lfb.base.ostracon.v1beta1.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 { @@ -1194,6 +1492,14 @@ var _Service_serviceDesc = grpc.ServiceDesc{ MethodName: "GetBlockByHeight", Handler: _Service_GetBlockByHeight_Handler, }, + { + MethodName: "GetBlockByHash", + Handler: _Service_GetBlockByHash_Handler, + }, + { + MethodName: "GetBlockResultsByHeight", + Handler: _Service_GetBlockResultsByHeight_Handler, + }, { MethodName: "GetLatestValidatorSet", Handler: _Service_GetLatestValidatorSet_Handler, @@ -1517,7 +1823,7 @@ func (m *GetBlockByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error return len(dAtA) - i, nil } -func (m *GetLatestBlockRequest) Marshal() (dAtA []byte, err error) { +func (m *GetBlockByHashRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1527,20 +1833,27 @@ func (m *GetLatestBlockRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetLatestBlockRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GetBlockByHashRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetLatestBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +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 *GetLatestBlockResponse) Marshal() (dAtA []byte, err error) { +func (m *GetBlockByHashResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1550,12 +1863,12 @@ func (m *GetLatestBlockResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetLatestBlockResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *GetBlockByHashResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetLatestBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetBlockByHashResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1587,7 +1900,7 @@ func (m *GetLatestBlockResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) return len(dAtA) - i, nil } -func (m *GetSyncingRequest) Marshal() (dAtA []byte, err error) { +func (m *GetBlockResultsByHeightRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1597,20 +1910,25 @@ func (m *GetSyncingRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetSyncingRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GetBlockResultsByHeightRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetSyncingRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +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 *GetSyncingResponse) Marshal() (dAtA []byte, err error) { +func (m *GetBlockResultsByHeightResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1620,30 +1938,63 @@ func (m *GetSyncingResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetSyncingResponse) MarshalTo(dAtA []byte) (int, error) { +func (m *GetBlockResultsByHeightResponse) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetSyncingResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetBlockResultsByHeightResponse) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int _ = l - if m.Syncing { + 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-- - if m.Syncing { - dAtA[i] = 1 - } else { - dAtA[i] = 0 + 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 *GetNodeInfoRequest) Marshal() (dAtA []byte, err error) { +func (m *GetLatestBlockRequest) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1653,12 +2004,12 @@ func (m *GetNodeInfoRequest) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetNodeInfoRequest) MarshalTo(dAtA []byte) (int, error) { +func (m *GetLatestBlockRequest) MarshalTo(dAtA []byte) (int, error) { size := m.Size() return m.MarshalToSizedBuffer(dAtA[:size]) } -func (m *GetNodeInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { +func (m *GetLatestBlockRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i := len(dAtA) _ = i var l int @@ -1666,7 +2017,7 @@ func (m *GetNodeInfoRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { return len(dAtA) - i, nil } -func (m *GetNodeInfoResponse) Marshal() (dAtA []byte, err error) { +func (m *GetLatestBlockResponse) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) n, err := m.MarshalToSizedBuffer(dAtA[:size]) @@ -1676,7 +2027,133 @@ func (m *GetNodeInfoResponse) Marshal() (dAtA []byte, err error) { return dAtA[:n], nil } -func (m *GetNodeInfoResponse) MarshalTo(dAtA []byte) (int, error) { +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]) } @@ -1972,6 +2449,74 @@ func (m *GetBlockByHeightResponse) Size() (n int) { 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 @@ -2927,6 +3472,456 @@ func (m *GetBlockByHeightResponse) Unmarshal(dAtA []byte) error { } 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 = &types1.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, &types2.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 = &types2.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 = &types2.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 diff --git a/client/grpc/tmservice/query.pb.gw.go b/client/grpc/tmservice/query.pb.gw.go index 56b1da95af..f16d7f52a9 100644 --- a/client/grpc/tmservice/query.pb.gw.go +++ b/client/grpc/tmservice/query.pb.gw.go @@ -139,6 +139,114 @@ func local_request_Service_GetBlockByHeight_0(ctx context.Context, marshaler run } +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)} ) @@ -333,6 +441,46 @@ func RegisterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, se }) + 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() @@ -494,6 +642,46 @@ func RegisterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, cl }) + 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() @@ -546,6 +734,10 @@ var ( 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{"lfb", "base", "ostracon", "v1beta1", "blocks", "height"}, "", runtime.AssumeColonVerbOpt(true))) + 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{"lfb", "base", "ostracon", "v1beta1", "blocks", "hash"}, "", runtime.AssumeColonVerbOpt(true))) + + 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{"lfb", "base", "ostracon", "v1beta1", "blockresults", "height"}, "", runtime.AssumeColonVerbOpt(true))) + pattern_Service_GetLatestValidatorSet_0 = runtime.MustPattern(runtime.NewPattern(1, []int{2, 0, 2, 1, 2, 2, 2, 3, 2, 4, 2, 5}, []string{"lfb", "base", "ostracon", "v1beta1", "validatorsets", "latest"}, "", runtime.AssumeColonVerbOpt(true))) 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{"lfb", "base", "ostracon", "v1beta1", "validatorsets", "height"}, "", runtime.AssumeColonVerbOpt(true))) @@ -560,6 +752,10 @@ var ( 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/tmservice/service.go b/client/grpc/tmservice/service.go index e12659b1c5..6b8bfc5262 100644 --- a/client/grpc/tmservice/service.go +++ b/client/grpc/tmservice/service.go @@ -14,6 +14,7 @@ import ( cryptotypes "github.com/line/lfb-sdk/crypto/types" qtypes "github.com/line/lfb-sdk/types/query" "github.com/line/lfb-sdk/version" + abci "github.com/line/ostracon/abci/types" ) // This is the struct that we will implement all the handlers on. @@ -89,6 +90,43 @@ func (s queryServer) GetBlockByHeight(_ context.Context, req *GetBlockByHeightRe }, nil } +// GetBlockByHash implements ServiceServer.GetBlockByHash +func (s queryServer) GetBlockByHash(_ context.Context, req *GetBlockByHashRequest) (*GetBlockByHashResponse, error) { + res, err := 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 := 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) diff --git a/client/grpc/tmservice/service_test.go b/client/grpc/tmservice/service_test.go index 885df6349a..8f5bbaad98 100644 --- a/client/grpc/tmservice/service_test.go +++ b/client/grpc/tmservice/service_test.go @@ -96,6 +96,17 @@ func (s IntegrationTestSuite) TestQueryBlockByHeight() { s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(restRes, &blockInfoRes)) } +func (s IntegrationTestSuite) TestQueryBlockResultsByHeight() { + val := s.network.Validators[0] + _, err := s.queryClient.GetBlockResultsByHeight(context.Background(), &tmservice.GetBlockResultsByHeightRequest{Height: 1}) + s.Require().NoError(err) + + restRes, err := rest.GetRequest(fmt.Sprintf("%s/lfb/base/ostracon/v1beta1/blockresults/%d", val.APIAddress, 1)) + s.Require().NoError(err) + var blockResultsRes tmservice.GetBlockResultsByHeightResponse + s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalJSON(restRes, &blockResultsRes)) +} + func (s IntegrationTestSuite) TestQueryLatestValidatorSet() { val := s.network.Validators[0] diff --git a/client/test_helpers.go b/client/test_helpers.go index 361a3e8a39..73d003515e 100644 --- a/client/test_helpers.go +++ b/client/test_helpers.go @@ -15,7 +15,6 @@ var ( // TestAccount represents a client Account that can be used in unit tests type TestAccount struct { Address sdk.AccAddress - Num uint64 Seq uint64 } @@ -29,11 +28,6 @@ func (t TestAccount) GetPubKey() cryptotypes.PubKey { return nil } -// GetAccountNumber implements client Account.GetAccountNumber -func (t TestAccount) GetAccountNumber() uint64 { - return t.Num -} - // GetSequence implements client Account.GetSequence func (t TestAccount) GetSequence() uint64 { return t.Seq @@ -54,6 +48,10 @@ func (t TestAccountRetriever) GetAccount(_ Context, addr sdk.AccAddress) (Accoun return acc, nil } +func (t TestAccountRetriever) GetLatestHeight(_ Context) (uint64, error) { + return 0, nil +} + // GetAccountWithHeight implements AccountRetriever.GetAccountWithHeight func (t TestAccountRetriever) GetAccountWithHeight(clientCtx Context, addr sdk.AccAddress) (Account, int64, error) { acc, err := t.GetAccount(clientCtx, addr) @@ -73,11 +71,11 @@ func (t TestAccountRetriever) EnsureExists(_ Context, addr sdk.AccAddress) error return nil } -// GetAccountNumberSequence implements AccountRetriever.GetAccountNumberSequence -func (t TestAccountRetriever) GetAccountNumberSequence(_ Context, addr sdk.AccAddress) (accNum uint64, accSeq uint64, err error) { +// GetAccountSequence implements AccountRetriever.GetAccountSequence +func (t TestAccountRetriever) GetAccountSequence(_ Context, addr sdk.AccAddress) (accSeq uint64, err error) { acc, ok := t.Accounts[addr.String()] if !ok { - return 0, 0, fmt.Errorf("account %s not found", addr) + return 0, fmt.Errorf("account %s not found", addr) } - return acc.Num, acc.Seq, nil + return acc.Seq, nil } diff --git a/client/tx/factory.go b/client/tx/factory.go index 64441721a9..b25ab4dd7e 100644 --- a/client/tx/factory.go +++ b/client/tx/factory.go @@ -16,7 +16,7 @@ type Factory struct { keybase keyring.Keyring txConfig client.TxConfig accountRetriever client.AccountRetriever - accountNumber uint64 + sigBlockHeight uint64 sequence uint64 gas uint64 timeoutHeight uint64 @@ -41,7 +41,7 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory { signMode = signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON } - accNum, _ := flagSet.GetUint64(flags.FlagAccountNumber) + sigBlockHeight, _ := flagSet.GetUint64(flags.FlagSigBlockHeight) accSeq, _ := flagSet.GetUint64(flags.FlagSequence) gasAdj, _ := flagSet.GetFloat64(flags.FlagGasAdjustment) memo, _ := flagSet.GetString(flags.FlagMemo) @@ -57,7 +57,7 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory { chainID: clientCtx.ChainID, gas: gasSetting.Gas, simulateAndExecute: gasSetting.Simulate, - accountNumber: accNum, + sigBlockHeight: sigBlockHeight, sequence: accSeq, timeoutHeight: timeoutHeight, gasAdjustment: gasAdj, @@ -74,7 +74,7 @@ func NewFactoryCLI(clientCtx client.Context, flagSet *pflag.FlagSet) Factory { return f } -func (f Factory) AccountNumber() uint64 { return f.accountNumber } +func (f Factory) SigBlockHeight() uint64 { return f.sigBlockHeight } func (f Factory) Sequence() uint64 { return f.sequence } func (f Factory) Gas() uint64 { return f.gas } func (f Factory) GasAdjustment() float64 { return f.gasAdjustment } @@ -154,9 +154,9 @@ func (f Factory) WithMemo(memo string) Factory { return f } -// WithAccountNumber returns a copy of the Factory with an updated account number. -func (f Factory) WithAccountNumber(accnum uint64) Factory { - f.accountNumber = accnum +// WithSigBlockHeight returns a copy of the Factory with an updated sig block height. +func (f Factory) WithSigBlockHeight(sigBlockHeight uint64) Factory { + f.sigBlockHeight = sigBlockHeight return f } diff --git a/client/tx/legacy.go b/client/tx/legacy.go index 5bcbc6b097..1593407729 100644 --- a/client/tx/legacy.go +++ b/client/tx/legacy.go @@ -61,6 +61,7 @@ func CopyTx(tx signing.Tx, builder client.TxBuilder, ignoreSignatureError bool) builder.SetMemo(tx.GetMemo()) builder.SetFeeAmount(tx.GetFee()) builder.SetGasLimit(tx.GetGas()) + builder.SetSigBlockHeight(tx.GetSigBlockHeight()) builder.SetTimeoutHeight(tx.GetTimeoutHeight()) return nil diff --git a/client/tx/legacy_test.go b/client/tx/legacy_test.go index e5e958df38..d743455b71 100644 --- a/client/tx/legacy_test.go +++ b/client/tx/legacy_test.go @@ -23,6 +23,7 @@ import ( const ( memo = "waboom" gas = uint64(10000) + sbh = 1 timeoutHeight = 5 ) @@ -44,6 +45,7 @@ func buildTestTx(t *testing.T, builder client.TxBuilder) { builder.SetMemo(memo) builder.SetGasLimit(gas) builder.SetFeeAmount(fee) + builder.SetSigBlockHeight(sbh) err := builder.SetMsgs(msg) require.NoError(t, err) err = builder.SetSignatures(sig) diff --git a/client/tx/tx.go b/client/tx/tx.go index 726c643f68..562983b0c5 100644 --- a/client/tx/tx.go +++ b/client/tx/tx.go @@ -155,7 +155,7 @@ func WriteGeneratedTxResponse( } txf := Factory{fees: br.Fees, gasPrices: br.GasPrices}. - WithAccountNumber(br.AccountNumber). + WithSigBlockHeight(br.SigBlockHeight). WithSequence(br.Sequence). WithGas(gasSetting.Gas). WithGasAdjustment(gasAdj). @@ -240,6 +240,7 @@ func BuildUnsignedTx(txf Factory, msgs ...sdk.Msg) (client.TxBuilder, error) { tx.SetMemo(txf.memo) tx.SetFeeAmount(fees) tx.SetGasLimit(txf.gas) + tx.SetSigBlockHeight(txf.sigBlockHeight) tx.SetTimeoutHeight(txf.TimeoutHeight()) return tx, nil @@ -302,26 +303,32 @@ func CalculateGas( return simRes, uint64(txf.GasAdjustment() * float64(simRes.GasInfo.GasUsed)), nil } -// PrepareFactory ensures the account defined by ctx.GetFromAddress() exists and -// if the account number and/or the account sequence number are zero (not set), -// they will be queried for and set on the provided Factory. A new Factory with -// the updated fields will be returned. +// PrepareFactory set sig block height and account sequence to the tx factory. +// It doesn't require that the account should exist. +// If the account does not exist, then it use the zero sequence number. func PrepareFactory(clientCtx client.Context, txf Factory) (Factory, error) { from := clientCtx.GetFromAddress() - - if err := txf.accountRetriever.EnsureExists(clientCtx, from); err != nil { - return txf, err + sigBlockHeight := txf.sigBlockHeight + + if !clientCtx.Offline { + if sigBlockHeight == 0 { + height, err := txf.accountRetriever.GetLatestHeight(clientCtx) + if err != nil { + return txf, err + } + sigBlockHeight = height + } } - initNum, initSeq := txf.accountNumber, txf.sequence - if initNum == 0 || initSeq == 0 { - num, seq, err := txf.accountRetriever.GetAccountNumberSequence(clientCtx, from) - if err != nil { - return txf, err - } + txf = txf.WithSigBlockHeight(sigBlockHeight) - if initNum == 0 { - txf = txf.WithAccountNumber(num) + initSeq := txf.sequence + if initSeq == 0 && !clientCtx.Offline { + seq, err := txf.accountRetriever.GetAccountSequence(clientCtx, from) + if err != nil { + if cliError, ok := err.(*client.Error); !ok || cliError.Code != sdkerrors.ErrKeyNotFound.ABCICode() { + return txf, err + } } if initSeq == 0 { @@ -402,9 +409,8 @@ func Sign(txf Factory, name string, txBuilder client.TxBuilder, overwriteSig boo } pubKey := key.GetPubKey() signerData := authsigning.SignerData{ - ChainID: txf.chainID, - AccountNumber: txf.accountNumber, - Sequence: txf.sequence, + ChainID: txf.chainID, + Sequence: txf.sequence, } // For SIGN_MODE_DIRECT, calling SetSignatures calls setSignerInfos on diff --git a/client/tx/tx_test.go b/client/tx/tx_test.go index 6c56cecda4..5a7a548981 100644 --- a/client/tx/tx_test.go +++ b/client/tx/tx_test.go @@ -90,7 +90,7 @@ func TestBuildSimTx(t *testing.T) { txf := tx.Factory{}. WithTxConfig(txCfg). - WithAccountNumber(50). + WithSigBlockHeight(1). WithSequence(23). WithFees("50stake"). WithMemo("memo"). @@ -106,7 +106,7 @@ func TestBuildSimTx(t *testing.T) { func TestBuildUnsignedTx(t *testing.T) { txf := tx.Factory{}. WithTxConfig(NewTestTxConfig()). - WithAccountNumber(50). + WithSigBlockHeight(1). WithSequence(23). WithFees("50stake"). WithMemo("memo"). @@ -148,7 +148,7 @@ func TestSign(t *testing.T) { txfNoKeybase := tx.Factory{}. WithTxConfig(NewTestTxConfig()). - WithAccountNumber(50). + WithSigBlockHeight(1). WithSequence(23). WithFees("50stake"). WithMemo("memo"). diff --git a/client/tx_config.go b/client/tx_config.go index fcf04b81f2..ef1c2279ee 100644 --- a/client/tx_config.go +++ b/client/tx_config.go @@ -39,6 +39,7 @@ type ( SetMsgs(msgs ...sdk.Msg) error SetSignatures(signatures ...signingtypes.SignatureV2) error SetMemo(memo string) + SetSigBlockHeight(sbh uint64) SetFeeAmount(amount sdk.Coins) SetGasLimit(limit uint64) SetTimeoutHeight(height uint64) diff --git a/codec/amino_codec_test.go b/codec/amino_codec_test.go index 7c9614821f..f5f8960f38 100644 --- a/codec/amino_codec_test.go +++ b/codec/amino_codec_test.go @@ -120,7 +120,7 @@ func TestAminoCodecUnpackAnyFails(t *testing.T) { func TestAminoCodecFullDecodeAndEncode(t *testing.T) { // This tx comes from https://github.com/cosmos/cosmos-sdk/issues/8117. - txSigned := `{"type":"lfb-sdk/StdTx","value":{"msg":[{"type":"lfb-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"link120yvjfy7m2gnu9mvusrs40cxxhpt8nr3qhn8re","validator_address":"linkvaloper120yvjfy7m2gnu9mvusrs40cxxhpt8nr3jr36d2","pubkey":{"type":"ostracon/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"ostracon/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"memo":"","timeout_height":"0"}}` + txSigned := `{"type":"lfb-sdk/StdTx","value":{"msg":[{"type":"lfb-sdk/MsgCreateValidator","value":{"description":{"moniker":"fulltest","identity":"satoshi","website":"example.com","details":"example inc"},"commission":{"rate":"0.500000000000000000","max_rate":"1.000000000000000000","max_change_rate":"0.200000000000000000"},"min_self_delegation":"1000000","delegator_address":"link120yvjfy7m2gnu9mvusrs40cxxhpt8nr3qhn8re","validator_address":"linkvaloper120yvjfy7m2gnu9mvusrs40cxxhpt8nr3jr36d2","pubkey":{"type":"ostracon/PubKeyEd25519","value":"CYrOiM3HtS7uv1B1OAkknZnFYSRpQYSYII8AtMMtev0="},"value":{"denom":"umuon","amount":"700000000"}}}],"fee":{"amount":[{"denom":"umuon","amount":"6000"}],"gas":"160000"},"signatures":[{"pub_key":{"type":"ostracon/PubKeySecp256k1","value":"AwAOXeWgNf1FjMaayrSnrOOKz+Fivr6DiI/i0x0sZCHw"},"signature":"RcnfS/u2yl7uIShTrSUlDWvsXo2p2dYu6WJC8VDVHMBLEQZWc8bsINSCjOnlsIVkUNNe1q/WCA9n3Gy1+0zhYA=="}],"sig_block_height":"0","memo":"","timeout_height":"0"}}` _, legacyCdc := simapp.MakeCodecs() var tx legacytx.StdTx diff --git a/crypto/ledger/ledger_test.go b/crypto/ledger/ledger_test.go index f4e3f9c7fa..adb7896426 100644 --- a/crypto/ledger/ledger_test.go +++ b/crypto/ledger/ledger_test.go @@ -196,17 +196,16 @@ func TestPublicKeyHDPath(t *testing.T) { } } -func getFakeTx(accountNumber uint32) []byte { +func getFakeTx() []byte { tmp := fmt.Sprintf( - `{"account_number":"%d","chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"5000"},"memo":"memo","msgs":[[""]],"sequence":"6"}`, - accountNumber) + `{"chain_id":"1234","fee":{"amount":[{"amount":"150","denom":"atom"}],"gas":"5000"},"memo":"memo","msgs":[[""]],"sequence":"6"}`) return []byte(tmp) } func TestSignaturesHD(t *testing.T) { for account := uint32(0); account < 100; account += 30 { - msg := getFakeTx(account) + msg := getFakeTx() path := *hd.NewFundraiserParams(account, sdk.CoinType, account/5) t.Logf("Checking signature at %v --- PLEASE REVIEW AND ACCEPT IN THE DEVICE\n", path) @@ -224,7 +223,7 @@ func TestSignaturesHD(t *testing.T) { } func TestRealDeviceSecp256k1(t *testing.T) { - msg := getFakeTx(50) + msg := getFakeTx() path := *hd.NewFundraiserParams(0, sdk.CoinType, 0) priv, err := NewPrivKeySecp256k1Unsafe(path) require.NoError(t, err) diff --git a/docs/core/proto-docs.md b/docs/core/proto-docs.md index 00fed73cb1..578d79b700 100644 --- a/docs/core/proto-docs.md +++ b/docs/core/proto-docs.md @@ -302,8 +302,12 @@ - [Pairs](#lfb.base.kv.v1beta1.Pairs) - [lfb/base/ostracon/v1beta1/query.proto](#lfb/base/ostracon/v1beta1/query.proto) + - [GetBlockByHashRequest](#lfb.base.ostracon.v1beta1.GetBlockByHashRequest) + - [GetBlockByHashResponse](#lfb.base.ostracon.v1beta1.GetBlockByHashResponse) - [GetBlockByHeightRequest](#lfb.base.ostracon.v1beta1.GetBlockByHeightRequest) - [GetBlockByHeightResponse](#lfb.base.ostracon.v1beta1.GetBlockByHeightResponse) + - [GetBlockResultsByHeightRequest](#lfb.base.ostracon.v1beta1.GetBlockResultsByHeightRequest) + - [GetBlockResultsByHeightResponse](#lfb.base.ostracon.v1beta1.GetBlockResultsByHeightResponse) - [GetLatestBlockRequest](#lfb.base.ostracon.v1beta1.GetLatestBlockRequest) - [GetLatestBlockResponse](#lfb.base.ostracon.v1beta1.GetLatestBlockResponse) - [GetLatestValidatorSetRequest](#lfb.base.ostracon.v1beta1.GetLatestValidatorSetRequest) @@ -3857,7 +3861,6 @@ type for additional functionality (e.g. vesting). | ----- | ---- | ----- | ----------- | | `address` | [string](#string) | | | | `pub_key` | [google.protobuf.Any](#google.protobuf.Any) | | | -| `account_number` | [uint64](#uint64) | | | | `sequence` | [uint64](#uint64) | | | @@ -3895,6 +3898,7 @@ Params defines the parameters for the auth module. | `tx_size_cost_per_byte` | [uint64](#uint64) | | | | `sig_verify_cost_ed25519` | [uint64](#uint64) | | | | `sig_verify_cost_secp256k1` | [uint64](#uint64) | | | +| `valid_sig_block_period` | [uint64](#uint64) | | | @@ -4832,6 +4836,37 @@ Pairs defines a repeated slice of Pair objects. + + +### 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` | [ostracon.types.BlockID](#ostracon.types.BlockID) | | | +| `block` | [ostracon.types.Block](#ostracon.types.Block) | | | + + + + + + ### GetBlockByHeightRequest @@ -4863,6 +4898,39 @@ GetBlockByHeightResponse is the response type for the Query/GetBlockByHeight RPC + + +### 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` | [ostracon.abci.ResponseDeliverTx](#ostracon.abci.ResponseDeliverTx) | repeated | | +| `res_begin_block` | [ostracon.abci.ResponseBeginBlock](#ostracon.abci.ResponseBeginBlock) | | | +| `res_end_block` | [ostracon.abci.ResponseEndBlock](#ostracon.abci.ResponseEndBlock) | | | + + + + + + ### GetLatestBlockRequest @@ -5078,6 +5146,8 @@ Service defines the gRPC querier service for ostracon queries. | `GetSyncing` | [GetSyncingRequest](#lfb.base.ostracon.v1beta1.GetSyncingRequest) | [GetSyncingResponse](#lfb.base.ostracon.v1beta1.GetSyncingResponse) | GetSyncing queries node syncing. | GET|/lfb/base/ostracon/v1beta1/syncing| | `GetLatestBlock` | [GetLatestBlockRequest](#lfb.base.ostracon.v1beta1.GetLatestBlockRequest) | [GetLatestBlockResponse](#lfb.base.ostracon.v1beta1.GetLatestBlockResponse) | GetLatestBlock returns the latest block. | GET|/lfb/base/ostracon/v1beta1/blocks/latest| | `GetBlockByHeight` | [GetBlockByHeightRequest](#lfb.base.ostracon.v1beta1.GetBlockByHeightRequest) | [GetBlockByHeightResponse](#lfb.base.ostracon.v1beta1.GetBlockByHeightResponse) | GetBlockByHeight queries block for given height. | GET|/lfb/base/ostracon/v1beta1/blocks/{height}| +| `GetBlockByHash` | [GetBlockByHashRequest](#lfb.base.ostracon.v1beta1.GetBlockByHashRequest) | [GetBlockByHashResponse](#lfb.base.ostracon.v1beta1.GetBlockByHashResponse) | GetBlockByHash queries block for given hash. | GET|/lfb/base/ostracon/v1beta1/blocks/{hash}| +| `GetBlockResultsByHeight` | [GetBlockResultsByHeightRequest](#lfb.base.ostracon.v1beta1.GetBlockResultsByHeightRequest) | [GetBlockResultsByHeightResponse](#lfb.base.ostracon.v1beta1.GetBlockResultsByHeightResponse) | GetBlockResultsByHeight queries block results for given height. | GET|/lfb/base/ostracon/v1beta1/blockresults/{height}| | `GetLatestValidatorSet` | [GetLatestValidatorSetRequest](#lfb.base.ostracon.v1beta1.GetLatestValidatorSetRequest) | [GetLatestValidatorSetResponse](#lfb.base.ostracon.v1beta1.GetLatestValidatorSetResponse) | GetLatestValidatorSet queries latest validator-set. | GET|/lfb/base/ostracon/v1beta1/validatorsets/latest| | `GetValidatorSetByHeight` | [GetValidatorSetByHeightRequest](#lfb.base.ostracon.v1beta1.GetValidatorSetByHeightRequest) | [GetValidatorSetByHeightResponse](#lfb.base.ostracon.v1beta1.GetValidatorSetByHeightResponse) | GetValidatorSetByHeight queries validator-set at a given height. | GET|/lfb/base/ostracon/v1beta1/validatorsets/{height}| @@ -9405,7 +9475,6 @@ SignDoc is the type used for generating sign bytes for SIGN_MODE_DIRECT. | `body_bytes` | [bytes](#bytes) | | body_bytes is protobuf serialization of a TxBody that matches the representation in TxRaw. | | `auth_info_bytes` | [bytes](#bytes) | | auth_info_bytes is a protobuf serialization of an AuthInfo that matches the representation in TxRaw. | | `chain_id` | [string](#string) | | chain_id is the unique identifier of the chain this transaction targets. It prevents signed transactions from being used on another chain by an attacker | -| `account_number` | [uint64](#uint64) | | account_number is the account number of the account in state | @@ -9456,6 +9525,7 @@ TxBody is the body of a transaction that all signers sign over. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `messages` | [google.protobuf.Any](#google.protobuf.Any) | repeated | messages is a list of messages to be executed. The required signers of those messages define the number and order of elements in AuthInfo's signer_infos and Tx's signatures. Each required signer address is added to the list only the first time it occurs. By convention, the first required signer (usually from the first message) is referred to as the primary signer and pays the fee for the whole transaction. | +| `sig_block_height` | [uint64](#uint64) | | sig block height is available between current block height and current block height - `VALID_SIG_BLOCK_DURATION` this is used for distinguish signatures instead of account number. this is mandatory. | | `memo` | [string](#string) | | memo is any arbitrary memo to be added to the transaction | | `timeout_height` | [uint64](#uint64) | | timeout is the block height after which this transaction will not be processed by the chain | | `extension_options` | [google.protobuf.Any](#google.protobuf.Any) | repeated | 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, the transaction will be rejected | @@ -9578,6 +9648,7 @@ RPC method. | Field | Type | Label | Description | | ----- | ---- | ----- | ----------- | | `events` | [string](#string) | repeated | events is the list of transaction event type. | +| `prove` | [bool](#bool) | | prove is Include proofs of the transactions inclusion in the block | | `pagination` | [lfb.base.query.v1beta1.PageRequest](#lfb.base.query.v1beta1.PageRequest) | | pagination defines an pagination for the request. | diff --git a/go.mod b/go.mod index d8b9e33b06..e887f36664 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,11 @@ module github.com/line/lfb-sdk require ( github.com/99designs/keyring v1.1.6 github.com/DataDog/zstd v1.4.5 // indirect - github.com/VictoriaMetrics/fastcache v1.5.8 - github.com/armon/go-metrics v0.3.8 + github.com/VictoriaMetrics/fastcache v1.6.0 + github.com/armon/go-metrics v0.3.9 github.com/bgentry/speakeasy v0.1.0 - github.com/btcsuite/btcd v0.21.0-beta - github.com/btcsuite/btcutil v1.0.2 + github.com/btcsuite/btcd v0.22.0-beta + github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce github.com/confio/ics23/go v0.6.6 github.com/cosmos/go-bip39 v1.0.0 github.com/cosmos/ledger-cosmos-go v0.11.1 @@ -17,7 +17,7 @@ require ( github.com/dgryski/go-farm v0.0.0-20200201041132-a6ae2369ad13 // indirect github.com/dvsekhvalnov/jose2go v0.0.0-20200901110807-248326c1351b github.com/enigmampc/btcutil v1.0.3-0.20200723161021-e2fb6adb2a25 - github.com/go-kit/kit v0.10.0 + github.com/go-kit/kit v0.11.0 github.com/gogo/gateway v1.1.0 github.com/gogo/protobuf v1.3.3 github.com/golang/mock v1.4.4 @@ -42,11 +42,11 @@ require ( github.com/onsi/gomega v1.11.0 // indirect github.com/pelletier/go-toml v1.8.1 // indirect github.com/pkg/errors v0.9.1 - github.com/prometheus/client_golang v1.10.0 - github.com/prometheus/common v0.23.0 + github.com/prometheus/client_golang v1.11.0 + github.com/prometheus/common v0.29.0 github.com/rakyll/statik v0.1.7 github.com/regen-network/cosmos-proto v0.3.1 - github.com/rs/zerolog v1.21.0 + github.com/rs/zerolog v1.23.0 github.com/spf13/afero v1.3.4 // indirect github.com/spf13/cast v1.3.1 github.com/spf13/cobra v1.1.3 @@ -58,18 +58,12 @@ require ( github.com/tendermint/btcd v0.1.1 github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 github.com/tendermint/go-amino v0.16.0 - github.com/tendermint/tm-db v0.6.4 // indirect - golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 - golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 // indirect - golang.org/x/sys v0.0.0-20210510120138-977fb7262007 // indirect - golang.org/x/text v0.3.5 // indirect - google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f - google.golang.org/grpc v1.37.0 - google.golang.org/protobuf v1.26.0 - gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b // indirect - gopkg.in/ini.v1 v1.61.0 // indirect + golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b + google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c + google.golang.org/grpc v1.39.0 + google.golang.org/protobuf v1.27.1 + gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect gopkg.in/yaml.v2 v2.4.0 - gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect ) replace ( diff --git a/go.sum b/go.sum index fa4e666a3f..0ac4edfeef 100644 --- a/go.sum +++ b/go.sum @@ -4,15 +4,35 @@ cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6A cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/firestore v1.1.0/go.mod h1:ulACoGHTpvq5r8rxGJ4ddJZBZqakUQqClKRT5SZwBmk= cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU= github.com/99designs/keyring v1.1.6 h1:kVDC2uCgVwecxCk+9zoCt2uEL6dt+dfVzMvGgnVcIuM= github.com/99designs/keyring v1.1.6/go.mod h1:16e0ds7LGQQcT59QqkTg72Hh5ShM51Byv5PEmW6uoRU= -github.com/BurntSushi/toml v0.3.1 h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ= 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= @@ -26,8 +46,9 @@ github.com/OneOfOne/xxhash v1.2.2 h1:KMrpdQIwFcEqXDklaen+P1axHaj9BSKzvpUUfnHldSE github.com/OneOfOne/xxhash v1.2.2/go.mod h1:HSdplMjZKSmBqAxg5vPj2TmRDmfkzw+cTzAElWljhcU= github.com/Shopify/sarama v1.19.0/go.mod h1:FVkBWblsNy7DGZRfXLU0O9RCGt5g3g3yEuWXgklEdEo= github.com/Shopify/toxiproxy v2.1.4+incompatible/go.mod h1:OXgGpZ6Cli1/URJOF1DMxUHB2q5Ap20/P/eIdh4G0pI= -github.com/VictoriaMetrics/fastcache v1.5.8 h1:XW+YVx9lEXITBVv35ugK9OyotdNJVcbza69o3jmqWuI= github.com/VictoriaMetrics/fastcache v1.5.8/go.mod h1:SiMZNgwEPJ9qWLshu9tyuE6bKc9ZWYhcNV/L7jurprQ= +github.com/VictoriaMetrics/fastcache v1.6.0 h1:C/3Oi3EiBCqufydp1neRZkqcwmEiuRT9c3fqvvgKm5o= +github.com/VictoriaMetrics/fastcache v1.6.0/go.mod h1:0qHz5QP0GMX4pfmMA/zt5RgfNuXJrTP0zS7DqpHGGTw= github.com/VividCortex/gohistogram v1.0.0 h1:6+hBz+qvs0JOrrNhhmR7lFxo5sINxBCGXrdtl/UvroE= github.com/VividCortex/gohistogram v1.0.0/go.mod h1:Pf5mBqqDxYaXu3hDrrU+w6nw50o/4+TcAqDqk/vUH7g= github.com/Workiva/go-datastructures v1.0.52 h1:PLSK6pwn8mYdaoaCZEMsXBpBotr4HHn9abU0yMQt0NI= @@ -47,13 +68,18 @@ github.com/apache/thrift v0.13.0/go.mod h1:cp2SuWMxlEZw2r+iP2GNCdIi4C1qmUzdZFSVb github.com/armon/circbuf v0.0.0-20150827004946-bbbad097214e/go.mod h1:3U/XgcO3hCbHZ8TKRvWD2dDTCfh9M9ya+I9JpbB7O8o= github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8= github.com/armon/go-metrics v0.0.0-20180917152333-f0300d1749da/go.mod h1:Q73ZrmVTwzkszR9V5SSuryQ31EELlFMUz1kKyl939pY= -github.com/armon/go-metrics v0.3.8 h1:oOxq3KPj0WhCuy50EhzwiyMyG2ovRQZpZLXQuOh2a/M= -github.com/armon/go-metrics v0.3.8/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= +github.com/armon/go-metrics v0.3.9 h1:O2sNqxBdvq8Eq5xmzljcYzAORli6RWCvEym4cJf9m18= +github.com/armon/go-metrics v0.3.9/go.mod h1:4O98XIr/9W0sxpJ8UaYkvjk10Iff7SnFrb4QAOwNTFc= github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= +github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/aryann/difflib v0.0.0-20170710044230-e206f873d14a/go.mod h1:DAHtR1m6lCRdSC2Tm3DSWRPvIPr6xNKyeHdqDQSQT+A= github.com/aws/aws-lambda-go v1.13.3/go.mod h1:4UKl9IzQMoD+QF79YdCuzCwp8VbmG4VAQwij/eHl5CU= github.com/aws/aws-sdk-go v1.27.0/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= +github.com/aws/aws-sdk-go v1.38.68/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= github.com/aws/aws-sdk-go-v2 v0.18.0/go.mod h1:JWVYvqSMppoMJC0x5wdwiImzgXTI9FuZwxzkQq9wy+g= +github.com/aws/aws-sdk-go-v2 v1.7.0/go.mod h1:tb9wi5s61kTDA5qCkcDbt3KRVV74GGslQkl/DRdX/P4= +github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.5.0/go.mod h1:acH3+MQoiMzozT/ivU+DbRg7Ooo2298RdRaWcOv+4vM= +github.com/aws/smithy-go v1.5.0/go.mod h1:SObp3lf9smib00L/v3U2eAKG8FyQ7iLrJnQiAmR5n+E= github.com/beorn7/perks v0.0.0-20180321164747-3a771d992973/go.mod h1:Dwedo/Wpr24TaqPxmxbtue+5NUziq4I4S80YR8gNf3Q= github.com/beorn7/perks v1.0.0/go.mod h1:KWe93zE9D1o94FZ5RNwFwVgaQK1VOXiVxmqh+CedLV8= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= @@ -63,13 +89,15 @@ github.com/bgentry/speakeasy v0.1.0/go.mod h1:+zsyZBPWlz7T6j88CTgSN5bM796AkVf0kB github.com/bketelsen/crypt v0.0.3-0.20200106085610-5cbc8cc4026c/go.mod h1:MKsuJmJgSg28kpZDP6UIiPt0e0Oz0kqKNGyRaWEPv84= github.com/btcsuite/btcd v0.0.0-20190115013929-ed77733ec07d/go.mod h1:d3C0AkH6BRcvO8T0UEPu53cnw4IbV63x1bEjildYhO0= github.com/btcsuite/btcd v0.20.1-beta/go.mod h1:wVuoA8VJLEcwgqHBwHmzLRazpKxTv13Px/pDuV7OomQ= -github.com/btcsuite/btcd v0.21.0-beta h1:At9hIZdJW0s9E/fAz28nrz6AmcNlSVucCH796ZteX1M= github.com/btcsuite/btcd v0.21.0-beta/go.mod h1:ZSWyehm27aAuS9bvkATT+Xte3hjHZ+MRgMY/8NJ7K94= +github.com/btcsuite/btcd v0.22.0-beta h1:LTDpDKUM5EeOFBPM8IXpinEcmZ6FWfNZbE3lfrfdnWo= +github.com/btcsuite/btcd v0.22.0-beta/go.mod h1:9n5ntfhhHQBIhUvlhDvD3Qg6fRUj4jkN0VB8L8svzOA= github.com/btcsuite/btclog v0.0.0-20170628155309-84c8d2346e9f/go.mod h1:TdznJufoqS23FtqVCzL0ZqgP5MqXbb4fg/WgDys70nA= github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d/go.mod h1:+5NJ2+qvTyV9exUAL/rxXi3DcLg2Ts+ymUAY5y4NvMg= -github.com/btcsuite/btcutil v1.0.2 h1:9iZ1Terx9fMIOtq1VrwdqfsATL9MC2l8ZrUY6YZ2uts= github.com/btcsuite/btcutil v1.0.2/go.mod h1:j9HUFwoQRsZL3V4n+qG+CUnEGHOarIxfC3Le2Yhbcts= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce h1:YtWJF7RHm2pYCvA5t0RPmAaLUhREsKuKd+SLhxFbFeQ= +github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce/go.mod h1:0DVlHczLPewLcPGEIeUEzfOJhqGPQ0mJJRDBtD307+o= github.com/btcsuite/go-socks v0.0.0-20170105172521-4720035b7bfd/go.mod h1:HHNXQzUsZCxOoE+CPiyCTO6x34Zs86zZUiwtpXoGdtg= github.com/btcsuite/goleveldb v0.0.0-20160330041536-7834afc9e8cd/go.mod h1:F+uVaaLLH7j4eDXPRvw78tMflu7Ie2bzYOH4Y8rRKBY= github.com/btcsuite/goleveldb v1.0.0/go.mod h1:QiK9vBlgftBg6rWQIj6wFzbPfRjiykIEhBH4obrXJ/I= @@ -78,12 +106,16 @@ github.com/btcsuite/snappy-go v1.0.0/go.mod h1:8woku9dyThutzjeg+3xrA5iCpBRH8XEEg github.com/btcsuite/websocket v0.0.0-20150119174127-31079b680792/go.mod h1:ghJtEyQwv5/p4Mg4C0fgbePVuGr935/5ddU9Z3TmDRY= github.com/btcsuite/winsvc v1.0.0/go.mod h1:jsenWakMcC0zFBFurPLEAyrnc/teJEM1O46fmI40EZs= github.com/casbin/casbin/v2 v2.1.2/go.mod h1:YcPU1XXisHhLzuxH9coDNf2FbKpjGlbCg3n9yuLkIJQ= +github.com/casbin/casbin/v2 v2.31.6/go.mod h1:vByNa/Fchek0KZUgG5wEsl7iFsiviAYKRtgrQfcJqHg= github.com/cenkalti/backoff v2.2.1+incompatible/go.mod h1:90ReRw6GdpyfrHakVjL/QHaoyV4aDUVVkXQJJJ3NXXM= 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= github.com/cespare/xxhash/v2 v2.1.1 h1:6MnRN8NT7+YBpUIWxHtefFZOKTAPgGjpQSxqLNn0+qY= github.com/cespare/xxhash/v2 v2.1.1/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/circonus-labs/circonus-gometrics v2.3.1+incompatible/go.mod h1:nmEj6Dob7S7YxXgwXpfOuvO54S+tGdZdw9fuRZt25Ag= github.com/circonus-labs/circonusllhist v0.1.3/go.mod h1:kMXHVDlOchFAehlya5ePtbp5jckzBHf4XRpQvBOLI+I= github.com/clbanning/x2j v0.0.0-20191024224557-825249438eec/go.mod h1:jMjuTZXRI4dUb/I5gc9Hdhagfvm9+RyrPryS/auMzxE= @@ -101,6 +133,7 @@ github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3Ee github.com/coreos/go-semver v0.3.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk= github.com/coreos/go-systemd v0.0.0-20180511133405-39ca1b05acc7/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4= +github.com/coreos/go-systemd/v22 v22.3.2/go.mod h1:Y58oyj3AT4RCenI/lSvhwexgC+NSVTIJ3seZv2GcEnc= github.com/coreos/pkg v0.0.0-20160727233714-3ac0863d7acf/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/coreos/pkg v0.0.0-20180928190104-399ea9e2e55f/go.mod h1:E3G3o1h8I7cfcXa63jLwjI0eiQQMgzzUDFVpN/nH/eA= github.com/cosmos/go-bip39 v0.0.0-20180819234021-555e2067c45d/go.mod h1:tSxLoYXyBmiFeKpvmq4dzayMdCjCnu8uqmCysIGBT2Y= @@ -154,6 +187,7 @@ github.com/facebookgo/subset v0.0.0-20150612182917-8dac2c3c4870/go.mod h1:5tD+ne github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4 h1:7HZCaLC5+BZpmbhCOZJ293Lz68O7PYrF2EzeiFMwCLk= github.com/facebookgo/subset v0.0.0-20200203212716-c811ad88dec4/go.mod h1:5tD+neXqOorC30/tWg0LCSkrqj/AR6gu8yY8/fpw1q0= github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4= +github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU= github.com/felixge/httpsnoop v1.0.1 h1:lvB5Jl89CsZtGIWuTcDM1E/vkVs49/Ml7JJe07l8SPQ= github.com/felixge/httpsnoop v1.0.1/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U= github.com/fortytw2/leaktest v1.3.0 h1:u8491cBMTQ8ft8aeV+adlcytMZylmA5nnwwkRZjI8vw= @@ -165,11 +199,14 @@ github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWo github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1/go.mod h1:vR7hzQXu2zJy9AVAgeJqvqgH9Q5CA+iKCZ2gyEVpxRU= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.8.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= -github.com/go-kit/kit v0.10.0 h1:dXFJfIHVvUcpSgDOV+Ne6t7jXri8Tfv2uOLHUZ2XNuo= github.com/go-kit/kit v0.10.0/go.mod h1:xUsJbQ/Fp4kEt7AFgCuvyX4a71u8h9jB8tj/ORgOZ7o= +github.com/go-kit/kit v0.11.0 h1:IGmIEl7aHTYh6E2HlT+ptILBotjo4xl8PMDl852etiI= +github.com/go-kit/kit v0.11.0/go.mod h1:73/6Ixaufkvb5Osvkls8C79vuQ49Ba1rUEUYNSf+FUw= +github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY= github.com/go-logfmt/logfmt v0.3.0/go.mod h1:Qt1PoO58o5twSAckw1HlFXLmHsOX5/0LbT9GBnD5lWE= github.com/go-logfmt/logfmt v0.4.0/go.mod h1:3RMwSq7FuexP4Kalkev3ejPJsZTpXXBr9+V4qmtdjCk= github.com/go-logfmt/logfmt v0.5.0 h1:TrB8swr/68K7m9CcGut2g3UOihhbcbiMAYiuTXdEih4= @@ -178,16 +215,23 @@ github.com/go-sql-driver/mysql v1.4.0/go.mod h1:zAC/RDZ24gD3HViQzih4MyKcchzm+sOG github.com/go-stack/stack v1.8.0 h1:5SgMzNM5HxrEjV0ww2lTmX6E2Izsfxas4+YHWRs3Lsk= github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY= github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE= +github.com/go-zookeeper/zk v1.0.2/go.mod h1:nOB03cncLtlp4t+UAkGSV+9beXP/akpekBwL+UX1Qcw= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2 h1:ZpnhV/YsD2/4cESfV5+Hoeu/iUR3ruzNvZ+yQfO03a0= github.com/godbus/dbus v0.0.0-20190726142602-4481cbc300e2/go.mod h1:bBOAhwG1umN6/6ZUMtDFBMQR8jRg9O75tm9K00oMsK4= +github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA= github.com/gogo/gateway v1.1.0 h1:u0SuhL9+Il+UbjM9VIE3ntfRujKbvVpFvNB4HbjeVQ0= github.com/gogo/gateway v1.1.0/go.mod h1:S7rR8FRQyG3QFESeSv4l2WnsyzlCLG0CzBbUUo/mbic= github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b/go.mod h1:SBH7ygxi8pfUlaOkMMuAQtPIUF8ecWP5IEl/CR7VP2Q= github.com/golang/groupcache v0.0.0-20160516000752-02826c3e7903/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190129154638-5b532d6fd5ef/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= github.com/golang/mock v1.4.4 h1:l75CXGRSwbaYNpl/Z2X1XIIAMSCquvXgpVZDhwEIJsc= github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= @@ -195,6 +239,7 @@ github.com/golang/protobuf v1.3.0/go.mod h1:Qd/q+1AKNOZr9uGQzbzCmRO6sUih6GTPZv6a github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.2/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= github.com/golang/protobuf v1.3.3/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= @@ -218,7 +263,10 @@ github.com/google/go-cmp v0.2.0/go.mod h1:oXzfMopK8JAjlY9xF4vHSVASa0yLyX7SntLO5a 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= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.3/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.4/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5 h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= @@ -227,8 +275,14 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/ github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI= github.com/google/uuid v1.0.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= @@ -266,18 +320,22 @@ github.com/gtank/ristretto255 v0.1.2 h1:JEqUCPA1NvLq5DwYtuzigd7ss8fwbYay9fi4/5uM github.com/gtank/ristretto255 v0.1.2/go.mod h1:Ph5OpO6c7xKUGROZfWVLiJf9icMDwUeIvY4OmlYW69o= github.com/hashicorp/consul/api v1.1.0/go.mod h1:VmuI/Lkw1nC05EYQWNKwWGbkg+FbDBtguAZLlVdkD9Q= github.com/hashicorp/consul/api v1.3.0/go.mod h1:MmDNSzIMUjNpY/mQ398R4bk2FnqQLoPndWW5VkKPlCE= +github.com/hashicorp/consul/api v1.8.1/go.mod h1:sDjTOq0yUyv5G4h+BqSea7Fn6BU+XbolEz1952UB+mk= github.com/hashicorp/consul/sdk v0.1.1/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= github.com/hashicorp/consul/sdk v0.3.0/go.mod h1:VKf9jXwCTEY1QZP2MOLRhb5i/I/ssyNV1vwHyQBF0x8= -github.com/hashicorp/errwrap v1.0.0 h1:hLrqtEDnRye3+sgx6z4qVLNuviH3MR5aQ0ykNJa/UYA= +github.com/hashicorp/consul/sdk v0.7.0/go.mod h1:fY08Y9z5SvJqevyZNy6WWPXiG3KwBPAvlcdx16zZ0fM= github.com/hashicorp/errwrap v1.0.0/go.mod h1:YH+1FKiLXxHSkmPseP+kNlulaMuP3n2brvKWEqk/Jc4= github.com/hashicorp/go-cleanhttp v0.5.0/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= github.com/hashicorp/go-cleanhttp v0.5.1/go.mod h1:JpRdi6/HCYpAwUzNwuwqhbovhLtngrth3wmdIIUrZ80= +github.com/hashicorp/go-hclog v0.12.0/go.mod h1:whpDNt7SSdeAju8AWKIWsul05p54N/39EeqMAyrmvFQ= github.com/hashicorp/go-immutable-radix v1.0.0 h1:AKDB1HM5PWEA7i4nhcpwOrO2byshxBjXVn/J/3+z5/0= github.com/hashicorp/go-immutable-radix v1.0.0/go.mod h1:0y9vanUI8NX6FsYoO3zeMjhV/C5i9g4Q3DwcSNZ4P60= github.com/hashicorp/go-msgpack v0.5.3/go.mod h1:ahLV/dePpqEmjfWmKiqvPkv/twdG7iPBM1vqhUKIvfM= github.com/hashicorp/go-multierror v1.0.0/go.mod h1:dHtQlpGsu+cZNNAkkCN/P3hoUDHhCYQXV3UM06sGGrk= +github.com/hashicorp/go-multierror v1.1.0/go.mod h1:spPvp8C1qA32ftKqdAHm4hHTbPw+vmowP0z+KUhOZdA= github.com/hashicorp/go-retryablehttp v0.5.3/go.mod h1:9B5zBasrRhHXnJnui7y6sL7es7NDiJgTc6Er0maI1Xs= github.com/hashicorp/go-rootcerts v1.0.0/go.mod h1:K6zTfqpRlCUIjkwsN4Z+hiSfzSTQa6eBIzfwKfwNnHU= +github.com/hashicorp/go-rootcerts v1.0.2/go.mod h1:pqUvnprVnM5bf7AOirdbb01K4ccR319Vf4pU3K5EGc8= github.com/hashicorp/go-sockaddr v1.0.0/go.mod h1:7Xibr9yA9JjQq1JpNB2Vw7kxv8xerXegt+ozgdvDeDU= github.com/hashicorp/go-syslog v1.0.0/go.mod h1:qPfqrKkXGihmCqbJM2mZgkZGvKG1dFdvsLplgctolz4= github.com/hashicorp/go-uuid v1.0.0/go.mod h1:6SBZvOh/SIDV7/2o3Jml5SYk/TvGqwFJ/bN7x4byOro= @@ -293,16 +351,23 @@ github.com/hashicorp/hcl v1.0.0 h1:0Anlzjpi4vEasTeNFn2mLJgTSwt0+6sfsiTG8qcWGx4= github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ= github.com/hashicorp/logutils v1.0.0/go.mod h1:QIAnNjmIWmVIIkWDTG1z5v++HQmx9WQRO+LraFDTW64= github.com/hashicorp/mdns v1.0.0/go.mod h1:tL+uN++7HEJ6SQLQ2/p+z2pH24WQKWjBPkE0mNTz8vQ= +github.com/hashicorp/mdns v1.0.1/go.mod h1:4gW7WsVCke5TE7EPeYliwHlRUyBtfCwuFwuMg2DmyNY= github.com/hashicorp/memberlist v0.1.3/go.mod h1:ajVTdAv/9Im8oMAAj5G31PhhMCZJV2pPBoIllUwCN7I= +github.com/hashicorp/memberlist v0.2.2/go.mod h1:MS2lj3INKhZjWNqd3N0m3J+Jxf3DAOnAH9VT3Sh9MUE= github.com/hashicorp/serf v0.8.2/go.mod h1:6hOLApaqBFA1NXqRQAsxw9QxuDEvNxSQRwA/JwenrHc= +github.com/hashicorp/serf v0.9.5/go.mod h1:UWDWwZeL5cuWDJdl0C6wrvrUwEqtQ4ZKBKKENpqIUyk= github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU= github.com/hudl/fargo v1.3.0/go.mod h1:y3CKSmjA+wD2gak7sUSXTAoopbhU08POFhmITJgmKTg= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/inconshreveable/mousetrap v1.0.0 h1:Z8tu5sraLXCXIcARxBp/8cbvlwVa7Z1NHg9XEKhtSvM= github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8= github.com/influxdata/influxdb1-client v0.0.0-20191209144304-8bf82d3c094d/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= +github.com/influxdata/influxdb1-client v0.0.0-20200827194710-b269163b24ab/go.mod h1:qj24IKcXYK6Iy9ceXlo3Tc+vtHo9lIhSX5JddghvEPo= github.com/jessevdk/go-flags v0.0.0-20141203071132-1679536dcc89/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jessevdk/go-flags v1.4.0/go.mod h1:4FA24M0QyGHXBuZZK/XkWh8h0e1EYbRYJSGM75WSRxI= github.com/jmespath/go-jmespath v0.0.0-20180206201540-c2b33e8439af/go.mod h1:Nht3zPeWKUH0NzdCt2Blrr5ys8VGpn0CEB0cQHVjt7k= +github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo= +github.com/jmespath/go-jmespath/internal/testify v1.5.1/go.mod h1:L3OGu8Wl2/fWfCI6z80xFu9LTZmf1ZRjMHUOPmWr69U= github.com/jmhodges/levigo v1.0.0 h1:q5EC36kV79HWeTBWsod3mG11EgStG3qArTKcvlksN1U= github.com/jmhodges/levigo v1.0.0/go.mod h1:Q6Qx+uH3RAqyK4rFQroq9RL7mdkABMcfhEI+nNuzMJQ= github.com/jonboulle/clockwork v0.1.0/go.mod h1:Ii8DK3G1RaLaWxj9trq07+26W01tbo22gdxWY5EU2bo= @@ -315,7 +380,9 @@ github.com/json-iterator/go v1.1.7/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/u github.com/json-iterator/go v1.1.8/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/json-iterator/go v1.1.10/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= +github.com/json-iterator/go v1.1.11/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4= github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo= github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU= github.com/julienschmidt/httprouter v1.2.0/go.mod h1:SYymIcj16QtmaHHD7aYtjjsJG7VTCxuUUipMqKk8s4w= @@ -323,15 +390,16 @@ github.com/julienschmidt/httprouter v1.3.0/go.mod h1:JR6WtHb+2LUe8TCKY3cZOxFyyO8 github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d h1:Z+RDyXzjKE0i2sTjZ/b1uxiGtPhFy34Ou/Tk0qwN0kM= github.com/keybase/go-keychain v0.0.0-20190712205309-48d3d31d256d/go.mod h1:JJNrCn9otv/2QP4D7SMJBgaleKpOf66PnW6F5WGNRIc= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= -github.com/kisielk/gotool v1.0.0 h1:AV2c/EiW3KqPNT9ZKl07ehoAGi4C5/01Cfbblndcapg= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/kkdai/bstream v0.0.0-20161212061736-f391b8402d23/go.mod h1:J+Gs4SYgM6CZQHDETBtE9HaSEkGmuNXF86RwHhHUvq4= github.com/kkdai/bstream v1.0.0/go.mod h1:FDnDOHt5Yx4p3FaHcioFT0QjDOtgUpvjeZqAs+NVZZA= +github.com/klauspost/compress v1.11.12/go.mod h1:aoV0uJVorq1K+umq18yTdKaF57EivdYsUV+/s2qKfXs= github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/konsorten/go-windows-terminal-sequences v1.0.3/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ= github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo= +github.com/kr/pretty v0.2.0/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI= github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ= github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI= github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY= @@ -358,19 +426,26 @@ github.com/magiconair/properties v1.8.5/go.mod h1:y3VJvCyxH9uVvJTWEGAELF3aiYNyPK github.com/mailru/easyjson v0.7.7 h1:UGYAvKxe3sBsEDzO8ZeWOSlIQfWFlxbzLZe7hwFURr0= github.com/mailru/easyjson v0.7.7/go.mod h1:xzfreul335JAWq5oZzymOObrkdz5UnU4kGfJJLY9Nlc= github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU= +github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE= +github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc= github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4= +github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s= +github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84= +github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE= github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY= github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU= github.com/mattn/go-runewidth v0.0.2/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg= +github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 h1:hLDRPB66XQT/8+wG9WsDpiCvZf1yKO7sz7scAjSlBa0= github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643/go.mod h1:43+3pMjjKimDBf5Kr4ZFNGbLql1zKkbImw+fZbw3geM= github.com/minio/highwayhash v1.0.1 h1:dZ6IIu8Z14VlC0VpfKofAhCy74wu/Qb5gcn52yWoz/0= github.com/minio/highwayhash v1.0.1/go.mod h1:BQskDq+xkJ12lmlUUi7U0M5Swg3EWR+dLTk+kldvVxY= github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc= +github.com/mitchellh/cli v1.1.0/go.mod h1:xcISNoH86gajksDmfB23e/pu+B+GeFRMYmoHXxx3xhI= github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y= github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0= @@ -391,10 +466,16 @@ github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRW github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg= github.com/nats-io/jwt v0.3.2/go.mod h1:/euKqTS1ZD+zzjYrY7pseZrTtWQSjujC7xjPc8wL6eU= +github.com/nats-io/jwt v1.2.2/go.mod h1:/xX356yQA6LuXI9xWW7mZNpxgF2mBmGecH+Fj34sP5Q= +github.com/nats-io/jwt/v2 v2.0.2/go.mod h1:VRP+deawSXyhNjXmxPCHskrR6Mq50BqpEI5SEcNiGlY= github.com/nats-io/nats-server/v2 v2.1.2/go.mod h1:Afk+wRZqkMQs/p45uXdrVLuab3gwv3Z8C4HTBu8GD/k= +github.com/nats-io/nats-server/v2 v2.2.6/go.mod h1:sEnFaxqe09cDmfMgACxZbziXnhQFhwk+aKkZjBBRYrI= github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w= +github.com/nats-io/nats.go v1.11.0/go.mod h1:BPko4oXsySz4aSWeFgOHLZs3G4Jq4ZAyE6/zMCxRT6w= github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= github.com/nats-io/nkeys v0.1.3/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w= +github.com/nats-io/nkeys v0.2.0/go.mod h1:XdZpAbhgyyODYqjTawOnIOI7VlbKSarI9Gfy1tqEu/s= +github.com/nats-io/nkeys v0.3.0/go.mod h1:gvUNGjVcM2IPr5rCsRsC6Wb3Hr2CQAm08dsxtV6A5y4= github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e h1:fD57ERR4JtEqsWbfPhv4DMiApHyliiK5xCTNVSPiaAs= github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno= @@ -422,10 +503,12 @@ github.com/opentracing-contrib/go-observer v0.0.0-20170622124052-a52f23424492/go github.com/opentracing/basictracer-go v1.0.0/go.mod h1:QfBfYuafItcjQuMwinw9GhYKwFXS9KnPs5lxoYwgW74= github.com/opentracing/opentracing-go v1.0.2/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= github.com/opentracing/opentracing-go v1.1.0/go.mod h1:UkNAQd3GIcIGf0SeVgPpRdFStlNbqXla1AfSYxPUl2o= +github.com/opentracing/opentracing-go v1.2.0/go.mod h1:GxEUsuufX4nBwe+T+Wl9TAgYrxe9dPLANfrWvHYVTgc= github.com/openzipkin-contrib/zipkin-go-opentracing v0.4.5/go.mod h1:/wsWhb9smxSfWAKL3wpBW7V8scJMt8N8gnaMCS9E/cA= github.com/openzipkin/zipkin-go v0.1.6/go.mod h1:QgAqvLzwWbR/WpD4A3cGpPtJrZXNIiJc5AZX7/PBEpw= github.com/openzipkin/zipkin-go v0.2.1/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= github.com/openzipkin/zipkin-go v0.2.2/go.mod h1:NaW6tEwdmWMaCDZzg8sh+IBNOxHMPnhQw8ySjnjRyN4= +github.com/openzipkin/zipkin-go v0.2.5/go.mod h1:KpXfKdgRDnnhsxw4pNIH9Md5lyFqKUa4YDFlwRYAMyE= github.com/pact-foundation/pact-go v1.0.4/go.mod h1:uExwJY4kCzNPcHRj+hCR/HBbOOIwwtUjcrb0b5/5kLM= github.com/pascaldekloe/goe v0.0.0-20180627143212-57f6aae5913c/go.mod h1:lzWF7FIEvWOWxwDKqyGYQf6ZUaNfKdP144TG7ZOy1lc= github.com/pascaldekloe/goe v0.1.0 h1:cBOtyMzM9HTpWjXfbbunk26uA6nG3a8n06Wieeh0MwY= @@ -448,6 +531,7 @@ github.com/pkg/sftp v1.10.1/go.mod h1:lYOWFsE0bwd1+KfKJaKeuokY15vzFx25BLbzYYoAxZ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/posener/complete v1.1.1/go.mod h1:em0nMJCgc9GFtwrmVmEMR/ZL6WyhyjMBndrE9hABlRI= +github.com/posener/complete v1.2.3/go.mod h1:WZIdtGGp+qx0sLrYKtIRAruyNpv6hFCicSgv7Sy7s/s= github.com/prometheus/client_golang v0.9.1/go.mod h1:7SWBe2y4D6OKWSNQJUaRYU/AaXPKyh/dDVn+NZz0KFw= github.com/prometheus/client_golang v0.9.3-0.20190127221311-3c4408c8b829/go.mod h1:p2iRAGwDERtqlqzRXnrOVns+ignqQo//hLXqYxZYVNs= github.com/prometheus/client_golang v0.9.3/go.mod h1:/TN21ttK/J9q6uSwhBd54HahCDft0ttaMvbicHlPoso= @@ -456,8 +540,8 @@ github.com/prometheus/client_golang v1.3.0/go.mod h1:hJaj2vgQTGQmVCsAACORcieXFeD github.com/prometheus/client_golang v1.4.0/go.mod h1:e9GMxYsXl05ICDXkRhurwBS4Q3OK1iX/F2sw+iXX5zU= github.com/prometheus/client_golang v1.7.1/go.mod h1:PY5Wy2awLA44sXw4AOSfFBetzPP4j5+D6mVACh+pe2M= github.com/prometheus/client_golang v1.8.0/go.mod h1:O9VU6huf47PktckDQfMTX0Y8tY0/7TSWwj+ITvv0TnM= -github.com/prometheus/client_golang v1.10.0 h1:/o0BDeWzLWXNZ+4q5gXltUvaMpJqckTa+jTNoB+z4cg= -github.com/prometheus/client_golang v1.10.0/go.mod h1:WJM3cc3yu7XKBKa/I8WeZm+V3eltZnBwfENSU7mdogU= +github.com/prometheus/client_golang v1.11.0 h1:HNkLOAEQMIDv/K+04rukrLx6ch7msSRwf3/SASFAGtQ= +github.com/prometheus/client_golang v1.11.0/go.mod h1:Z6t4BnS23TR94PD6BsDNk8yVqroYurpAkEiz0P2BEV0= github.com/prometheus/client_model v0.0.0-20180712105110-5c3871d89910/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190115171406-56726106282f/go.mod h1:MbSGuTsp3dbXC40dX6PRTWyKYBIrTGTE9sqQNg2J8bo= github.com/prometheus/client_model v0.0.0-20190129233127-fd36f4220a90/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA= @@ -473,9 +557,9 @@ github.com/prometheus/common v0.7.0/go.mod h1:DjGbpBbp5NYNiECxcL/VnbXCCaQpKd3tt2 github.com/prometheus/common v0.9.1/go.mod h1:yhUN8i9wzaXS3w1O07YhxHEBxD+W35wd8bs7vj7HSQ4= github.com/prometheus/common v0.10.0/go.mod h1:Tlit/dnDKsSWFlCLTWaA1cyBgKHSMdTB80sz/V91rCo= github.com/prometheus/common v0.14.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.18.0/go.mod h1:U+gB1OBLb1lF3O42bTCL+FK18tX9Oar16Clt/msog/s= -github.com/prometheus/common v0.23.0 h1:GXWvPYuTUenIa+BhOq/x+L/QZzCqASkVRny5KTlPDGM= -github.com/prometheus/common v0.23.0/go.mod h1:H6QK/N6XVT42whUeIdI3dp36w49c+/iMDk7UAI2qm7Q= +github.com/prometheus/common v0.26.0/go.mod h1:M7rCNAaPfAosfx8veZJCuw84e35h3Cfd9VFqTh1DIvc= +github.com/prometheus/common v0.29.0 h1:3jqPBvKT4OHAbje2Ql7KeaaSicDBCxMYwEJU1zRJceE= +github.com/prometheus/common v0.29.0/go.mod h1:vu+V0TpY+O6vW9J44gczi3Ap/oXXR10b+M/gUGO4Hls= github.com/prometheus/procfs v0.0.0-20181005140218-185b4288413d/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190117184657-bf6a532e95b1/go.mod h1:c3At6R/oaqEKCNdg8wHV1ftS6bRYblBhIjjI8uT2IGk= github.com/prometheus/procfs v0.0.0-20190507164030-5867b95ac084/go.mod h1:TjEm7ze935MbeOT/UhFTIMYKhuLP4wbCsTZCD3I8kEA= @@ -501,8 +585,8 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ= -github.com/rs/zerolog v1.21.0 h1:Q3vdXlfLNT+OftyBHsU0Y445MD+8m8axjKgf2si0QcM= -github.com/rs/zerolog v1.21.0/go.mod h1:ZPhntP/xmq1nnND05hhpAh2QMhSsA4UN3MGZ6O2J3hM= +github.com/rs/zerolog v1.23.0 h1:UskrK+saS9P9Y789yNNulYKdARjPZuS35B8gJF2x60g= +github.com/rs/zerolog v1.23.0/go.mod h1:6c7hFfxPOy7TacJc4Fcdi24/J0NKYGzjG8FWRI916Qo= github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g= github.com/russross/blackfriday/v2 v2.0.1/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/ryanuber/columnize v0.0.0-20160712163229-9b3edd62028f/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts= @@ -514,6 +598,7 @@ github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeV github.com/sirupsen/logrus v1.2.0/go.mod h1:LxeOpSwHxABJmUn/MG1IvRgCAasNZTLOkJPxbbu5VWo= 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.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s= @@ -548,7 +633,9 @@ github.com/spf13/viper v1.7.1 h1:pM5oEahlgWv/WnHXpgbKz7iLIxRf65tye2Ci+XFK5sk= github.com/spf13/viper v1.7.1/go.mod h1:8WkrPz2fc9jxqZNCJI/76HCieCp4Q8HaLFoCha5qpdg= github.com/streadway/amqp v0.0.0-20190404075320-75d898a42a94/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/amqp v0.0.0-20190827072141-edfb9018d271/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= +github.com/streadway/amqp v1.0.0/go.mod h1:AZpEONHx3DKn8O/DFsRAY58/XVQiIPMTMB1SddzLXVw= github.com/streadway/handy v0.0.0-20190108123426-d5acb3125c2a/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= +github.com/streadway/handy v0.0.0-20200128134331-0f66f006fb2e/go.mod h1:qNTQ5P5JnDBl6z3cMAg/SywNDC5ABu5ApDIw6lUbRmI= github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= github.com/stretchr/objx v0.2.0 h1:Hbg2NidpLE8veEBkEZTL3CvlkUIVzuU9jDplZO54c48= @@ -573,9 +660,8 @@ github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15 h1:hqAk8riJvK4RM github.com/tendermint/crypto v0.0.0-20191022145703-50d29ede1e15/go.mod h1:z4YtwM70uOnk8h0pjJYlj3zdYwi9l03By6iAIF5j/Pk= github.com/tendermint/go-amino v0.16.0 h1:GyhmgQKvqF82e2oZeuMSp9JTN0N09emoSZlb2lyGa2E= github.com/tendermint/go-amino v0.16.0/go.mod h1:TQU0M1i/ImAo+tYpZi73AU3V/dKeCoMC9Sphe2ZwGME= +github.com/tendermint/tm-db v0.6.0 h1:Us30k7H1UDcdqoSPhmP8ztAW/SWV6c6OfsfeCiboTC4= github.com/tendermint/tm-db v0.6.0/go.mod h1:xj3AWJ08kBDlCHKijnhJ7mTcDMOikT1r8Poxy2pJn7Q= -github.com/tendermint/tm-db v0.6.4 h1:3N2jlnYQkXNQclQwd/eKV/NzlqPlfK21cpRRIx80XXQ= -github.com/tendermint/tm-db v0.6.4/go.mod h1:dptYhIpJ2M5kUuenLr+Yyf3zQOv1SgBZcl8/BmWlMBw= github.com/tmc/grpc-websocket-proxy v0.0.0-20170815181823-89b8d40f7ca8/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tmc/grpc-websocket-proxy v0.0.0-20190109142713-0ad062ec5ee5/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= github.com/tv42/httpunix v0.0.0-20150427012821-b75d8614f926/go.mod h1:9ESjWnEqriFuLhtthL60Sar/7RFoluCcXsuvEwTV5KM= @@ -584,8 +670,11 @@ 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/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= github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.3.5/go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k= github.com/zondax/hid v0.9.0 h1:eiT3P6vNxAEVxXMw66eZUAAnU2zD33JBkfG/EnfAKl8= github.com/zondax/hid v0.9.0/go.mod h1:l5wttcP0jwtdLjqjMMWFVEE7d1zO0jvSPA9OPZxWpEM= go.etcd.io/bbolt v1.3.2/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= @@ -593,19 +682,29 @@ go.etcd.io/bbolt v1.3.3/go.mod h1:IbVyRI1SCnLcuJnV2u8VeU0CEYM7e686BmAb1XKL+uU= go.etcd.io/bbolt v1.3.5 h1:XAzx9gjCb0Rxj7EoqcClPD1d5ZBxZJk0jbuoPHenBt0= go.etcd.io/bbolt v1.3.5/go.mod h1:G5EMThwa9y8QZGBClrRx5EY+Yw9kAhnjy3bSjsnlVTQ= go.etcd.io/etcd v0.0.0-20191023171146-3cf2f69b5738/go.mod h1:dnLIgRNXwCJa5e+c6mIZCrds/GIG4ncV9HhK5PX7jPg= +go.etcd.io/etcd/api/v3 v3.5.0/go.mod h1:cbVKeC6lCfl7j/8jBhAK6aIYO9XOjdptoxU/nLQcPvs= +go.etcd.io/etcd/client/pkg/v3 v3.5.0/go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g= +go.etcd.io/etcd/client/v2 v2.305.0/go.mod h1:h9puh54ZTgAKtEbut2oe9P4L/oqKCVB6xsXlzd7alYQ= +go.etcd.io/etcd/client/v3 v3.5.0/go.mod h1:AIKXXVX/DQXtfTEqBryiLTUXwON+GuvO6Z7lLS/oTh0= go.opencensus.io v0.20.1/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.20.2/go.mod h1:6WKK9ahsWS3RSO+PY9ZHZUfv2irvY6gN279GOPZjmmk= go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.23.0/go.mod h1:XItmlyltB5F7CS4xOC1DcqMoFqwtC6OG2xF7mCv7P7E= go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ= +go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0= go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4= +go.uber.org/multierr v1.6.0/go.mod h1:cdWPpRnG4AhwMwsgIHip0KRBQjJy5kYEpYjJxpXp9iU= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM= +go.uber.org/zap v1.17.0/go.mod h1:MXVU+bhUf/A7Xi2HNOnopQOrmycQ5Ih87HtOu4q5SSo= golang.org/x/crypto v0.0.0-20170930174604-9419663f5a44/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20180904163835-0709b304e793/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= golang.org/x/crypto v0.0.0-20181029021203-45a5f77698d3/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4= @@ -615,21 +714,28 @@ golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8U golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20190923035154-9ee001bba392/go.mod h1:/lpIB1dKB+9EgE3H3cr1v9wB50oz8l4C4h62xy7jSTY= golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20191206172530-e9b2fee46413/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200115085410-6d4e4cb37c7d/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= +golang.org/x/crypto v0.0.0-20200323165209-0ec3e9974c59/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200510223506-06a226fb4e37/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20200728195943-123391ffb6de/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20201117144127-c1f2f97bffc9/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83 h1:/ZScEX8SfEmUGRHs0gxpqteO5nfNW6axyZbBdw9A12g= -golang.org/x/crypto v0.0.0-20210220033148-5ea612d1eb83/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b h1:wSOdpTq0/eI46Ez/LkDwIsAKA71YP2SRKBODiRWM0as= +golang.org/x/crypto v0.0.0-20210314154223-e6e6c4f2bb5b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190306152737-a1d7652674e8/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= golang.org/x/exp v0.0.0-20191030013958-a1ab85dbe136/go.mod h1:JXzH8nQsPlswgeRAPE3MuO9GYsAcnJvJ4vnMwN/5qkY= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20200331195152-e8c3332aa8e5/go.mod h1:4M0jN8W1tt0AVLNr8HDosyJCDCDuyL9N9+3m7wDWgKw= golang.org/x/image v0.0.0-20190227222117-0694c2d4d067/go.mod h1:kZ7UVZpmo3dzQBMxlp+ypCbDeSB+sBbTgSJuh5dn5js= golang.org/x/image v0.0.0-20190802002840-cff245a6509b/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0= @@ -639,6 +745,10 @@ golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHl golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20210508222113-6edffad5e616/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= @@ -647,6 +757,7 @@ golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzB golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/net v0.0.0-20180719180050-a680a1efc54d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -664,30 +775,51 @@ golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= golang.org/x/net v0.0.0-20190613194153-d28f0bde5980/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190923162816-aa69164e4478/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200421231249-e086a090c8fd/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200813134508-3edf25e44fcc/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201110031124-69a78807bb2b/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= -golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4 h1:4nGaVu0QrbjT/AK2PRLuQfQuh6DJve+pELhqTdAj3x0= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.0.0-20210405180319-a5a99cb37ef4/go.mod h1:p54w0d4576C0XHj96bSt6lcn1PtDYWL6XObtHCRCNQM= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5 h1:wjuX4b5yYQnEQHzd+CBcrcC6OVR2J1CN6mUy0oSxIPo= +golang.org/x/net v0.0.0-20210525063256-abc453219eb5/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/oauth2 v0.0.0-20180821212333-d2e6202438be/go.mod h1:N/0e6XlmueqKjAGxoOufVs8QHGRruUQn6yWY3a++T0U= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20210514164344-f6687ab2804c/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20210220032951-036812b2e83c/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sys v0.0.0-20180823144017-11551d06cbcc/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -698,6 +830,7 @@ golang.org/x/sys v0.0.0-20181122145206-62eef0e2fa9b/go.mod h1:STP8DvDyc/dI5b8T5h golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190130150945-aca44879d564/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190312061237-fead79001313/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -710,20 +843,36 @@ golang.org/x/sys v0.0.0-20190712062909-fae7ac547cb7/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190922100055-0a153f010e69/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190924154521-2837fb4f24fe/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191220142924-d4481acd189f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200106162015-b016eb3dc98e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200124204421-9fbb57f87de9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200420163511-1957bb5e6d1f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200519105757-fe76b779f299/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200615200032-f1bc736245b1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200625212154-ddb9806d33ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200814200057-3d37ad5750ed/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20201015000850-e3ed0017c211/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= @@ -731,23 +880,29 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210309074719-68d13333faf2/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210330210617-4fbd30eecc44/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20210510120138-977fb7262007 h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE= +golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210510120138-977fb7262007/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40 h1:JWgyZ1qgdTaF3N3oxC+MdTV7qvEEgHo3otj+HB5CM7Q= +golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1 h1:v+OssWQX+hTHEmOBgwxdZxK4zHq3yOs8F9J7mk0PY8E= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.3.5 h1:i6eZZ+zk0SOf0xgBpEpPD18qWcJda6q1sxt3S0kzyUQ= golang.org/x/text v0.3.5/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M= +golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/time v0.0.0-20180412165947-fbb02b2291d2/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= +golang.org/x/time v0.0.0-20200416051211-89c76fbcd5d1/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= @@ -761,18 +916,43 @@ golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgw golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190907020128-2ca718005c18/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191012152004-8de300cfc20a/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191112195655-aa38f8e97acc/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= +golang.org/x/tools v0.1.2/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= 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= @@ -784,10 +964,23 @@ google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= google.golang.org/appengine v1.2.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.4.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/genproto v0.0.0-20180817151627-c66870c02cf8/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20180831171423-11092d34479b/go.mod h1:JiN7NxoALGmiZfu7CAH4rXhgtRTLTxftemlI0sWmxmc= google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= @@ -799,13 +992,32 @@ google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98 google.golang.org/genproto v0.0.0-20190819201941-24fa4b261c55/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200324203455-a04cca1dde73/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200423170343-7949de9c1215/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20201119123407-9b1e624d6bc4/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= -google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f h1:izedQ6yVIc5mZsRuXzmSreCOlzI0lCU1HpG8yEdMiKw= -google.golang.org/genproto v0.0.0-20210114201628-6edceaf6022f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c h1:wtujag7C+4D6KMoulW9YauvK2lgdvCMS260jsqqBXr0= +google.golang.org/genproto v0.0.0-20210602131652-f16073e35f0c/go.mod h1:UODoCrxHCcBojKKwX1terBiRUaqAsFqJiF615XL43r0= google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o= google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= @@ -819,21 +1031,21 @@ google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpAD google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= -google.golang.org/protobuf v1.26.0 h1:bxAC2xTBsZGibn2RTntX0oH50xLsqy1OxA9tTL3p/lk= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= +google.golang.org/protobuf v1.27.1 h1:SnqbnDw1V7RiZcXPx5MEeqPv2s79L9i7BJUlG/+RurQ= +google.golang.org/protobuf v1.27.1/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= gopkg.in/alecthomas/kingpin.v2 v2.2.6/go.mod h1:FMv+mEhP44yOT+4EoQTLFTRgOQ1FBLkstjWtayDeSgw= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b h1:QRR6H1YWRnHb4Y/HeNFCTJLFVxaq6wH4YuVdsUOr75U= -gopkg.in/check.v1 v1.0.0-20200902074654-038fdea0a05b/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f h1:BLraFXnmrev5lT+xlilqcH8XK9/i0At2xKjWk4p6zsU= +gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/cheggaaa/pb.v1 v1.0.25/go.mod h1:V/YB90LKu/1FcN3WVnfiiE5oMCibMjukxqG/qStrOgw= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys= gopkg.in/gcfg.v1 v1.2.3/go.mod h1:yesOnuUOFQAhST5vPY4nbZsb/huCgGGXlipJsBn0b3o= +gopkg.in/ini.v1 v1.51.0 h1:AQvPpx3LzTDM0AjnIRlVFwFFGC+npRopjZxLJj6gdno= gopkg.in/ini.v1 v1.51.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= -gopkg.in/ini.v1 v1.61.0 h1:LBCdW4FmFYL4s/vDZD1RQYX7oAR6IjujCYgMdbHBR10= -gopkg.in/ini.v1 v1.61.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k= 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= @@ -856,6 +1068,11 @@ honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWh honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/yaml v1.1.0/go.mod h1:UJmg0vDUVViEyp3mgSv9WPwZCDxu4rQW1olrI1uml+o= +sigs.k8s.io/yaml v1.2.0/go.mod h1:yfXDCHCao9+ENCvLSE62v9VSji2MKu5jeNfTrofGhJc= sourcegraph.com/sourcegraph/appdash v0.0.0-20190731080439-ebfcffb1b5c0/go.mod h1:hI742Nqp5OhwiqlzhgfbWU4mW4yO10fP+LoT9WOswdU= diff --git a/proto/lfb/auth/v1beta1/auth.proto b/proto/lfb/auth/v1beta1/auth.proto index 2e9cd9c895..aa81353cbc 100644 --- a/proto/lfb/auth/v1beta1/auth.proto +++ b/proto/lfb/auth/v1beta1/auth.proto @@ -20,8 +20,7 @@ message BaseAccount { string address = 1; google.protobuf.Any pub_key = 2 [(gogoproto.jsontag) = "public_key,omitempty", (gogoproto.moretags) = "yaml:\"public_key\""]; - uint64 account_number = 3 [(gogoproto.moretags) = "yaml:\"account_number\""]; - uint64 sequence = 4; + uint64 sequence = 3; } // ModuleAccount defines an account for modules that holds coins on a pool. @@ -47,4 +46,5 @@ message Params { [(gogoproto.customname) = "SigVerifyCostED25519", (gogoproto.moretags) = "yaml:\"sig_verify_cost_ed25519\""]; uint64 sig_verify_cost_secp256k1 = 5 [(gogoproto.customname) = "SigVerifyCostSecp256k1", (gogoproto.moretags) = "yaml:\"sig_verify_cost_secp256k1\""]; + uint64 valid_sig_block_period = 6 [(gogoproto.moretags) = "yaml:\"valid_sig_block_period\""]; } diff --git a/proto/lfb/base/ostracon/v1beta1/query.proto b/proto/lfb/base/ostracon/v1beta1/query.proto index 056b7f16a2..b3f8428bd9 100644 --- a/proto/lfb/base/ostracon/v1beta1/query.proto +++ b/proto/lfb/base/ostracon/v1beta1/query.proto @@ -7,6 +7,7 @@ import "google/api/annotations.proto"; import "ostracon/p2p/types.proto"; import "ostracon/types/block.proto"; import "ostracon/types/types.proto"; +import "ostracon/abci/types.proto"; import "lfb/base/query/v1beta1/pagination.proto"; option go_package = "github.com/line/lfb-sdk/client/grpc/tmservice"; @@ -29,6 +30,14 @@ service Service { rpc GetBlockByHeight(GetBlockByHeightRequest) returns (GetBlockByHeightResponse) { option (google.api.http).get = "/lfb/base/ostracon/v1beta1/blocks/{height}"; } + // GetBlockByHash queries block for given hash. + rpc GetBlockByHash(GetBlockByHashRequest) returns (GetBlockByHashResponse) { + option (google.api.http).get = "/lfb/base/ostracon/v1beta1/blocks/{hash}"; + } + // GetBlockResultsByHeight queries block results for given height. + rpc GetBlockResultsByHeight(GetBlockResultsByHeightRequest) returns (GetBlockResultsByHeightResponse) { + option (google.api.http).get = "/lfb/base/ostracon/v1beta1/blockresults/{height}"; + } // GetLatestValidatorSet queries latest validator-set. rpc GetLatestValidatorSet(GetLatestValidatorSetRequest) returns (GetLatestValidatorSetResponse) { @@ -88,6 +97,30 @@ message GetBlockByHeightResponse { .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 { + .ostracon.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 .ostracon.abci.ResponseDeliverTx txs_results = 2; + .ostracon.abci.ResponseBeginBlock res_begin_block = 3; + .ostracon.abci.ResponseEndBlock res_end_block = 4; +} + // GetLatestBlockRequest is the request type for the Query/GetLatestBlock RPC method. message GetLatestBlockRequest {} diff --git a/proto/lfb/tx/v1beta1/service.proto b/proto/lfb/tx/v1beta1/service.proto index e8573a70fc..451232aedd 100644 --- a/proto/lfb/tx/v1beta1/service.proto +++ b/proto/lfb/tx/v1beta1/service.proto @@ -40,8 +40,10 @@ service Service { message GetTxsEventRequest { // events is the list of transaction event type. repeated string events = 1; + // prove is Include proofs of the transactions inclusion in the block + bool prove = 2; // pagination defines an pagination for the request. - lfb.base.query.v1beta1.PageRequest pagination = 2; + lfb.base.query.v1beta1.PageRequest pagination = 3; } // GetTxsEventResponse is the response type for the Service.TxsByEvents diff --git a/proto/lfb/tx/v1beta1/tx.proto b/proto/lfb/tx/v1beta1/tx.proto index 61d0b2a39d..91ac04c04c 100644 --- a/proto/lfb/tx/v1beta1/tx.proto +++ b/proto/lfb/tx/v1beta1/tx.proto @@ -58,9 +58,6 @@ message SignDoc { // It prevents signed transactions from being used on another chain by an // attacker string chain_id = 3; - - // account_number is the account number of the account in state - uint64 account_number = 4; } // TxBody is the body of a transaction that all signers sign over. @@ -74,12 +71,16 @@ message TxBody { // transaction. repeated google.protobuf.Any messages = 1; + // sig block height is available between current block height and current block height - `VALID_SIG_BLOCK_PERIOD` + // this is used for distinguish signatures instead of account number. this is mandatory. + uint64 sig_block_height = 2; + // memo is any arbitrary memo to be added to the transaction - string memo = 2; + string memo = 3; // timeout is the block height after which this transaction will not // be processed by the chain - uint64 timeout_height = 3; + uint64 timeout_height = 4; // extension_options are arbitrary options that can be added by chains // when the default options are not sufficient. If any of these are present diff --git a/scripts/protoc-swagger-gen.sh b/scripts/protoc-swagger-gen.sh index bf62cd31e5..ca55fb5171 100755 --- a/scripts/protoc-swagger-gen.sh +++ b/scripts/protoc-swagger-gen.sh @@ -3,7 +3,7 @@ set -eo pipefail mkdir -p ./tmp-swagger-gen -proto_dirs=$(find ./proto -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) +proto_dirs=$(find ./proto ./x/wasm/internal/types -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) for dir in $proto_dirs; do # generate swagger files (filter query files) @@ -12,6 +12,7 @@ for dir in $proto_dirs; do buf protoc \ -I "proto" \ -I "third_party/proto" \ + -I "x/wasm/internal/types" \ "$query_file" \ --swagger_out=./tmp-swagger-gen \ --swagger_opt=logtostderr=true --swagger_opt=fqn_for_swagger_name=true --swagger_opt=simple_operation_ids=true diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 5e0b1d10bb..4a4e60d32b 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -4,8 +4,6 @@ set -eo pipefail # TODO ebony apk add --no-cache git -go env -w GOPRIVATE=github.com/line/* -git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" protoc_gen_gocosmos() { if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then diff --git a/server/grpc/server_test.go b/server/grpc/server_test.go index 59dc3ac1b9..bdaae99628 100644 --- a/server/grpc/server_test.go +++ b/server/grpc/server_test.go @@ -172,8 +172,8 @@ func (s *IntegrationTestSuite) TestGRPCServer_BroadcastTx() { } // Test and enforce that we upfront reject any connections to baseapp containing -// invalid initial x-cosmos-block-height that aren't positive and in the range [0, max(int64)] -// See issue https://github.com/line/lfb-sdk/issues/7662. +// invalid initial x-lfb-block-height that aren't positive and in the range [0, max(int64)] +// See issue https://github.com/cosmos/cosmos-sdk/issues/7662. func (s *IntegrationTestSuite) TestGRPCServerInvalidHeaderHeights() { t := s.T() val0 := s.network.Validators[0] @@ -183,9 +183,9 @@ func (s *IntegrationTestSuite) TestGRPCServerInvalidHeaderHeights() { value string wantErr string }{ - {"-1", "\"x-cosmos-block-height\" must be >= 0"}, + {"-1", "\"x-lfb-block-height\" must be >= 0"}, {"9223372036854775808", "value out of range"}, // > max(int64) by 1 - {"-10", "\"x-cosmos-block-height\" must be >= 0"}, + {"-10", "\"x-lfb-block-height\" must be >= 0"}, {"18446744073709551615", "value out of range"}, // max uint64, which is > max(int64) {"-9223372036854775809", "value out of range"}, // Out of the range of for negative int64 } diff --git a/server/mock/tx.go b/server/mock/tx.go index 6f556e4102..84f59c6fc8 100644 --- a/server/mock/tx.go +++ b/server/mock/tx.go @@ -53,6 +53,10 @@ func (tx kvstoreTx) GetSignBytes() []byte { return tx.bytes } +func (tx kvstoreTx) GetSigBlockHeight() uint64 { + return 0 +} + // Should the app be calling this? Or only handlers? func (tx kvstoreTx) ValidateBasic() error { return nil diff --git a/simapp/genesis_account_test.go b/simapp/genesis_account_test.go index be5ad80ce4..94a419eece 100644 --- a/simapp/genesis_account_test.go +++ b/simapp/genesis_account_test.go @@ -20,7 +20,7 @@ func TestSimGenesisAccountValidate(t *testing.T) { vestingStart := time.Now().UTC() coins := sdk.NewCoins(sdk.NewInt64Coin("test", 1000)) - baseAcc := authtypes.NewBaseAccount(addr, pubkey, 0, 0) + baseAcc := authtypes.NewBaseAccount(addr, pubkey, 0) testCases := []struct { name string @@ -37,14 +37,14 @@ func TestSimGenesisAccountValidate(t *testing.T) { { "invalid basic account with mismatching address/pubkey", simapp.SimGenesisAccount{ - BaseAccount: authtypes.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0, 0), + BaseAccount: authtypes.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0), }, true, }, { "valid basic account with module name", simapp.SimGenesisAccount{ - BaseAccount: authtypes.NewBaseAccount(sdk.AccAddress(crypto.AddressHash([]byte("testmod"))), nil, 0, 0), + BaseAccount: authtypes.NewBaseAccount(sdk.AccAddress(crypto.AddressHash([]byte("testmod"))), nil, 0), ModuleName: "testmod", }, false, diff --git a/simapp/helpers/test_helpers.go b/simapp/helpers/test_helpers.go index ac00ed6066..f982754bb7 100644 --- a/simapp/helpers/test_helpers.go +++ b/simapp/helpers/test_helpers.go @@ -19,7 +19,7 @@ const ( ) // GenTx generates a signed mock transaction. -func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, accNums, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { +func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, chainID string, sbh, accSeqs []uint64, priv ...cryptotypes.PrivKey) (sdk.Tx, error) { sigs := make([]signing.SignatureV2, len(priv)) // create a random length memo @@ -57,10 +57,10 @@ func GenTx(gen client.TxConfig, msgs []sdk.Msg, feeAmt sdk.Coins, gas uint64, ch // 2nd round: once all signer infos are set, every signer can sign. for i, p := range priv { signerData := authsign.SignerData{ - ChainID: chainID, - AccountNumber: accNums[i], - Sequence: accSeqs[i], + ChainID: chainID, + Sequence: accSeqs[i], } + tx.SetSigBlockHeight(sbh[i]) signBytes, err := gen.SignModeHandler().GetSignBytes(signMode, signerData, tx.GetTx()) if err != nil { panic(err) diff --git a/simapp/simd/cmd/genaccounts.go b/simapp/simd/cmd/genaccounts.go index 96cbd86c9a..d4edc5b3f4 100644 --- a/simapp/simd/cmd/genaccounts.go +++ b/simapp/simd/cmd/genaccounts.go @@ -85,7 +85,7 @@ contain valid denominations. Accounts may optionally be supplied with vesting pa var genAccount authtypes.GenesisAccount balances := banktypes.Balance{Address: addr.String(), Coins: coins.Sort()} - baseAccount := authtypes.NewBaseAccount(addr, nil, 0, 0) + baseAccount := authtypes.NewBaseAccount(addr, nil, 0) if !vestingAmt.IsZero() { baseVestingAccount := authvesting.NewBaseVestingAccount(baseAccount, vestingAmt.Sort(), vestingEnd) diff --git a/simapp/simd/cmd/testnet.go b/simapp/simd/cmd/testnet.go index ea82cf7996..2b54bf4d4f 100644 --- a/simapp/simd/cmd/testnet.go +++ b/simapp/simd/cmd/testnet.go @@ -204,7 +204,7 @@ func InitTestnet( } genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: coins.Sort()}) - genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) + genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0)) valTokens := sdk.TokensFromConsensusPower(100) createValMsg, err := stakingtypes.NewMsgCreateValidator( diff --git a/simapp/test_helpers.go b/simapp/test_helpers.go index fdf1a596ab..ea1534a433 100644 --- a/simapp/test_helpers.go +++ b/simapp/test_helpers.go @@ -326,7 +326,7 @@ func CheckBalance(t *testing.T, app *SimApp, addr sdk.AccAddress, balances sdk.C // returned. func SignCheckDeliver( t *testing.T, txCfg client.TxConfig, app *bam.BaseApp, header ostproto.Header, msgs []sdk.Msg, - chainID string, accNums, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, + chainID string, sbh, accSeqs []uint64, expSimPass, expPass bool, priv ...cryptotypes.PrivKey, ) (sdk.GasInfo, *sdk.Result, error) { tx, err := helpers.GenTx( @@ -335,7 +335,7 @@ func SignCheckDeliver( sdk.Coins{sdk.NewInt64Coin(sdk.DefaultBondDenom, 0)}, helpers.DefaultGenTxGas, chainID, - accNums, + sbh, accSeqs, priv..., ) diff --git a/simapp/utils_test.go b/simapp/utils_test.go index b10295df1f..f8a0ab1973 100644 --- a/simapp/utils_test.go +++ b/simapp/utils_test.go @@ -41,8 +41,6 @@ func TestSetup(t *testing.T) { } func TestGetSimulationLog(t *testing.T) { - cdc := makeCodec(ModuleBasics) - decoders := make(sdk.StoreDecoderRegistry) decoders[authtypes.StoreKey] = func(kvAs, kvBs kv.Pair) string { return "10" } @@ -56,11 +54,6 @@ func TestGetSimulationLog(t *testing.T) { []kv.Pair{{}}, "", }, - { - authtypes.StoreKey, - []kv.Pair{{Key: authtypes.GlobalAccountNumberKey, Value: cdc.MustMarshalBinaryBare(uint64(10))}}, - "10", - }, { "OtherStore", []kv.Pair{{Key: []byte("key"), Value: []byte("value")}}, diff --git a/tests/mocks/account_retriever.go b/tests/mocks/account_retriever.go index 398bde25d7..63136d390b 100644 --- a/tests/mocks/account_retriever.go +++ b/tests/mocks/account_retriever.go @@ -63,20 +63,6 @@ func (mr *MockAccountMockRecorder) GetPubKey() *gomock.Call { return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetPubKey", reflect.TypeOf((*MockAccount)(nil).GetPubKey)) } -// GetAccountNumber mocks base method -func (m *MockAccount) GetAccountNumber() uint64 { - m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccountNumber") - ret0, _ := ret[0].(uint64) - return ret0 -} - -// GetAccountNumber indicates an expected call of GetAccountNumber -func (mr *MockAccountMockRecorder) GetAccountNumber() *gomock.Call { - mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountNumber", reflect.TypeOf((*MockAccount)(nil).GetAccountNumber)) -} - // GetSequence mocks base method func (m *MockAccount) GetSequence() uint64 { m.ctrl.T.Helper() @@ -159,18 +145,18 @@ func (mr *MockAccountRetrieverMockRecorder) EnsureExists(clientCtx, addr interfa return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "EnsureExists", reflect.TypeOf((*MockAccountRetriever)(nil).EnsureExists), clientCtx, addr) } -// GetAccountNumberSequence mocks base method -func (m *MockAccountRetriever) GetAccountNumberSequence(clientCtx client.Context, addr types0.AccAddress) (uint64, uint64, error) { +// GetAccountSequence mocks base method +func (m *MockAccountRetriever) GetAccountSequence(clientCtx client.Context, addr types0.AccAddress) (uint64, uint64, error) { m.ctrl.T.Helper() - ret := m.ctrl.Call(m, "GetAccountNumberSequence", clientCtx, addr) + ret := m.ctrl.Call(m, "GetAccountSequence", clientCtx, addr) ret0, _ := ret[0].(uint64) ret1, _ := ret[1].(uint64) ret2, _ := ret[2].(error) return ret0, ret1, ret2 } -// GetAccountNumberSequence indicates an expected call of GetAccountNumberSequence -func (mr *MockAccountRetrieverMockRecorder) GetAccountNumberSequence(clientCtx, addr interface{}) *gomock.Call { +// GetAccountSequence indicates an expected call of GetAccountSequence +func (mr *MockAccountRetrieverMockRecorder) GetAccountSequence(clientCtx, addr interface{}) *gomock.Call { mr.mock.ctrl.T.Helper() - return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountNumberSequence", reflect.TypeOf((*MockAccountRetriever)(nil).GetAccountNumberSequence), clientCtx, addr) + return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetAccountSequence", reflect.TypeOf((*MockAccountRetriever)(nil).GetAccountSequence), clientCtx, addr) } diff --git a/testutil/network/network.go b/testutil/network/network.go index 9f8325fa80..bffdfb84f9 100644 --- a/testutil/network/network.go +++ b/testutil/network/network.go @@ -291,7 +291,7 @@ func New(t *testing.T, cfg Config) *Network { genFiles = append(genFiles, tmCfg.GenesisFile()) genBalances = append(genBalances, banktypes.Balance{Address: addr.String(), Coins: balances.Sort()}) - genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0, 0)) + genAccounts = append(genAccounts, authtypes.NewBaseAccount(addr, nil, 0)) commission, err := sdk.NewDecFromStr("0.5") require.NoError(t, err) diff --git a/testutil/testdata/unknonwnproto.pb.go b/testutil/testdata/unknonwnproto.pb.go index 302c4acab1..24edbb02aa 100644 --- a/testutil/testdata/unknonwnproto.pb.go +++ b/testutil/testdata/unknonwnproto.pb.go @@ -2567,9 +2567,10 @@ func (m *TestUpdatedTxRaw) GetNewField_1024() []byte { type TestUpdatedTxBody struct { Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` - Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` - TimeoutHeight int64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` - SomeNewField uint64 `protobuf:"varint,4,opt,name=some_new_field,json=someNewField,proto3" json:"some_new_field,omitempty"` + SigBlockHeight uint64 `protobuf:"varint,2,opt,name=sig_block_height,json=sigBlockHeight,proto3" json:"sig_block_height,omitempty"` + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` + TimeoutHeight int64 `protobuf:"varint,4,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + SomeNewField uint64 `protobuf:"varint,5,opt,name=some_new_field,json=someNewField,proto3" json:"some_new_field,omitempty"` SomeNewFieldNonCriticalField string `protobuf:"bytes,1050,opt,name=some_new_field_non_critical_field,json=someNewFieldNonCriticalField,proto3" json:"some_new_field_non_critical_field,omitempty"` ExtensionOptions []*types.Any `protobuf:"bytes,1023,rep,name=extension_options,json=extensionOptions,proto3" json:"extension_options,omitempty"` NonCriticalExtensionOptions []*types.Any `protobuf:"bytes,2047,rep,name=non_critical_extension_options,json=nonCriticalExtensionOptions,proto3" json:"non_critical_extension_options,omitempty"` @@ -2615,6 +2616,13 @@ func (m *TestUpdatedTxBody) GetMessages() []*types.Any { return nil } +func (m *TestUpdatedTxBody) GetSigBlockHeight() uint64 { + if m != nil { + return m.SigBlockHeight + } + return 0 +} + func (m *TestUpdatedTxBody) GetMemo() string { if m != nil { return m.Memo @@ -2809,110 +2817,112 @@ func init() { func init() { proto.RegisterFile("unknonwnproto.proto", fileDescriptor_448ea787339d1228) } var fileDescriptor_448ea787339d1228 = []byte{ - // 1646 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4d, 0x6f, 0x1b, 0xc7, - 0x19, 0xd6, 0x70, 0x49, 0x89, 0x7c, 0x45, 0x53, 0xcc, 0x58, 0x68, 0x36, 0x74, 0xcc, 0x30, 0x0b, - 0xc5, 0x61, 0x82, 0x86, 0x34, 0x97, 0x0c, 0x50, 0x04, 0x28, 0x10, 0x52, 0xb1, 0x2a, 0x01, 0xaa, - 0x5c, 0x4c, 0x9d, 0xb4, 0xf0, 0x85, 0x58, 0x72, 0x87, 0xe4, 0x42, 0xe4, 0x8c, 0xba, 0x3b, 0x6b, - 0x91, 0xb7, 0xa2, 0x3d, 0xf4, 0x9a, 0x4b, 0x51, 0xa0, 0xff, 0xa0, 0xa7, 0x22, 0xff, 0xa0, 0xe8, - 0x29, 0x97, 0x02, 0xbe, 0x14, 0x28, 0x50, 0x20, 0x28, 0xec, 0x6b, 0xff, 0x41, 0x51, 0xb8, 0x98, - 0xd9, 0x0f, 0x2e, 0x25, 0x51, 0xa6, 0xe4, 0xd6, 0x86, 0x80, 0x5e, 0xa4, 0x99, 0x77, 0x9f, 0x79, - 0x3f, 0x9e, 0xf7, 0x83, 0x3b, 0x0b, 0xb7, 0x7d, 0x76, 0xcc, 0x38, 0x3b, 0x65, 0x27, 0x2e, 0x17, - 0xbc, 0xa6, 0xfe, 0xe2, 0xac, 0xa0, 0x9e, 0xb0, 0x2d, 0x61, 0x95, 0xb6, 0x87, 0x7c, 0xc8, 0x95, - 0xb0, 0x2e, 0x57, 0xc1, 0xf3, 0xd2, 0x3b, 0x43, 0xce, 0x87, 0x63, 0x5a, 0x57, 0xbb, 0x9e, 0x3f, - 0xa8, 0x5b, 0x6c, 0x16, 0x3e, 0x7a, 0x7b, 0x3c, 0xe8, 0xd5, 0x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 0x7b, 0xeb, 0x8a, 0xdd, 0xe6, - 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0xff, 0xd6, 0xbe, 0xbb, 0xd8, 0x18, 0x00, 0x00, + // 1671 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x58, 0x4f, 0x6f, 0x1b, 0xc7, + 0x15, 0xd7, 0x70, 0x49, 0x89, 0x7c, 0xa2, 0x69, 0x66, 0x6c, 0x34, 0x1b, 0x39, 0x66, 0x98, 0x85, + 0xe3, 0x30, 0x41, 0x43, 0x9a, 0x4b, 0x06, 0x28, 0x02, 0x14, 0x08, 0xa9, 0x58, 0xb5, 0x01, 0x57, + 0x2e, 0xa6, 0x4e, 0x5a, 0xf8, 0x42, 0x2c, 0xb9, 0xc3, 0xe5, 0x42, 0xe4, 0x8c, 0xba, 0x33, 0x6b, + 0x91, 0xb7, 0xa2, 0x3d, 0xf4, 0xda, 0x4b, 0x51, 0xa0, 0xdf, 0xa0, 0xa7, 0x22, 0xd7, 0x9e, 0x8a, + 0x9e, 0x72, 0x29, 0xe0, 0x4b, 0x81, 0x02, 0x05, 0x82, 0xc2, 0xbe, 0xf6, 0x1b, 0x14, 0x45, 0x8a, + 0x99, 0xfd, 0xc3, 0xa5, 0x24, 0x3a, 0xb4, 0xd2, 0xc6, 0x10, 0xd0, 0x0b, 0x39, 0xf3, 0xf6, 0x37, + 0xef, 0xcf, 0xef, 0xcd, 0x7b, 0xbb, 0x33, 0x70, 0x2d, 0x64, 0x47, 0x8c, 0xb3, 0x13, 0x76, 0x1c, + 0x70, 0xc9, 0x9b, 0xfa, 0x17, 0x17, 0x25, 0x15, 0xd2, 0x75, 0xa4, 0xb3, 0x77, 0xdd, 0xe3, 0x1e, + 0xd7, 0xc2, 0x96, 0x1a, 0x45, 0xcf, 0xf7, 0xde, 0xf0, 0x38, 0xf7, 0xa6, 0xb4, 0xa5, 0x67, 0x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 0xf8, 0xe9, 0xb1, 0xeb, 0x48, 0xea, 0x3e, 0x9a, 0x13, 0xe7, 0x04, 0xdf, 0x04, 0x18, + 0x72, 0x77, 0x31, 0x18, 0x2e, 0x24, 0x15, 0xda, 0x46, 0x99, 0x94, 0x94, 0xa4, 0xaf, 0x04, 0xf8, + 0x36, 0x5c, 0x75, 0x42, 0x39, 0x19, 0xf8, 0x6c, 0xcc, 0x63, 0x4c, 0x4e, 0x63, 0xae, 0x28, 0xf1, + 0x7d, 0x36, 0xe6, 0x11, 0xae, 0x06, 0x20, 0x7c, 0x8f, 0x39, 0x32, 0x0c, 0xa8, 0x30, 0x8d, 0xba, + 0xd1, 0x28, 0x93, 0x8c, 0x04, 0xd7, 0x60, 0x37, 0x3d, 0xbb, 0x0c, 0x3e, 0xd4, 0x37, 0x06, 0x65, + 0x52, 0x4a, 0x4e, 0x2f, 0x1f, 0xe2, 0x77, 0xa0, 0xb2, 0x7c, 0xde, 0xbe, 0x63, 0x77, 0xcd, 0x9f, + 0x17, 0x35, 0xa6, 0x9c, 0x60, 0x94, 0xd0, 0xfa, 0xa3, 0x01, 0xaf, 0xad, 0x84, 0xd0, 0xe7, 0xee, + 0x02, 0xdf, 0x81, 0xe2, 0x8c, 0x0a, 0xe1, 0x78, 0x3a, 0x02, 0x63, 0xed, 0x26, 0x4b, 0x51, 0xb8, + 0x01, 0x55, 0xe1, 0x7b, 0x83, 0xe1, 0x94, 0x8f, 0x8e, 0x06, 0x13, 0xea, 0x7b, 0x13, 0xa9, 0xe3, + 0xca, 0x93, 0x8a, 0xf0, 0xbd, 0xbe, 0x12, 0xdf, 0xd3, 0x52, 0xd5, 0x07, 0x66, 0x74, 0xc6, 0x93, + 0xcb, 0x24, 0x35, 0x56, 0xce, 0x4a, 0x7f, 0x46, 0x79, 0x28, 0x93, 0xb5, 0x11, 0xc7, 0x57, 0x62, + 0x69, 0xbc, 0xf4, 0x16, 0x54, 0x04, 0x9f, 0xd1, 0xc1, 0xf2, 0xd0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xd7, + 0xb6, 0xfe, 0xf6, 0xbc, 0xb6, 0xf5, 0xf8, 0x3d, 0xcf, 0x97, 0x93, 0x70, 0xd8, 0x1c, 0xf1, 0x59, + 0x6b, 0xea, 0x33, 0xda, 0x9a, 0x8e, 0x87, 0x1f, 0x08, 0xf7, 0xa8, 0xa5, 0xda, 0x42, 0x28, 0xfd, + 0x69, 0x2b, 0xe9, 0x0f, 0xc3, 0x6d, 0xcd, 0x6e, 0xe7, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x88, + 0x10, 0xe5, 0x2d, 0x02, 0x19, 0x00, 0x00, } func (m *Customer1) Marshal() (dAtA []byte, err error) { @@ -5252,19 +5262,24 @@ func (m *TestUpdatedTxBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.SomeNewField != 0 { i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.SomeNewField)) i-- - dAtA[i] = 0x20 + dAtA[i] = 0x28 } if m.TimeoutHeight != 0 { i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.TimeoutHeight)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if len(m.Memo) > 0 { i -= len(m.Memo) copy(dAtA[i:], m.Memo) i = encodeVarintUnknonwnproto(dAtA, i, uint64(len(m.Memo))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.SigBlockHeight != 0 { + i = encodeVarintUnknonwnproto(dAtA, i, uint64(m.SigBlockHeight)) + i-- + dAtA[i] = 0x10 } if len(m.Messages) > 0 { for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { @@ -6416,6 +6431,9 @@ func (m *TestUpdatedTxBody) Size() (n int) { n += 1 + l + sovUnknonwnproto(uint64(l)) } } + if m.SigBlockHeight != 0 { + n += 1 + sovUnknonwnproto(uint64(m.SigBlockHeight)) + } l = len(m.Memo) if l > 0 { n += 1 + l + sovUnknonwnproto(uint64(l)) @@ -12543,6 +12561,25 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SigBlockHeight", wireType) + } + m.SigBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowUnknonwnproto + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SigBlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) } @@ -12574,7 +12611,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { } m.Memo = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) } @@ -12593,7 +12630,7 @@ func (m *TestUpdatedTxBody) Unmarshal(dAtA []byte) error { break } } - case 4: + case 5: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field SomeNewField", wireType) } diff --git a/testutil/testdata/unknonwnproto.proto b/testutil/testdata/unknonwnproto.proto index 1a9139ce20..2893e577fb 100644 --- a/testutil/testdata/unknonwnproto.proto +++ b/testutil/testdata/unknonwnproto.proto @@ -288,9 +288,10 @@ message TestUpdatedTxRaw { message TestUpdatedTxBody { repeated google.protobuf.Any messages = 1; - string memo = 2; - int64 timeout_height = 3; - uint64 some_new_field = 4; + uint64 sig_block_height = 2; + string memo = 3; + int64 timeout_height = 4; + uint64 some_new_field = 5; string some_new_field_non_critical_field = 1050; repeated google.protobuf.Any extension_options = 1023; repeated google.protobuf.Any non_critical_extension_options = 2047; diff --git a/types/errors/errors.go b/types/errors/errors.go index 1aa68816cc..fd2b30907d 100644 --- a/types/errors/errors.go +++ b/types/errors/errors.go @@ -135,6 +135,10 @@ var ( // supported. ErrNotSupported = Register(RootCodespace, 37, "feature not supported") + // ErrInvalidSigBlockHeight is returned when SigBlockHeight of tx is either greater than current block height or + // less than (current block height - ValidSigBlockPeriod) + ErrInvalidSigBlockHeight = Register(RootCodespace, 38, "invalid sig block height") + // ErrPanic is only set when we recover from a panic, so we know to // redact potentially sensitive system info ErrPanic = Register(UndefinedCodespace, 111222, "panic") diff --git a/types/grpc/headers.go b/types/grpc/headers.go index 0915307958..c3dc08deaf 100644 --- a/types/grpc/headers.go +++ b/types/grpc/headers.go @@ -2,5 +2,5 @@ package grpc const ( // GRPCBlockHeightHeader is the gRPC header for block height. - GRPCBlockHeightHeader = "x-cosmos-block-height" + GRPCBlockHeightHeader = "x-lfb-block-height" ) diff --git a/types/rest/rest.go b/types/rest/rest.go index 04470917f3..d87d6f79e5 100644 --- a/types/rest/rest.go +++ b/types/rest/rest.go @@ -62,35 +62,35 @@ type GasEstimateResponse struct { // BaseReq defines a structure that can be embedded in other request structures // that all share common "base" fields. type BaseReq struct { - From string `json:"from"` - Memo string `json:"memo"` - ChainID string `json:"chain_id"` - AccountNumber uint64 `json:"account_number"` - Sequence uint64 `json:"sequence"` - TimeoutHeight uint64 `json:"timeout_height"` - Fees sdk.Coins `json:"fees"` - GasPrices sdk.DecCoins `json:"gas_prices"` - Gas string `json:"gas"` - GasAdjustment string `json:"gas_adjustment"` - Simulate bool `json:"simulate"` + From string `json:"from"` + Memo string `json:"memo"` + ChainID string `json:"chain_id"` + SigBlockHeight uint64 `json:"sig_block_height"` + Sequence uint64 `json:"sequence"` + TimeoutHeight uint64 `json:"timeout_height"` + Fees sdk.Coins `json:"fees"` + GasPrices sdk.DecCoins `json:"gas_prices"` + Gas string `json:"gas"` + GasAdjustment string `json:"gas_adjustment"` + Simulate bool `json:"simulate"` } // NewBaseReq creates a new basic request instance and sanitizes its values func NewBaseReq( - from, memo, chainID string, gas, gasAdjustment string, accNumber, seq uint64, + from, memo, chainID string, gas, gasAdjustment string, signBlockHeight, seq uint64, fees sdk.Coins, gasPrices sdk.DecCoins, simulate bool, ) BaseReq { return BaseReq{ - From: strings.TrimSpace(from), - Memo: strings.TrimSpace(memo), - ChainID: strings.TrimSpace(chainID), - Fees: fees, - GasPrices: gasPrices, - Gas: strings.TrimSpace(gas), - GasAdjustment: strings.TrimSpace(gasAdjustment), - AccountNumber: accNumber, - Sequence: seq, - Simulate: simulate, + From: strings.TrimSpace(from), + Memo: strings.TrimSpace(memo), + ChainID: strings.TrimSpace(chainID), + Fees: fees, + GasPrices: gasPrices, + Gas: strings.TrimSpace(gas), + GasAdjustment: strings.TrimSpace(gasAdjustment), + SigBlockHeight: signBlockHeight, + Sequence: seq, + Simulate: simulate, } } @@ -98,7 +98,7 @@ func NewBaseReq( func (br BaseReq) Sanitize() BaseReq { return NewBaseReq( br.From, br.Memo, br.ChainID, br.Gas, br.GasAdjustment, - br.AccountNumber, br.Sequence, br.Fees, br.GasPrices, br.Simulate, + br.SigBlockHeight, br.Sequence, br.Fees, br.GasPrices, br.Simulate, ) } diff --git a/types/rest/rest_test.go b/types/rest/rest_test.go index b103506e6f..a0bda34bf2 100644 --- a/types/rest/rest_test.go +++ b/types/rest/rest_test.go @@ -183,7 +183,6 @@ func TestProcessPostResponse(t *testing.T) { Address types.AccAddress `json:"address"` Coins types.Coins `json:"coins"` PubKey cryptotypes.PubKey `json:"public_key"` - AccountNumber uint64 `json:"account_number"` Sequence uint64 `json:"sequence"` } @@ -196,10 +195,9 @@ func TestProcessPostResponse(t *testing.T) { pubKey := privKey.PubKey() addr := types.AccAddress(pubKey.Address()) coins := types.NewCoins(types.NewCoin("atom", types.NewInt(100)), types.NewCoin("tree", types.NewInt(125))) - accNumber := uint64(104) sequence := uint64(32) - acc := mockAccount{addr, coins, pubKey, accNumber, sequence} + acc := mockAccount{addr, coins, pubKey, sequence} cdc := codec.NewLegacyAmino() cryptocodec.RegisterCrypto(cdc) cdc.RegisterConcrete(&mockAccount{}, "lfb-sdk/mockAccount", nil) diff --git a/types/tx/service.pb.go b/types/tx/service.pb.go index 99abde68b0..897b293721 100644 --- a/types/tx/service.pb.go +++ b/types/tx/service.pb.go @@ -75,8 +75,10 @@ func (BroadcastMode) EnumDescriptor() ([]byte, []int) { type GetTxsEventRequest struct { // events is the list of transaction event type. Events []string `protobuf:"bytes,1,rep,name=events,proto3" json:"events,omitempty"` + // prove is Include proofs of the transactions inclusion in the block + Prove bool `protobuf:"varint,2,opt,name=prove,proto3" json:"prove,omitempty"` // pagination defines an pagination for the request. - Pagination *query.PageRequest `protobuf:"bytes,2,opt,name=pagination,proto3" json:"pagination,omitempty"` + Pagination *query.PageRequest `protobuf:"bytes,3,opt,name=pagination,proto3" json:"pagination,omitempty"` } func (m *GetTxsEventRequest) Reset() { *m = GetTxsEventRequest{} } @@ -119,6 +121,13 @@ func (m *GetTxsEventRequest) GetEvents() []string { return nil } +func (m *GetTxsEventRequest) GetProve() bool { + if m != nil { + return m.Prove + } + return false +} + func (m *GetTxsEventRequest) GetPagination() *query.PageRequest { if m != nil { return m.Pagination @@ -513,53 +522,54 @@ func init() { func init() { proto.RegisterFile("lfb/tx/v1beta1/service.proto", fileDescriptor_af5f209e95bb539d) } var fileDescriptor_af5f209e95bb539d = []byte{ - // 734 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x54, 0x4d, 0x6f, 0xda, 0x4a, - 0x14, 0xc5, 0x90, 0x97, 0x8f, 0x4b, 0x92, 0x87, 0x86, 0xbc, 0x17, 0x1e, 0x0f, 0x5c, 0xea, 0x44, - 0x6a, 0x14, 0xa9, 0xb6, 0x42, 0x95, 0x45, 0xb3, 0x0b, 0x1f, 0x8d, 0xa2, 0x36, 0x1f, 0x32, 0xe9, - 0x22, 0xdd, 0x20, 0x1b, 0x06, 0x63, 0x95, 0x78, 0x08, 0x33, 0x50, 0x47, 0x6d, 0x37, 0x55, 0x7f, - 0x40, 0xa5, 0xfe, 0xa8, 0x76, 0x19, 0xa9, 0x5d, 0x74, 0x59, 0x25, 0xfd, 0x21, 0xd5, 0x0c, 0x03, - 0x18, 0x03,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xf9, 0x47, 0x8d, 0x58, 0x37, 0xee, 0xc4, 0x48, 0x6e, 0x55, 0x70, 0xa7, 0xb4, 0xe4, - 0x14, 0x6e, 0xae, 0x90, 0x42, 0x3c, 0xb0, 0xc2, 0x26, 0x79, 0x27, 0x77, 0xea, 0x24, 0xef, 0x94, - 0x1d, 0xa8, 0xfd, 0x2f, 0x78, 0xff, 0x41, 0xd3, 0x78, 0x0b, 0x7b, 0x5f, 0x6f, 0x54, 0xe5, 0xfa, - 0x46, 0x55, 0x7e, 0xde, 0xa8, 0xca, 0xa7, 0x5b, 0x35, 0x72, 0x7d, 0xab, 0x46, 0x7e, 0xdc, 0xaa, - 0x91, 0x57, 0x39, 0xc7, 0x65, 0xcd, 0xae, 0xad, 0xd7, 0xc8, 0x85, 0xd1, 0x72, 0x3d, 0xcc, 0xb3, - 0x1f, 0xd3, 0xfa, 0x6b, 0x83, 0x5d, 0xb5, 0x31, 0x35, 0x98, 0x6f, 0xcf, 0x8b, 0x75, 0xff, 0xe4, - 0x77, 0x00, 0x00, 0x00, 0xff, 0xff, 0xde, 0x13, 0xef, 0xcc, 0xb6, 0x06, 0x00, 0x00, + // 749 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x9c, 0x55, 0x4b, 0x6f, 0xda, 0x5a, + 0x10, 0xc6, 0x90, 0x07, 0x19, 0x92, 0x5c, 0x74, 0xc8, 0xbd, 0xe1, 0x72, 0x89, 0x2f, 0x75, 0x22, + 0x15, 0x45, 0xaa, 0xad, 0x50, 0x65, 0xd1, 0xec, 0xc2, 0xa3, 0x51, 0xd4, 0xe6, 0x21, 0x93, 0x2e, + 0xd2, 0x0d, 0xb2, 0xe1, 0x60, 0xac, 0x12, 0x1f, 0xe2, 0x73, 0xa0, 0x8e, 0xda, 0x6e, 0xaa, 0x4a, + 0xdd, 0x56, 0xea, 0x8f, 0x6a, 0x97, 0x91, 0xda, 0x45, 0x97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, + 0xa8, 0xa7, 0x86, 0x85, 0x05, 0x8d, 0x3e, 0x92, 0xa6, 0x7c, 0x91, 0x20, 0x35, 0xd6, 0x09, 0xed, + 0x10, 0x87, 0x62, 0xb4, 0x05, 0x31, 0xe6, 0x05, 0x7d, 0x24, 0x0a, 0x48, 0x1d, 0xd7, 0x55, 0x3d, + 0xf3, 0x74, 0x3f, 0x8c, 0xca, 0xb0, 0xcc, 0xbc, 0x9a, 0x2b, 0x92, 0x68, 0x3a, 0xca, 0xe1, 0x0f, + 0x86, 0x4d, 0x70, 0x2d, 0x47, 0xb2, 0x04, 0x52, 0x4f, 0xb0, 0x81, 0xed, 0x57, 0x99, 0x1c, 0x64, + 0xeb, 0xee, 0x41, 0x44, 0x99, 0xd1, 0x49, 0x4c, 0x40, 0x45, 0x97, 0x18, 0x8d, 0xba, 0x41, 0x99, + 0xcf, 0x14, 0x48, 0xfa, 0x2f, 0xc4, 0x99, 0x57, 0x33, 0xaf, 0x18, 0xf6, 0x87, 0x91, 0xf2, 0xcb, + 0xfa, 0x22, 0xf3, 0x8a, 0xbe, 0x8b, 0x76, 0x60, 0xee, 0x82, 0x34, 0x02, 0x51, 0x57, 0x0b, 0x1b, + 0xe1, 0x19, 0x07, 0xc5, 0x8e, 0x48, 0x03, 0xeb, 0x1c, 0xaa, 0x9c, 0x43, 0x6a, 0x8c, 0x43, 0x88, + 0x55, 0x84, 0xc4, 0x88, 0x0c, 0x9c, 0xe7, 0x5e, 0x2a, 0xc0, 0x50, 0x05, 0x65, 0x17, 0xfe, 0xaa, + 0xda, 0x17, 0xdd, 0xb6, 0xc1, 0xfa, 0x7b, 0x42, 0x0a, 0x44, 0x99, 0x27, 0xaa, 0x4d, 0x5b, 0x41, + 0x94, 0x79, 0xca, 0x07, 0x09, 0x92, 0xc3, 0x3c, 0xd1, 0xcf, 0x13, 0x88, 0x5b, 0x06, 0xad, 0xd9, + 0x4e, 0x93, 0x88, 0x74, 0x79, 0x46, 0x33, 0x07, 0x06, 0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0x94, + 0xd1, 0x26, 0x4e, 0x22, 0xd5, 0xde, 0xf8, 0xfb, 0x7d, 0x87, 0x7a, 0x90, 0x18, 0x79, 0x1d, 0x48, + 0x99, 0xf9, 0xa2, 0x86, 0xac, 0x9b, 0x77, 0x62, 0x04, 0xb7, 0xcc, 0xb9, 0xd3, 0x4a, 0x6a, 0x0a, + 0xb7, 0x3f, 0x21, 0x85, 0xc4, 0xc8, 0x09, 0x9b, 0xe4, 0x9d, 0xbc, 0xb4, 0x93, 0xbc, 0x53, 0x6e, + 0xa0, 0xf2, 0x1f, 0xe7, 0xfd, 0x1b, 0x4d, 0xe3, 0x2d, 0xee, 0x7d, 0xbd, 0x91, 0xa5, 0xeb, 0x1b, + 0x59, 0xfa, 0x79, 0x23, 0x4b, 0x9f, 0x6e, 0xe5, 0xc8, 0xf5, 0xad, 0x1c, 0xf9, 0x71, 0x2b, 0x47, + 0x5e, 0xe6, 0x2c, 0x9b, 0xb5, 0xba, 0xa6, 0x5a, 0x27, 0x17, 0x5a, 0xdb, 0x76, 0xb0, 0x9f, 0xfd, + 0x88, 0x36, 0x5e, 0x69, 0xec, 0xaa, 0x83, 0xa9, 0xc6, 0x3c, 0x73, 0x81, 0xff, 0x0b, 0x3c, 0xfe, + 0x1d, 0x00, 0x00, 0xff, 0xff, 0x99, 0xa2, 0x13, 0xbb, 0xcd, 0x06, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -788,7 +798,17 @@ func (m *GetTxsEventRequest) MarshalToSizedBuffer(dAtA []byte) (int, error) { i = encodeVarintService(dAtA, i, uint64(size)) } i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.Prove { + i-- + if m.Prove { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x10 } if len(m.Events) > 0 { for iNdEx := len(m.Events) - 1; iNdEx >= 0; iNdEx-- { @@ -1117,6 +1137,9 @@ func (m *GetTxsEventRequest) Size() (n int) { n += 1 + l + sovService(uint64(l)) } } + if m.Prove { + n += 2 + } if m.Pagination != nil { l = m.Pagination.Size() n += 1 + l + sovService(uint64(l)) @@ -1306,6 +1329,26 @@ func (m *GetTxsEventRequest) Unmarshal(dAtA []byte) error { m.Events = append(m.Events, string(dAtA[iNdEx:postIndex])) iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field Prove", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowService + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.Prove = bool(v != 0) + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Pagination", wireType) } diff --git a/types/tx/tx.pb.go b/types/tx/tx.pb.go index c49ec414a5..95298d2b2a 100644 --- a/types/tx/tx.pb.go +++ b/types/tx/tx.pb.go @@ -179,8 +179,6 @@ type SignDoc struct { // It prevents signed transactions from being used on another chain by an // attacker ChainId string `protobuf:"bytes,3,opt,name=chain_id,json=chainId,proto3" json:"chain_id,omitempty"` - // account_number is the account number of the account in state - AccountNumber uint64 `protobuf:"varint,4,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty"` } func (m *SignDoc) Reset() { *m = SignDoc{} } @@ -237,13 +235,6 @@ func (m *SignDoc) GetChainId() string { return "" } -func (m *SignDoc) GetAccountNumber() uint64 { - if m != nil { - return m.AccountNumber - } - return 0 -} - // TxBody is the body of a transaction that all signers sign over. type TxBody struct { // messages is a list of messages to be executed. The required signers of @@ -254,11 +245,14 @@ type TxBody struct { // is referred to as the primary signer and pays the fee for the whole // transaction. Messages []*types.Any `protobuf:"bytes,1,rep,name=messages,proto3" json:"messages,omitempty"` + // sig block height is available between current block height and current block height - `VALID_SIG_BLOCK_DURATION` + // this is used for distinguish signatures instead of account number. this is mandatory. + SigBlockHeight uint64 `protobuf:"varint,2,opt,name=sig_block_height,json=sigBlockHeight,proto3" json:"sig_block_height,omitempty"` // memo is any arbitrary memo to be added to the transaction - Memo string `protobuf:"bytes,2,opt,name=memo,proto3" json:"memo,omitempty"` + Memo string `protobuf:"bytes,3,opt,name=memo,proto3" json:"memo,omitempty"` // timeout is the block height after which this transaction will not // be processed by the chain - TimeoutHeight uint64 `protobuf:"varint,3,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` + TimeoutHeight uint64 `protobuf:"varint,4,opt,name=timeout_height,json=timeoutHeight,proto3" json:"timeout_height,omitempty"` // 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, the transaction will be rejected @@ -309,6 +303,13 @@ func (m *TxBody) GetMessages() []*types.Any { return nil } +func (m *TxBody) GetSigBlockHeight() uint64 { + if m != nil { + return m.SigBlockHeight + } + return 0 +} + func (m *TxBody) GetMemo() string { if m != nil { return m.Memo @@ -758,60 +759,60 @@ func init() { func init() { proto.RegisterFile("lfb/tx/v1beta1/tx.proto", fileDescriptor_3374cf1b0c1528d1) } var fileDescriptor_3374cf1b0c1528d1 = []byte{ - // 844 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcd, 0x8e, 0xdc, 0x44, - 0x10, 0x1e, 0xcf, 0xdf, 0xce, 0xd4, 0xfe, 0x04, 0x9a, 0x15, 0x4c, 0x66, 0x85, 0x77, 0x34, 0x10, - 0x34, 0x0a, 0x60, 0x93, 0x0d, 0x3f, 0x02, 0x09, 0xa4, 0x9d, 0x40, 0xb4, 0x11, 0x04, 0xa4, 0xde, - 0x3d, 0x85, 0x83, 0xd5, 0xf6, 0xf4, 0x78, 0x5a, 0xb1, 0xbb, 0x07, 0x77, 0x1b, 0xec, 0x27, 0x40, - 0xe2, 0x84, 0x10, 0xbc, 0x04, 0x17, 0x5e, 0x23, 0xc7, 0x70, 0xe3, 0x04, 0x68, 0xf7, 0x41, 0x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0xd7, 0xf9, 0xf1, 0xc2, 0x6d, 0x3d, 0xbe, 0x70, 0x5b, 0x7f, - 0x5c, 0xb8, 0xad, 0x07, 0x93, 0x8d, 0x39, 0xf9, 0xaa, 0x08, 0xfb, 0x66, 0x5a, 0x6f, 0xff, 0x1b, - 0x00, 0x00, 0xff, 0xff, 0x2f, 0x66, 0x99, 0x92, 0xc3, 0x06, 0x00, 0x00, + // 843 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6f, 0x1b, 0x45, + 0x14, 0xf7, 0xfa, 0x5f, 0xec, 0x97, 0x34, 0x2d, 0x43, 0x04, 0xae, 0x23, 0x36, 0x96, 0xa1, 0xc8, + 0x2a, 0xb0, 0x4b, 0x53, 0xfe, 0x08, 0x24, 0x90, 0xe2, 0x42, 0x95, 0x0a, 0x2a, 0xa4, 0x49, 0x4e, + 0xe5, 0xb0, 0x9a, 0x5d, 0x8f, 0xc7, 0xa3, 0xec, 0xce, 0x98, 0x9d, 0x59, 0xb0, 0x3f, 0x01, 0x12, + 0x27, 0x0e, 0x7c, 0x0a, 0x2e, 0x7c, 0x04, 0xae, 0x3d, 0x96, 0x1b, 0x27, 0x40, 0xc9, 0x07, 0x01, + 0xcd, 0xec, 0xec, 0x36, 0x44, 0x8d, 0xb9, 0x70, 0x9b, 0xf7, 0xe6, 0xf7, 0xfb, 0xbd, 0x37, 0xf3, + 0xfe, 0xc0, 0xab, 0xe9, 0x3c, 0x0e, 0xf5, 0x2a, 0xfc, 0xf6, 0x5e, 0x4c, 0x35, 0xb9, 0x17, 0xea, + 0x55, 0xb0, 0xcc, 0xa5, 0x96, 0x68, 0x37, 0x9d, 0xc7, 0x81, 0x5e, 0x05, 0xee, 0x62, 0xb8, 0xc7, + 0x24, 0x93, 0xf6, 0x2a, 0x34, 0xa7, 0x12, 0x35, 0xbc, 0x6b, 0xe8, 0x49, 0xbe, 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0x6a, 0xda, + 0x81, 0x96, 0x2a, 0xb2, 0xf1, 0x2f, 0x1e, 0xb4, 0x1e, 0x52, 0x8a, 0xbe, 0x86, 0x2e, 0xc9, 0x64, + 0x21, 0xb4, 0x6b, 0xa9, 0x72, 0x11, 0x9a, 0xe5, 0x7b, 0x29, 0x09, 0x2e, 0xa6, 0x6f, 0x3d, 0xfd, + 0xe3, 0xa0, 0xf1, 0xf3, 0x9f, 0x07, 0xaf, 0x33, 0xae, 0x17, 0x45, 0x1c, 0x24, 0x32, 0x0b, 0x53, + 0x2e, 0x68, 0x98, 0xce, 0xe3, 0x77, 0xd4, 0xec, 0x2c, 0xd4, 0xeb, 0x25, 0x55, 0x16, 0xab, 0xb0, + 0x93, 0x44, 0xfb, 0xd0, 0x67, 0x44, 0x45, 0x29, 0xcf, 0x78, 0x35, 0xbf, 0x3d, 0x46, 0xd4, 0x97, + 0xc6, 0x46, 0x7b, 0xd0, 0x59, 0x92, 0x35, 0xcd, 0xdd, 0xe8, 0x96, 0x06, 0x1a, 0xc0, 0x16, 0xcb, + 0x89, 0xd0, 0x34, 0xb7, 0x43, 0xdb, 0xc7, 0x95, 0x39, 0xfd, 0xf8, 0xe9, 0xb9, 0xef, 0x3d, 0x3b, + 0xf7, 0xbd, 0xbf, 0xce, 0x7d, 0xef, 0xc7, 0x0b, 0xbf, 0xf1, 0xec, 0xc2, 0x6f, 0xfc, 0x7e, 0xe1, + 0x37, 0x9e, 0x8c, 0x36, 0xe6, 0x14, 0xea, 0x55, 0xdc, 0xb5, 0xdd, 0x7a, 0xff, 0x9f, 0x00, 0x00, + 0x00, 0xff, 0xff, 0xda, 0x07, 0x57, 0x86, 0xc5, 0x06, 0x00, 0x00, } func (m *Tx) Marshal() (dAtA []byte, err error) { @@ -936,11 +937,6 @@ func (m *SignDoc) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l - if m.AccountNumber != 0 { - i = encodeVarintTx(dAtA, i, uint64(m.AccountNumber)) - i-- - dAtA[i] = 0x20 - } if len(m.ChainId) > 0 { i -= len(m.ChainId) copy(dAtA[i:], m.ChainId) @@ -1020,14 +1016,19 @@ func (m *TxBody) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.TimeoutHeight != 0 { i = encodeVarintTx(dAtA, i, uint64(m.TimeoutHeight)) i-- - dAtA[i] = 0x18 + dAtA[i] = 0x20 } if len(m.Memo) > 0 { i -= len(m.Memo) copy(dAtA[i:], m.Memo) i = encodeVarintTx(dAtA, i, uint64(len(m.Memo))) i-- - dAtA[i] = 0x12 + dAtA[i] = 0x1a + } + if m.SigBlockHeight != 0 { + i = encodeVarintTx(dAtA, i, uint64(m.SigBlockHeight)) + i-- + dAtA[i] = 0x10 } if len(m.Messages) > 0 { for iNdEx := len(m.Messages) - 1; iNdEx >= 0; iNdEx-- { @@ -1429,9 +1430,6 @@ func (m *SignDoc) Size() (n int) { if l > 0 { n += 1 + l + sovTx(uint64(l)) } - if m.AccountNumber != 0 { - n += 1 + sovTx(uint64(m.AccountNumber)) - } return n } @@ -1447,6 +1445,9 @@ func (m *TxBody) Size() (n int) { n += 1 + l + sovTx(uint64(l)) } } + if m.SigBlockHeight != 0 { + n += 1 + sovTx(uint64(m.SigBlockHeight)) + } l = len(m.Memo) if l > 0 { n += 1 + l + sovTx(uint64(l)) @@ -2040,25 +2041,6 @@ func (m *SignDoc) Unmarshal(dAtA []byte) error { } m.ChainId = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 4: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - m.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowTx - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } default: iNdEx = preIndex skippy, err := skipTx(dAtA[iNdEx:]) @@ -2144,6 +2126,25 @@ func (m *TxBody) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 2: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field SigBlockHeight", wireType) + } + m.SigBlockHeight = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowTx + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.SigBlockHeight |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } + case 3: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field Memo", wireType) } @@ -2175,7 +2176,7 @@ func (m *TxBody) Unmarshal(dAtA []byte) error { } m.Memo = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 3: + case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field TimeoutHeight", wireType) } diff --git a/types/tx/types.go b/types/tx/types.go index 4d6d718ae2..c6631c5e0f 100644 --- a/types/tx/types.go +++ b/types/tx/types.go @@ -147,6 +147,10 @@ func (t *Tx) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { return nil } +func (t *Tx) GetSigBlockHeight() uint64 { + return t.Body.SigBlockHeight +} + // UnpackInterfaces implements the UnpackInterfaceMessages.UnpackInterfaces method func (m *TxBody) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { for _, any := range m.Messages { diff --git a/types/tx_msg.go b/types/tx_msg.go index 646d17e5a8..def852d8ce 100644 --- a/types/tx_msg.go +++ b/types/tx_msg.go @@ -54,6 +54,9 @@ type ( // ValidateBasic does a simple and lightweight validation check that doesn't // require access to any other information. ValidateBasic() error + + // Gets the sig block height + GetSigBlockHeight() uint64 } // FeeTx defines the interface to be implemented by Tx to use the FeeDecorators diff --git a/x/auth/ante/ante.go b/x/auth/ante/ante.go index 4be8678cc1..98cc086e87 100644 --- a/x/auth/ante/ante.go +++ b/x/auth/ante/ante.go @@ -7,7 +7,7 @@ import ( ) // NewAnteHandler returns an AnteHandler that checks and increments sequence -// numbers, checks signatures & account numbers, and deducts fees from the first +// numbers, checks signatures & sig block height, and deducts fees from the first // signer. func NewAnteHandler( ak AccountKeeper, bankKeeper types.BankKeeper, @@ -19,11 +19,14 @@ func NewAnteHandler( NewRejectExtensionOptionsDecorator(), NewMempoolFeeDecorator(), NewValidateBasicDecorator(), + NewTxSigBlockHeightDecorator(ak), TxTimeoutHeightDecorator{}, NewValidateMemoDecorator(ak), NewConsumeGasForTxSizeDecorator(ak), NewRejectFeeGranterDecorator(), + // The above handlers should not call `GetAccount` or `GetSignerAcc` for signer NewSetPubKeyDecorator(ak), // SetPubKeyDecorator must be called before all signature verification decorators + // The handlers below may call `GetAccount` or `GetSignerAcc` for signer NewValidateSigCountDecorator(ak), NewDeductFeeDecorator(ak, bankKeeper), NewSigGasConsumeDecorator(ak, sigGasConsumer), diff --git a/x/auth/ante/ante_test.go b/x/auth/ante/ante_test.go index d0d30d4478..411c6727a8 100644 --- a/x/auth/ante/ante_test.go +++ b/x/auth/ante/ante_test.go @@ -36,7 +36,7 @@ func (suite *AnteTestSuite) TestSimulateGasCost() { gasLimit := testdata.NewTestGasLimit() accSeqs := []uint64{0, 0, 0} privs := []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv} - accNums := []uint64{0, 1, 2} + sbh := []uint64{0, 1, 1} testCases := []TestCase{ { @@ -69,7 +69,7 @@ func (suite *AnteTestSuite) TestSimulateGasCost() { suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, sbh, accSeqs, suite.ctx.ChainID(), tc) }) } } @@ -92,7 +92,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { // Variable data per test case var ( privs []cryptotypes.PrivKey - accNums []uint64 + sbh []uint64 accSeqs []uint64 ) @@ -100,11 +100,11 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { { "check no signatures fails", func() { - privs, accNums, accSeqs = []cryptotypes.PrivKey{}, []uint64{}, []uint64{} + privs, sbh, accSeqs = []cryptotypes.PrivKey{}, []uint64{}, []uint64{} // Create tx manually to test the tx's signers suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) - tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + tx, err := suite.CreateTestTx(privs, sbh, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) // tx.GetSigners returns addresses in correct order: addr1, addr2, addr3 expectedSigners := []sdk.AccAddress{addr0, addr1, addr2} @@ -117,7 +117,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { { "num sigs dont match GetSigners", func() { - privs, accNums, accSeqs = []cryptotypes.PrivKey{priv0}, []uint64{0}, []uint64{0} + privs, sbh, accSeqs = []cryptotypes.PrivKey{priv0}, []uint64{0}, []uint64{0} }, false, false, @@ -126,11 +126,11 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { { "unrecognized account", func() { - privs, accNums, accSeqs = []cryptotypes.PrivKey{priv0, priv1, priv2}, []uint64{0, 1, 2}, []uint64{0, 0, 0} + privs, sbh, accSeqs = []cryptotypes.PrivKey{priv0, priv1, priv2}, []uint64{0, 0, 0}, []uint64{0, 0, 0} }, false, false, - sdkerrors.ErrUnknownAddress, + sdkerrors.ErrInsufficientFunds, // unknown account may send tx, but he doesn't have enough balance to pay fee }, { "save the first account, but second is still unrecognized", @@ -141,8 +141,8 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { suite.Require().NoError(err) }, false, - false, - sdkerrors.ErrUnknownAddress, + true, + nil, // unknown account may send tx; now they have enough money to pay fee }, } @@ -151,14 +151,15 @@ func (suite *AnteTestSuite) TestAnteHandlerSigErrors() { suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, sbh, accSeqs, suite.ctx.ChainID(), tc) }) } } -// Test logic around account number checking with one signer and many signers. -func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { +// Test logic around sig block height checking with one signer and many signers. +func (suite *AnteTestSuite) TestAnteHandlerSigBlockHeight() { suite.SetupTest(false) // reset + suite.ctx = suite.ctx.WithBlockHeight(200) // init block height is 200 // Same data for every test cases accounts := suite.CreateTestAccounts(2) @@ -167,7 +168,7 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { // Variable data per test case var ( - accNums []uint64 + sbh []uint64 msgs []sdk.Msg privs []cryptotypes.PrivKey accSeqs []uint64 @@ -180,46 +181,46 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { msg := testdata.NewTestMsg(accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{100}, []uint64{0} }, false, true, nil, }, { - "new tx from wrong account number", + "new tx from wrong sig block height", func() { - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{1} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{1} }, false, false, - sdkerrors.ErrUnauthorized, + sdkerrors.ErrInvalidSigBlockHeight, }, { - "new tx from correct account number", + "new tx from correct sig block height", func() { - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{100}, []uint64{1} }, false, true, nil, }, { - "new tx with another signer and incorrect account numbers", + "new tx with another signer and incorrect sig block height", func() { msg1 := testdata.NewTestMsg(accounts[0].acc.GetAddress(), accounts[1].acc.GetAddress()) msg2 := testdata.NewTestMsg(accounts[1].acc.GetAddress(), accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg1, msg2} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 0}, []uint64{2, 0} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 0}, []uint64{2, 0} }, false, false, - sdkerrors.ErrUnauthorized, + sdkerrors.ErrInvalidSigBlockHeight, }, { - "new tx with correct account numbers", + "new tx with correct sig block height", func() { - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{2, 0} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{100, 101}, []uint64{2, 0} }, false, true, @@ -232,13 +233,13 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbers() { suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, suite.ctx.ChainID(), tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, sbh, accSeqs, suite.ctx.ChainID(), tc) }) } } -// Test logic around account number checking with many signers when BlockHeight is 0. -func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { +// Test logic around sig block height checking with many signers when BlockHeight is 0. +func (suite *AnteTestSuite) TestAnteHandlerSigBlockHeightAtBlockHeightZero() { suite.SetupTest(false) // setup suite.ctx = suite.ctx.WithBlockHeight(0) @@ -269,16 +270,16 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { nil, }, { - "new tx from wrong account number", + "new tx from wrong sig block height", func() { privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{1} }, false, false, - sdkerrors.ErrUnauthorized, + sdkerrors.ErrInvalidSigBlockHeight, }, { - "new tx from correct account number", + "new tx from correct sig block height", func() { privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{1} }, @@ -287,20 +288,20 @@ func (suite *AnteTestSuite) TestAnteHandlerAccountNumbersAtBlockHeightZero() { nil, }, { - "new tx with another signer and incorrect account numbers", + "new tx with another signer and incorrect sig block height", func() { msg1 := testdata.NewTestMsg(accounts[0].acc.GetAddress(), accounts[1].acc.GetAddress()) msg2 := testdata.NewTestMsg(accounts[1].acc.GetAddress(), accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg1, msg2} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 0}, []uint64{2, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 1}, []uint64{2, 0} }, false, false, - sdkerrors.ErrUnauthorized, + sdkerrors.ErrInvalidSigBlockHeight, }, { - "new tx with another signer and correct account numbers", + "new tx with another signer and correct sig block height", func() { // Note that accNums is [0,0] at block 0. privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 0}, []uint64{2, 0} @@ -376,7 +377,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { msg2 := testdata.NewTestMsg(accounts[2].acc.GetAddress(), accounts[0].acc.GetAddress()) msgs = []sdk.Msg{msg1, msg2} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{2, 0, 0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 0, 0}, []uint64{2, 0, 0} }, false, true, @@ -394,7 +395,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { func() { msg := testdata.NewTestMsg(accounts[1].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{1}, []uint64{0} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{0}, []uint64{0} }, false, false, @@ -415,7 +416,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSequences() { msg := testdata.NewTestMsg(accounts[0].acc.GetAddress(), accounts[1].acc.GetAddress()) msgs = []sdk.Msg{msg} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{3, 2} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 0}, []uint64{3, 2} }, false, true, @@ -600,13 +601,14 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { accSeqs []uint64 ) + // This test case is no longer meaningful because there is no account number any more. testCases := []TestCase{ { "signers in order", func() { msgs = []sdk.Msg{msg1, msg2, msg3} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{0, 0, 0} - suite.txBuilder.SetMemo("Check signers are in expected order and different account numbers works") + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{1, 1, 1}, []uint64{0, 0, 0} + suite.txBuilder.SetMemo("Check signers are in expected order works") }, false, true, @@ -616,7 +618,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { "change sequence numbers (only accounts 0 and 1 sign)", func() { msgs = []sdk.Msg{msg1} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{0, 1}, []uint64{1, 1} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv}, []uint64{1, 1}, []uint64{1, 1} }, false, true, @@ -626,7 +628,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { "change sequence numbers (only accounts 1 and 2 sign)", func() { msgs = []sdk.Msg{msg2} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[2].priv, accounts[0].priv}, []uint64{2, 0}, []uint64{1, 2} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[2].priv, accounts[0].priv}, []uint64{1, 1}, []uint64{1, 2} }, false, true, @@ -636,7 +638,7 @@ func (suite *AnteTestSuite) TestAnteHandlerMultiSigner() { "everyone signs again", func() { msgs = []sdk.Msg{msg1, msg2, msg3} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{0, 1, 2}, []uint64{3, 2, 2} + privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv, accounts[1].priv, accounts[2].priv}, []uint64{1, 1, 1}, []uint64{3, 2, 2} }, false, true, @@ -663,7 +665,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { // Variable data per test case var ( - accNums []uint64 + sbh []uint64 chainID string feeAmount sdk.Coins gasLimit uint64 @@ -680,7 +682,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { feeAmount = testdata.NewTestFeeAmount() gasLimit = testdata.NewTestGasLimit() msgs = []sdk.Msg{msg0} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, true, @@ -707,18 +709,19 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { sdkerrors.ErrWrongSequence, }, { - "test wrong accNums", + "test wrong sig block height", func() { accSeqs = []uint64{1} // Back to correct accSeqs - accNums = []uint64{1} + sbh = []uint64{2} }, false, false, - sdkerrors.ErrUnauthorized, + sdkerrors.ErrInvalidSigBlockHeight, }, { "test wrong msg", func() { + sbh = []uint64{0} // Back to correct sig block height msgs = []sdk.Msg{testdata.NewTestMsg(accounts[1].acc.GetAddress())} }, false, @@ -726,6 +729,8 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { sdkerrors.ErrInvalidPubKey, }, { + // This test case succeed and this is normal. Different gasLimit does not matter to sign. + // The failure of the past was due to invalid account number "test wrong fee gas", func() { msgs = []sdk.Msg{msg0} // Back to correct msgs @@ -733,26 +738,30 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { gasLimit = testdata.NewTestGasLimit() + 100 }, false, - false, - sdkerrors.ErrUnauthorized, + true, + nil, }, { + // This test case succeed and this is normal. Different feeAmount does not matter to sign. + // The failure of the past was due to invalid account number "test wrong fee amount", func() { + accSeqs = []uint64{2} feeAmount = testdata.NewTestFeeAmount() feeAmount[0].Amount = feeAmount[0].Amount.AddRaw(100) gasLimit = testdata.NewTestGasLimit() }, false, - false, - sdkerrors.ErrUnauthorized, + true, + nil, }, { "test wrong signer if public key exist", func() { + accSeqs = []uint64{3} feeAmount = testdata.NewTestFeeAmount() gasLimit = testdata.NewTestGasLimit() - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{0}, []uint64{1} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[1].priv}, []uint64{0}, []uint64{1} }, false, false, @@ -762,7 +771,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { "test wrong signer if public doesn't exist", func() { msgs = []sdk.Msg{testdata.NewTestMsg(accounts[1].acc.GetAddress())} - privs, accNums, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{1}, []uint64{0} + privs, sbh, accSeqs = []cryptotypes.PrivKey{accounts[0].priv}, []uint64{0}, []uint64{0} }, false, false, @@ -775,7 +784,7 @@ func (suite *AnteTestSuite) TestAnteHandlerBadSignBytes() { suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() tc.malleate() - suite.RunTestCase(privs, msgs, feeAmount, gasLimit, accNums, accSeqs, chainID, tc) + suite.RunTestCase(privs, msgs, feeAmount, gasLimit, sbh, accSeqs, chainID, tc) }) } } @@ -971,7 +980,7 @@ func (suite *AnteTestSuite) TestAnteHandlerSigLimitExceeded() { privs = append(privs, accounts[i].priv) } msgs := []sdk.Msg{testdata.NewTestMsg(addrs...)} - accNums, accSeqs := []uint64{0, 1, 2, 3, 4, 5, 6, 7}, []uint64{0, 0, 0, 0, 0, 0, 0, 0} + accNums, accSeqs := []uint64{0, 0, 0, 0, 0, 0, 0, 0}, []uint64{0, 0, 0, 0, 0, 0, 0, 0} feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() @@ -1091,9 +1100,9 @@ func (suite *AnteTestSuite) TestAnteHandlerReCheck() { name string params types.Params }{ - {"memo size check", types.NewParams(1, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1)}, - {"txsize check", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, 10000000, types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1)}, - {"sig verify cost check", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, types.DefaultSigVerifyCostED25519, 100000000)}, + {"memo size check", types.NewParams(1, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1, types.DefaultValidSigBlockPeriod)}, + {"txsize check", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, 10000000, types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1, types.DefaultValidSigBlockPeriod)}, + {"sig verify cost check", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, types.DefaultSigVerifyCostED25519, 100000000, types.DefaultValidSigBlockPeriod)}, } for _, tc := range testCases { // set testcase parameters diff --git a/x/auth/ante/basic.go b/x/auth/ante/basic.go index 05df8c9141..7a58299013 100644 --- a/x/auth/ante/basic.go +++ b/x/auth/ante/basic.go @@ -200,3 +200,32 @@ func (txh TxTimeoutHeightDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simul return next(ctx, tx, simulate) } + +type TxSigBlockHeightDecorator struct { + ak AccountKeeper +} + +func NewTxSigBlockHeightDecorator(ak AccountKeeper) TxSigBlockHeightDecorator { + return TxSigBlockHeightDecorator{ + ak: ak, + } +} + +func (txs TxSigBlockHeightDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bool, next sdk.AnteHandler) (sdk.Context, error) { + if !simulate { + params := txs.ak.GetParams(ctx) + sbh := tx.GetSigBlockHeight() + current := uint64(ctx.BlockHeight()) + validMin := uint64(0) + if current > params.ValidSigBlockPeriod { + validMin = current - params.ValidSigBlockPeriod + } + if sbh > uint64(ctx.BlockHeight()) || sbh < validMin { + return ctx, sdkerrors.Wrapf( + sdkerrors.ErrInvalidSigBlockHeight, "sig block height: %d, current: %d, valid sig block period: %d", + sbh, ctx.BlockHeight(), params.ValidSigBlockPeriod, + ) + } + } + return next(ctx, tx, simulate) +} diff --git a/x/auth/ante/expected_keepers.go b/x/auth/ante/expected_keepers.go index 0efa3da280..5aac54de13 100644 --- a/x/auth/ante/expected_keepers.go +++ b/x/auth/ante/expected_keepers.go @@ -8,6 +8,7 @@ import ( // AccountKeeper defines the contract needed for AccountKeeper related APIs. // Interface provides support to use non-sdk AccountKeeper for AnteHandler's decorators. type AccountKeeper interface { + NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) types.AccountI GetParams(ctx sdk.Context) (params types.Params) GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI SetAccount(ctx sdk.Context, acc types.AccountI) diff --git a/x/auth/ante/fee.go b/x/auth/ante/fee.go index c5e9089169..0ce927ac4d 100644 --- a/x/auth/ante/fee.go +++ b/x/auth/ante/fee.go @@ -81,11 +81,7 @@ func (dfd DeductFeeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate bo } feePayer := feeTx.FeePayer() - feePayerAcc := dfd.ak.GetAccount(ctx, feePayer) - - if feePayerAcc == nil { - return ctx, sdkerrors.Wrapf(sdkerrors.ErrUnknownAddress, "fee payer address: %s does not exist", feePayer) - } + feePayerAcc := dfd.ak.NewAccountWithAddress(ctx, feePayer) // deduct the fees if !feeTx.GetFee().IsZero() { diff --git a/x/auth/ante/sigverify.go b/x/auth/ante/sigverify.go index 6316d9c7fe..bb7e0fe827 100644 --- a/x/auth/ante/sigverify.go +++ b/x/auth/ante/sigverify.go @@ -79,8 +79,11 @@ func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate b acc, err := GetSignerAcc(ctx, spkd.ak, signers[i]) if err != nil { - return ctx, err + // At this point, the signer may not be in account keeper. + // So we make an account with address. + acc = spkd.ak.NewAccountWithAddress(ctx, signers[i]) } + // account already has pubkey set,no need to reset if acc.GetPubKey() != nil { continue @@ -89,7 +92,7 @@ func (spkd SetPubKeyDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simulate b if err != nil { return ctx, sdkerrors.Wrap(sdkerrors.ErrInvalidPubKey, err.Error()) } - spkd.ak.SetAccount(ctx, acc) + spkd.ak.SetAccount(ctx, acc) // After here, we can call `GetAccount` or `GetSignerAcc` from other ante handlers } return next(ctx, tx, simulate) @@ -123,7 +126,7 @@ func (sgcd SigGasConsumeDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simula return ctx, err } - // stdSigs contains the sequence number, account number, and signatures. + // stdSigs contains the sequence number, signatures. // When simulating, this would just be a 0-length slice. signerAddrs := sigTx.GetSigners() @@ -210,7 +213,7 @@ func (svd *SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu return ctx, sdkerrors.Wrap(sdkerrors.ErrTxDecode, "invalid transaction type") } - // stdSigs contains the sequence number, account number, and signatures. + // stdSigs contains the sequence number, signatures. // When simulating, this would just be a 0-length slice. sigs, err := sigTx.GetSignaturesV2() if err != nil { @@ -226,7 +229,7 @@ func (svd *SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu newSigKeys := make([]string, 0, len(sigs)) defer func() { - // remove txHashCash if got an error + // remove txHashCache if got an error if err != nil { for _, sigKey := range newSigKeys { svd.txHashCache.Delete(sigKey) @@ -269,18 +272,14 @@ func (svd *SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu // retrieve signer data genesis := ctx.BlockHeight() == 0 chainID := ctx.ChainID() - var accNum uint64 - if !genesis { - accNum = acc.GetAccountNumber() - } signerData := authsigning.SignerData{ - ChainID: chainID, - AccountNumber: accNum, - Sequence: acc.GetSequence(), + ChainID: chainID, + Sequence: acc.GetSequence(), } if !genesis { - sigKey := fmt.Sprintf("%d:%d", signerData.AccountNumber, signerData.Sequence) + sigKey := fmt.Sprintf("%s:%d:%d", acc.GetAddress().String(), + tx.GetSigBlockHeight(), signerData.Sequence) // TODO could we use `tx.(*wrapper).getBodyBytes()` instead of `ctx.TxBytes()`? txHash := sha256.Sum256(ctx.TxBytes()) stored := false @@ -299,9 +298,9 @@ func (svd *SigVerificationDecorator) AnteHandle(ctx sdk.Context, tx sdk.Tx, simu if onlyAminoSigners { // If all signers are using SIGN_MODE_LEGACY_AMINO, we rely on VerifySignature to check account sequence number, // and therefore communicate sequence number as a potential cause of error. - errMsg = fmt.Sprintf("signature verification failed; please verify account number (%d), sequence (%d) and chain-id (%s)", accNum, acc.GetSequence(), chainID) + errMsg = fmt.Sprintf("signature verification failed; please verify sequence (%d) and chain-id (%s)", acc.GetSequence(), chainID) } else { - errMsg = fmt.Sprintf("signature verification failed; please verify account number (%d) and chain-id (%s)", accNum, chainID) + errMsg = fmt.Sprintf("signature verification failed; please verify chain-id (%s)", chainID) } return ctx, sdkerrors.Wrap(sdkerrors.ErrUnauthorized, errMsg) } diff --git a/x/auth/ante/sigverify_test.go b/x/auth/ante/sigverify_test.go index 31ccb4fae3..bfa02f2273 100644 --- a/x/auth/ante/sigverify_test.go +++ b/x/auth/ante/sigverify_test.go @@ -35,7 +35,6 @@ func (suite *AnteTestSuite) TestSetPubKey() { // set accounts and create msg for each address for i, addr := range addrs { acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) - suite.Require().NoError(acc.SetAccountNumber(uint64(i))) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) msgs[i] = testdata.NewTestMsg(addr) } @@ -119,7 +118,7 @@ func (suite *AnteTestSuite) TestSigVerification() { suite.SetupTest(true) // setup suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() - // make block height non-zero to ensure account numbers part of signBytes + // make block height non-zero to ensure sig block height part suite.ctx = suite.ctx.WithBlockHeight(1) // keys and addresses @@ -133,7 +132,6 @@ func (suite *AnteTestSuite) TestSigVerification() { // set accounts and create msg for each address for i, addr := range addrs { acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) - suite.Require().NoError(acc.SetAccountNumber(uint64(i))) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) msgs[i] = testdata.NewTestMsg(addr) } @@ -143,12 +141,13 @@ func (suite *AnteTestSuite) TestSigVerification() { spkd := ante.NewSetPubKeyDecorator(suite.app.AccountKeeper) svd := ante.NewSigVerificationDecorator(suite.app.AccountKeeper, suite.clientCtx.TxConfig.SignModeHandler()) - antehandler := sdk.ChainAnteDecorators(spkd, svd) + sbhv := ante.NewTxSigBlockHeightDecorator(suite.app.AccountKeeper) + antehandler := sdk.ChainAnteDecorators(spkd, svd, sbhv) type testCase struct { name string privs []cryptotypes.PrivKey - accNums []uint64 + sbh []uint64 accSeqs []uint64 recheck bool shouldErr bool @@ -156,10 +155,10 @@ func (suite *AnteTestSuite) TestSigVerification() { testCases := []testCase{ {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, false, true}, {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, - {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, - {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, - {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, - {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, + {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{1, 1, 1}, []uint64{0, 0, 0}, false, true}, + {"wrong sig block height", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{2, 2, 2}, []uint64{0, 0, 0}, false, true}, + {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 1}, []uint64{3, 4, 5}, false, true}, + {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{1, 1, 1}, []uint64{0, 0, 0}, false, false}, {"no err on recheck", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, true, false}, } for i, tc := range testCases { @@ -170,7 +169,7 @@ func (suite *AnteTestSuite) TestSigVerification() { suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - tx, err := suite.CreateTestTx(tc.privs, tc.accNums, tc.accSeqs, suite.ctx.ChainID()) + tx, err := suite.CreateTestTx(tc.privs, tc.sbh, tc.accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) _, err = antehandler(suite.ctx, tx, false) @@ -204,7 +203,7 @@ func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { suite.txBuilder = suite.clientCtx.TxConfig.NewTxBuilder() - // make block height non-zero to ensure account numbers part of signBytes + // make block height non-zero to ensure sig block height suite.ctx = suite.ctx.WithBlockHeight(1) // keys and addresses @@ -218,7 +217,6 @@ func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { // set accounts and create msg for each address for i, addr := range addrs { acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) - suite.Require().NoError(acc.SetAccountNumber(uint64(i))) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) msgs[i] = testdata.NewTestMsg(addr) } @@ -228,7 +226,8 @@ func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { spkd := ante.NewSetPubKeyDecorator(suite.app.AccountKeeper) svd := ante.NewSigVerificationDecorator(suite.app.AccountKeeper, suite.clientCtx.TxConfig.SignModeHandler()) - antehandler := sdk.ChainAnteDecorators(spkd, svd) + sbhv := ante.NewTxSigBlockHeightDecorator(suite.app.AccountKeeper) + antehandler := sdk.ChainAnteDecorators(spkd, svd, sbhv) type testCase struct { name string @@ -241,10 +240,10 @@ func (suite *AnteTestSuite) TestSigVerification_ExplicitAmino() { testCases := []testCase{ {"no signers", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, false, true}, {"not enough signers", []cryptotypes.PrivKey{priv1, priv2}, []uint64{0, 1}, []uint64{0, 0}, false, true}, - {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{2, 1, 0}, []uint64{0, 0, 0}, false, true}, - {"wrong accnums", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, - {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{3, 4, 5}, false, true}, - {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 2}, []uint64{0, 0, 0}, false, false}, + {"wrong order signers", []cryptotypes.PrivKey{priv3, priv2, priv1}, []uint64{1, 1, 1}, []uint64{0, 0, 0}, false, true}, + {"wrong sig block height", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{7, 8, 9}, []uint64{0, 0, 0}, false, true}, + {"wrong sequences", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 1}, []uint64{3, 4, 5}, false, true}, + {"valid tx", []cryptotypes.PrivKey{priv1, priv2, priv3}, []uint64{0, 1, 1}, []uint64{0, 0, 0}, false, false}, {"no err on recheck", []cryptotypes.PrivKey{}, []uint64{}, []uint64{}, true, false}, } for i, tc := range testCases { @@ -302,7 +301,6 @@ func (suite *AnteTestSuite) runSigDecorators(params types.Params, _ bool, privs for i, priv := range privs { addr := sdk.AccAddress(priv.PubKey().Address()) acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) - suite.Require().NoError(acc.SetAccountNumber(uint64(i))) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) msgs[i] = testdata.NewTestMsg(addr) accNums[i] = uint64(i) @@ -337,20 +335,19 @@ func (suite *AnteTestSuite) TestIncrementSequenceDecorator() { priv, _, addr := testdata.KeyTestPubAddr() acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) - suite.Require().NoError(acc.SetAccountNumber(uint64(50))) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) msgs := []sdk.Msg{testdata.NewTestMsg(addr)} suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) privs := []cryptotypes.PrivKey{priv} - accNums := []uint64{suite.app.AccountKeeper.GetAccount(suite.ctx, addr).GetAccountNumber()} + sbh := []uint64{ 1 } accSeqs := []uint64{suite.app.AccountKeeper.GetAccount(suite.ctx, addr).GetSequence()} feeAmount := testdata.NewTestFeeAmount() gasLimit := testdata.NewTestGasLimit() suite.txBuilder.SetFeeAmount(feeAmount) suite.txBuilder.SetGasLimit(gasLimit) - tx, err := suite.CreateTestTx(privs, accNums, accSeqs, suite.ctx.ChainID()) + tx, err := suite.CreateTestTx(privs, sbh, accSeqs, suite.ctx.ChainID()) suite.Require().NoError(err) isd := ante.NewIncrementSequenceDecorator(suite.app.AccountKeeper) diff --git a/x/auth/ante/testutil_test.go b/x/auth/ante/testutil_test.go index 86cd68d8cf..6c59ce36e5 100644 --- a/x/auth/ante/testutil_test.go +++ b/x/auth/ante/testutil_test.go @@ -72,8 +72,6 @@ func (suite *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount { for i := 0; i < numAccs; i++ { priv, _, addr := testdata.KeyTestPubAddr() acc := suite.app.AccountKeeper.NewAccountWithAddress(suite.ctx, addr) - err := acc.SetAccountNumber(uint64(i)) - suite.Require().NoError(err) suite.app.AccountKeeper.SetAccount(suite.ctx, acc) suite.app.BankKeeper.SetBalances(suite.ctx, addr, sdk.Coins{ sdk.NewInt64Coin("atom", 10000000), @@ -86,11 +84,12 @@ func (suite *AnteTestSuite) CreateTestAccounts(numAccs int) []TestAccount { } // CreateTestTx is a helper function to create a tx given multiple inputs. -func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { +func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, sbh []uint64, accSeqs []uint64, chainID string) (xauthsigning.Tx, error) { // First round: we gather all the signer infos. We use the "set empty // signature" hack to do that. var sigsV2 []signing.SignatureV2 for i, priv := range privs { + suite.txBuilder.SetSigBlockHeight(sbh[i]) sigV2 := signing.SignatureV2{ PubKey: priv.PubKey(), Data: &signing.SingleSignatureData{ @@ -111,9 +110,8 @@ func (suite *AnteTestSuite) CreateTestTx(privs []cryptotypes.PrivKey, accNums [] sigsV2 = []signing.SignatureV2{} for i, priv := range privs { signerData := xauthsigning.SignerData{ - ChainID: chainID, - AccountNumber: accNums[i], - Sequence: accSeqs[i], + ChainID: chainID, + Sequence: accSeqs[i], } sigV2, err := tx.SignWithPrivKey( suite.clientCtx.TxConfig.SignModeHandler().DefaultMode(), signerData, @@ -142,7 +140,7 @@ type TestCase struct { } // CreateTestTx is a helper function to create a tx given multiple inputs. -func (suite *AnteTestSuite) RunTestCase(privs []cryptotypes.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, gasLimit uint64, accNums, accSeqs []uint64, chainID string, tc TestCase) { +func (suite *AnteTestSuite) RunTestCase(privs []cryptotypes.PrivKey, msgs []sdk.Msg, feeAmount sdk.Coins, gasLimit uint64, sbh, accSeqs []uint64, chainID string, tc TestCase) { suite.Run(fmt.Sprintf("Case %s", tc.desc), func() { suite.Require().NoError(suite.txBuilder.SetMsgs(msgs...)) suite.txBuilder.SetFeeAmount(feeAmount) @@ -151,7 +149,7 @@ func (suite *AnteTestSuite) RunTestCase(privs []cryptotypes.PrivKey, msgs []sdk. // Theoretically speaking, ante handler unit tests should only test // ante handlers, but here we sometimes also test the tx creation // process. - tx, txErr := suite.CreateTestTx(privs, accNums, accSeqs, chainID) + tx, txErr := suite.CreateTestTx(privs, sbh, accSeqs, chainID) newCtx, anteErr := suite.anteHandler(suite.ctx, tx, tc.simulate) if tc.expPass { diff --git a/x/auth/client/cli/cli_test.go b/x/auth/client/cli/cli_test.go index fd7ec43f19..3f4bb17faa 100644 --- a/x/auth/client/cli/cli_test.go +++ b/x/auth/client/cli/cli_test.go @@ -110,7 +110,7 @@ func (s *IntegrationTestSuite) TestCLISignBatch() { // sign-batch file - offline is set but account-number and sequence are not res, err := authtest.TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--offline") - s.Require().EqualError(err, "required flag(s) \"account-number\", \"sequence\" not set") + s.Require().EqualError(err, "required flag(s) \"sequence\" not set") // sign-batch file res, err = authtest.TxSignBatchExec(val.ClientCtx, val.Address, outputFile.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID)) @@ -414,11 +414,11 @@ func (s *IntegrationTestSuite) TestCLISendGenerateSignAndBroadcast() { // Does not work in offline mode res, err = authtest.TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), "--offline") - s.Require().EqualError(err, "required flag(s) \"account-number\", \"sequence\" not set") + s.Require().EqualError(err, "required flag(s) \"sequence\" not set") - // But works offline if we set account number and sequence + // But works offline if we set sequence val1.ClientCtx.HomeDir = strings.Replace(val1.ClientCtx.HomeDir, "simd", "simcli", 1) - res, err = authtest.TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), "--offline", "--account-number", "1", "--sequence", "1") + res, err = authtest.TxSignExec(val1.ClientCtx, val1.Address, unsignedTxFile.Name(), "--offline", "--sequence", "1", "--sig-block-height", "1") s.Require().NoError(err) // Sign transaction @@ -737,9 +737,9 @@ func (s *IntegrationTestSuite) TestCLIMultisign() { sign2File := testutil.WriteToNewTempFile(s.T(), account2Signature.String()) - // Does not work in offline mode. + // Offline mode requires --sequence flag _, err = authtest.TxMultiSignExec(val1.ClientCtx, multisigInfo.GetName(), multiGeneratedTxFile.Name(), "--offline", sign1File.Name(), sign2File.Name()) - s.Require().EqualError(err, "couldn't verify signature: unable to verify single signer signature") + s.Require().EqualError(err, "required flag(s) \"sequence\" not set") val1.ClientCtx.Offline = false multiSigWith2Signatures, err := authtest.TxMultiSignExec(val1.ClientCtx, multisigInfo.GetName(), multiGeneratedTxFile.Name(), sign1File.Name(), sign2File.Name()) @@ -868,14 +868,14 @@ func (s *IntegrationTestSuite) TestMultisignBatch() { s.Require().NoError(val.ClientCtx.JSONMarshaler.UnmarshalInterfaceJSON(queryResJSON.Bytes(), &account)) // sign-batch file - res, err := authtest.TxSignBatchExec(val.ClientCtx, account1.GetAddress(), filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", multisigInfo.GetAddress().String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, fmt.Sprint(account.GetAccountNumber())), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence()))) + res, err := authtest.TxSignBatchExec(val.ClientCtx, account1.GetAddress(), filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", multisigInfo.GetAddress().String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence()))) s.Require().NoError(err) s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) // write sigs to file file1 := testutil.WriteToNewTempFile(s.T(), res.String()) // sign-batch file with account2 - res, err = authtest.TxSignBatchExec(val.ClientCtx, account2.GetAddress(), filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", multisigInfo.GetAddress().String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagAccountNumber, fmt.Sprint(account.GetAccountNumber())), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence()))) + res, err = authtest.TxSignBatchExec(val.ClientCtx, account2.GetAddress(), filename.Name(), fmt.Sprintf("--%s=%s", flags.FlagChainID, val.ClientCtx.ChainID), "--multisig", multisigInfo.GetAddress().String(), fmt.Sprintf("--%s", flags.FlagOffline), fmt.Sprintf("--%s=%s", flags.FlagSequence, fmt.Sprint(account.GetSequence()))) s.Require().NoError(err) s.Require().Equal(3, len(strings.Split(strings.Trim(res.String(), "\n"), "\n"))) @@ -1109,11 +1109,11 @@ func (s *IntegrationTestSuite) TestSignWithMultiSigners_AminoJSON() { signedByVal0File := testutil.WriteToNewTempFile(s.T(), signedByVal0.String()) // Then let val1 sign the file with signedByVal0. - val1AccNum, val1Seq, err := val0.ClientCtx.AccountRetriever.GetAccountNumberSequence(val0.ClientCtx, val1.Address) + val1Seq, err := val0.ClientCtx.AccountRetriever.GetAccountSequence(val0.ClientCtx, val1.Address) require.NoError(err) signedTx, err := authtest.TxSignExec( val1.ClientCtx, val1.Address, signedByVal0File.Name(), - "--offline", fmt.Sprintf("--account-number=%d", val1AccNum), fmt.Sprintf("--sequence=%d", val1Seq), + "--offline", fmt.Sprintf("--sequence=%d", val1Seq), ) require.NoError(err) signedTxFile := testutil.WriteToNewTempFile(s.T(), signedTx.String()) diff --git a/x/auth/client/cli/tx_multisign.go b/x/auth/client/cli/tx_multisign.go index 6078d50b85..fd4252b504 100644 --- a/x/auth/client/cli/tx_multisign.go +++ b/x/auth/client/cli/tx_multisign.go @@ -50,8 +50,9 @@ The SIGN_MODE_DIRECT sign mode is not supported.' version.AppName, ), ), - RunE: makeMultiSignCmd(), - Args: cobra.MinimumNArgs(3), + PreRun: preMultisignCmd, + RunE: makeMultiSignCmd(), + Args: cobra.MinimumNArgs(3), } cmd.Flags().Bool(flagSigOnly, false, "Print only the generated signature, then exit") @@ -63,6 +64,13 @@ The SIGN_MODE_DIRECT sign mode is not supported.' return cmd } +func preMultisignCmd(cmd *cobra.Command, _ []string) { + // Conditionally mark the account sequence required as no RPC query will be done. + if offline, _ := cmd.Flags().GetBool(flags.FlagOffline); offline { + cmd.MarkFlagRequired(flags.FlagSequence) + } +} + func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { return func(cmd *cobra.Command, args []string) (err error) { clientCtx, err := client.GetClientTxContext(cmd) @@ -93,12 +101,12 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { multisigPub := multisigInfo.GetPubKey().(*kmultisig.LegacyAminoPubKey) multisigSig := multisig.NewMultisig(len(multisigPub.PubKeys)) if !clientCtx.Offline { - accnum, seq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, multisigInfo.GetAddress()) + seq, err := clientCtx.AccountRetriever.GetAccountSequence(clientCtx, multisigInfo.GetAddress()) if err != nil { return err } - txFactory = txFactory.WithAccountNumber(accnum).WithSequence(seq) + txFactory = txFactory.WithSigBlockHeight(uint64(clientCtx.Height)).WithSequence(seq) } // read each signature and add it to the multisig if valid @@ -109,9 +117,8 @@ func makeMultiSignCmd() func(cmd *cobra.Command, args []string) (err error) { } signingData := signing.SignerData{ - ChainID: txFactory.ChainID(), - AccountNumber: txFactory.AccountNumber(), - Sequence: txFactory.Sequence(), + ChainID: txFactory.ChainID(), + Sequence: txFactory.Sequence(), } for _, sig := range sigs { @@ -267,12 +274,12 @@ func makeBatchMultisignCmd() func(cmd *cobra.Command, args []string) error { } if !clientCtx.Offline { - accnum, seq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, multisigInfo.GetAddress()) + seq, err := clientCtx.AccountRetriever.GetAccountSequence(clientCtx, multisigInfo.GetAddress()) if err != nil { return err } - txFactory = txFactory.WithAccountNumber(accnum).WithSequence(seq) + txFactory = txFactory.WithSequence(seq) } for i := 0; scanner.Scan(); i++ { @@ -284,9 +291,8 @@ func makeBatchMultisignCmd() func(cmd *cobra.Command, args []string) error { multisigPub := multisigInfo.GetPubKey().(*kmultisig.LegacyAminoPubKey) multisigSig := multisig.NewMultisig(len(multisigPub.PubKeys)) signingData := signing.SignerData{ - ChainID: txFactory.ChainID(), - AccountNumber: txFactory.AccountNumber(), - Sequence: txFactory.Sequence(), + ChainID: txFactory.ChainID(), + Sequence: txFactory.Sequence(), } for _, sig := range signatureBatch { diff --git a/x/auth/client/cli/tx_sign.go b/x/auth/client/cli/tx_sign.go index 77425aaaba..66029022a7 100644 --- a/x/auth/client/cli/tx_sign.go +++ b/x/auth/client/cli/tx_sign.go @@ -195,10 +195,8 @@ be generated via the 'multisign' command. } func preSignCmd(cmd *cobra.Command, _ []string) { - // Conditionally mark the account and sequence numbers required as no RPC - // query will be done. + // Conditionally mark the account sequence required as no RPC query will be done. if offline, _ := cmd.Flags().GetBool(flags.FlagOffline); offline { - cmd.MarkFlagRequired(flags.FlagAccountNumber) cmd.MarkFlagRequired(flags.FlagSequence) } } diff --git a/x/auth/client/cli/validate_sigs.go b/x/auth/client/cli/validate_sigs.go index bc935e8bae..e1156c2cfe 100644 --- a/x/auth/client/cli/validate_sigs.go +++ b/x/auth/client/cli/validate_sigs.go @@ -99,16 +99,15 @@ func printAndValidateSigs( // Validate the actual signature over the transaction bytes since we can // reach out to a full node to query accounts. if !offline && success { - accNum, accSeq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, sigAddr) + accSeq, err := clientCtx.AccountRetriever.GetAccountSequence(clientCtx, sigAddr) if err != nil { cmd.Printf("failed to get account: %s\n", sigAddr) return false } signingData := authsigning.SignerData{ - ChainID: chainID, - AccountNumber: accNum, - Sequence: accSeq, + ChainID: chainID, + Sequence: accSeq, } err = authsigning.VerifySignature(pubKey, signingData, sig.Data, signModeHandler, sigTx) if err != nil { diff --git a/x/auth/client/rest/rest_test.go b/x/auth/client/rest/rest_test.go index ad1f742d44..9b39aa2cb0 100644 --- a/x/auth/client/rest/rest_test.go +++ b/x/auth/client/rest/rest_test.go @@ -364,7 +364,7 @@ func (s *IntegrationTestSuite) TestMultipleSyncBroadcastTxRequests() { } } -func (s *IntegrationTestSuite) createTestStdTx(val *network.Validator, accNum, sequence uint64) legacytx.StdTx { +func (s *IntegrationTestSuite) createTestStdTx(val *network.Validator, sbh, sequence uint64) legacytx.StdTx { txConfig := legacytx.StdTxConfig{Cdc: s.cfg.LegacyAmino} msg := &types.MsgSend{ @@ -388,7 +388,7 @@ func (s *IntegrationTestSuite) createTestStdTx(val *network.Validator, accNum, s WithKeybase(val.ClientCtx.Keyring). WithTxConfig(txConfig). WithSignMode(signing.SignMode_SIGN_MODE_LEGACY_AMINO_JSON). - WithAccountNumber(accNum). + WithSigBlockHeight(sbh). WithSequence(sequence) // sign Tx (offline mode so we can manually set sequence number) @@ -615,9 +615,9 @@ func (s *IntegrationTestSuite) TestLegacyMultisig() { sign2File := testutil.WriteToNewTempFile(s.T(), account2Signature.String()) - // Does not work in offline mode. + // Offline mode requires --sequence flag. _, err = authtest.TxMultiSignExec(val1.ClientCtx, multisigInfo.GetName(), multiGeneratedTxFile.Name(), "--offline", sign1File.Name(), sign2File.Name()) - s.Require().EqualError(err, fmt.Sprintf("couldn't verify signature: unable to verify single signer signature")) + s.Require().EqualError(err, fmt.Sprintf("required flag(s) \"sequence\" not set")) val1.ClientCtx.Offline = false multiSigWith2Signatures, err := authtest.TxMultiSignExec(val1.ClientCtx, multisigInfo.GetName(), multiGeneratedTxFile.Name(), sign1File.Name(), sign2File.Name()) diff --git a/x/auth/client/tx.go b/x/auth/client/tx.go index a334b61b06..37cb889901 100644 --- a/x/auth/client/tx.go +++ b/x/auth/client/tx.go @@ -143,12 +143,12 @@ func populateAccountFromState( txBldr tx.Factory, clientCtx client.Context, addr sdk.AccAddress, ) (tx.Factory, error) { - num, seq, err := clientCtx.AccountRetriever.GetAccountNumberSequence(clientCtx, addr) + seq, err := clientCtx.AccountRetriever.GetAccountSequence(clientCtx, addr) if err != nil { return txBldr, err } - return txBldr.WithAccountNumber(num).WithSequence(seq), nil + return txBldr.WithSequence(seq), nil } // GetTxEncoder return tx encoder from global sdk configuration if ones is defined. diff --git a/x/auth/client/tx_test.go b/x/auth/client/tx_test.go index 17f657e8d6..afb3ffd88b 100644 --- a/x/auth/client/tx_test.go +++ b/x/auth/client/tx_test.go @@ -139,7 +139,7 @@ func TestBatchScanner_Scan(t *testing.T) { func compareEncoders(t *testing.T, expected sdk.TxEncoder, actual sdk.TxEncoder) { msgs := []sdk.Msg{testdata.NewTestMsg(addr)} - tx := legacytx.NewStdTx(msgs, legacytx.StdFee{}, []legacytx.StdSignature{}, "") + tx := legacytx.NewStdTx(msgs, legacytx.StdFee{}, []legacytx.StdSignature{}, 0, "") defaultEncoderBytes, err := expected(tx) require.NoError(t, err) diff --git a/x/auth/genesis.go b/x/auth/genesis.go index 7281ffd4b9..084ec5ae2f 100644 --- a/x/auth/genesis.go +++ b/x/auth/genesis.go @@ -20,8 +20,7 @@ func InitGenesis(ctx sdk.Context, ak keeper.AccountKeeper, data types.GenesisSta accounts = types.SanitizeGenesisAccounts(accounts) for _, a := range accounts { - acc := ak.NewAccount(ctx, a) - ak.SetAccount(ctx, acc) + ak.SetAccount(ctx, a) } ak.GetModuleAccount(ctx, types.FeeCollectorName) diff --git a/x/auth/keeper/account.go b/x/auth/keeper/account.go index c933a62144..98fa4ebb29 100644 --- a/x/auth/keeper/account.go +++ b/x/auth/keeper/account.go @@ -13,15 +13,6 @@ func (ak AccountKeeper) NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddre panic(err) } - return ak.NewAccount(ctx, acc) -} - -// NewAccount sets the next account number to a given account interface -func (ak AccountKeeper) NewAccount(ctx sdk.Context, acc types.AccountI) types.AccountI { - if err := acc.SetAccountNumber(ak.GetNextAccountNumber(ctx)); err != nil { - panic(err) - } - return acc } diff --git a/x/auth/keeper/keeper.go b/x/auth/keeper/keeper.go index 96a7544661..d0c7f2aa5b 100644 --- a/x/auth/keeper/keeper.go +++ b/x/auth/keeper/keeper.go @@ -3,7 +3,6 @@ package keeper import ( "fmt" - gogotypes "github.com/gogo/protobuf/types" "github.com/line/ostracon/libs/log" "github.com/line/lfb-sdk/codec" @@ -16,12 +15,9 @@ import ( // AccountKeeperI is the interface contract that x/auth's keeper implements. type AccountKeeperI interface { - // Return a new account with the next account number and the specified address. Does not save the new account to the store. + // Return a new account with the specified address. Does not save the new account to the store. NewAccountWithAddress(sdk.Context, sdk.AccAddress) types.AccountI - // Return a new account with the next account number. Does not save the new account to the store. - NewAccount(sdk.Context, types.AccountI) types.AccountI - // Retrieve an account from the store. GetAccount(sdk.Context, sdk.AccAddress) types.AccountI @@ -39,9 +35,6 @@ type AccountKeeperI interface { // Fetch the sequence of an account at a specified address. GetSequence(sdk.Context, sdk.AccAddress) (uint64, error) - - // Fetch the next account number, and increment the internal counter. - GetNextAccountNumber(sdk.Context) uint64 } // AccountKeeper encodes/decodes accounts using the go-amino (binary) @@ -109,33 +102,6 @@ func (ak AccountKeeper) GetSequence(ctx sdk.Context, addr sdk.AccAddress) (uint6 return acc.GetSequence(), nil } -// GetNextAccountNumber returns and increments the global account number counter. -// If the global account number is not set, it initializes it with value 0. -func (ak AccountKeeper) GetNextAccountNumber(ctx sdk.Context) uint64 { - var accNumber uint64 - store := ctx.KVStore(ak.key) - - bz := store.Get(types.GlobalAccountNumberKey) - if bz == nil { - // initialize the account numbers - accNumber = 0 - } else { - val := gogotypes.UInt64Value{} - - err := ak.cdc.UnmarshalBinaryBare(bz, &val) - if err != nil { - panic(err) - } - - accNumber = val.GetValue() - } - - bz = ak.cdc.MustMarshalBinaryBare(&gogotypes.UInt64Value{Value: accNumber + 1}) - store.Set(types.GlobalAccountNumberKey, bz) - - return accNumber -} - // ValidatePermissions validates that the module account has been granted // permissions within its set of allowed permissions. func (ak AccountKeeper) ValidatePermissions(macc types.ModuleAccountI) error { @@ -188,10 +154,9 @@ func (ak AccountKeeper) GetModuleAccountAndPermissions(ctx sdk.Context, moduleNa // create a new module account macc := types.NewEmptyModuleAccount(moduleName, perms...) - maccI := (ak.NewAccount(ctx, macc)).(types.ModuleAccountI) // set the account number - ak.SetModuleAccount(ctx, maccI) + ak.SetModuleAccount(ctx, macc) - return maccI, perms + return macc, perms } // GetModuleAccount gets the module account from the auth account store, if the account does not diff --git a/x/auth/legacy/legacytx/amino_signing.go b/x/auth/legacy/legacytx/amino_signing.go index 5fa13e2ec6..ac9be37c3d 100644 --- a/x/auth/legacy/legacytx/amino_signing.go +++ b/x/auth/legacy/legacytx/amino_signing.go @@ -43,7 +43,7 @@ func (stdTxSignModeHandler) GetSignBytes(mode signingtypes.SignMode, data signin } return StdSignBytes( - data.ChainID, data.AccountNumber, data.Sequence, stdTx.GetTimeoutHeight(), StdFee{Amount: stdTx.GetFee(), Gas: stdTx.GetGas()}, tx.GetMsgs(), stdTx.GetMemo(), + data.ChainID, stdTx.GetSigBlockHeight(), data.Sequence, stdTx.GetTimeoutHeight(), StdFee{Amount: stdTx.GetFee(), Gas: stdTx.GetGas()}, tx.GetMsgs(), stdTx.GetMemo(), ), nil } diff --git a/x/auth/legacy/legacytx/amino_signing_test.go b/x/auth/legacy/legacytx/amino_signing_test.go index fa2c6e63ba..5ab4543f2a 100644 --- a/x/auth/legacy/legacytx/amino_signing_test.go +++ b/x/auth/legacy/legacytx/amino_signing_test.go @@ -31,29 +31,29 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { var ( chainId = "test-chain" - accNum uint64 = 7 + sbh uint64 = 7 seqNum uint64 = 7 timeoutHeight uint64 = 10 ) tx := StdTx{ - Msgs: msgs, - Fee: fee, - Signatures: nil, - Memo: memo, - TimeoutHeight: timeoutHeight, + Msgs: msgs, + Fee: fee, + Signatures: nil, + Memo: memo, + SigBlockHeight: sbh, + TimeoutHeight: timeoutHeight, } handler := stdTxSignModeHandler{} signingData := signing.SignerData{ - ChainID: chainId, - AccountNumber: accNum, - Sequence: seqNum, + ChainID: chainId, + Sequence: seqNum, } signBz, err := handler.GetSignBytes(signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signingData, tx) require.NoError(t, err) - expectedSignBz := StdSignBytes(chainId, accNum, seqNum, timeoutHeight, fee, msgs, memo) + expectedSignBz := StdSignBytes(chainId, sbh, seqNum, timeoutHeight, fee, msgs, memo) require.Equal(t, expectedSignBz, signBz) diff --git a/x/auth/legacy/legacytx/stdsign.go b/x/auth/legacy/legacytx/stdsign.go index 35c3c09d30..f3281ed069 100644 --- a/x/auth/legacy/legacytx/stdsign.go +++ b/x/auth/legacy/legacytx/stdsign.go @@ -18,30 +18,30 @@ import ( // and the Sequence numbers for each signature (prevent // inchain replay and enforce tx ordering per account). type StdSignDoc struct { - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - TimeoutHeight uint64 `json:"timeout_height,omitempty" yaml:"timeout_height"` - ChainID string `json:"chain_id" yaml:"chain_id"` - Memo string `json:"memo" yaml:"memo"` - Fee json.RawMessage `json:"fee" yaml:"fee"` - Msgs []json.RawMessage `json:"msgs" yaml:"msgs"` + SigBlockHeight uint64 `json:"sig_block_height" yaml:"sig_block_height"` + Sequence uint64 `json:"sequence" yaml:"sequence"` + TimeoutHeight uint64 `json:"timeout_height,omitempty" yaml:"timeout_height"` + ChainID string `json:"chain_id" yaml:"chain_id"` + Memo string `json:"memo" yaml:"memo"` + Fee json.RawMessage `json:"fee" yaml:"fee"` + Msgs []json.RawMessage `json:"msgs" yaml:"msgs"` } // StdSignBytes returns the bytes to sign for a transaction. -func StdSignBytes(chainID string, accnum, sequence, timeout uint64, fee StdFee, msgs []sdk.Msg, memo string) []byte { +func StdSignBytes(chainID string, sbh, sequence, timeout uint64, fee StdFee, msgs []sdk.Msg, memo string) []byte { msgsBytes := make([]json.RawMessage, 0, len(msgs)) for _, msg := range msgs { msgsBytes = append(msgsBytes, json.RawMessage(msg.GetSignBytes())) } bz, err := legacy.Cdc.MarshalJSON(StdSignDoc{ - AccountNumber: accnum, - ChainID: chainID, - Fee: json.RawMessage(fee.Bytes()), - Memo: memo, - Msgs: msgsBytes, - Sequence: sequence, - TimeoutHeight: timeout, + SigBlockHeight: sbh, + ChainID: chainID, + Fee: json.RawMessage(fee.Bytes()), + Memo: memo, + Msgs: msgsBytes, + Sequence: sequence, + TimeoutHeight: timeout, }) if err != nil { panic(err) diff --git a/x/auth/legacy/legacytx/stdsignmsg.go b/x/auth/legacy/legacytx/stdsignmsg.go index 2cd8bceaf7..43a7dcbf41 100644 --- a/x/auth/legacy/legacytx/stdsignmsg.go +++ b/x/auth/legacy/legacytx/stdsignmsg.go @@ -10,18 +10,18 @@ var _ types.UnpackInterfacesMessage = StdSignMsg{} // StdSignMsg is a convenience structure for passing along a Msg with the other // requirements for a StdSignDoc before it is signed. For use in the CLI. type StdSignMsg struct { - ChainID string `json:"chain_id" yaml:"chain_id"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - TimeoutHeight uint64 `json:"timeout_height" yaml:"timeout_height"` - Fee StdFee `json:"fee" yaml:"fee"` - Msgs []sdk.Msg `json:"msgs" yaml:"msgs"` - Memo string `json:"memo" yaml:"memo"` + ChainID string `json:"chain_id" yaml:"chain_id"` + SigBlockHeight uint64 `json:"sign_block_height" yaml:"sign_block_height"` + Sequence uint64 `json:"sequence" yaml:"sequence"` + TimeoutHeight uint64 `json:"timeout_height" yaml:"timeout_height"` + Fee StdFee `json:"fee" yaml:"fee"` + Msgs []sdk.Msg `json:"msgs" yaml:"msgs"` + Memo string `json:"memo" yaml:"memo"` } // get message bytes func (msg StdSignMsg) Bytes() []byte { - return StdSignBytes(msg.ChainID, msg.AccountNumber, msg.Sequence, msg.TimeoutHeight, msg.Fee, msg.Msgs, msg.Memo) + return StdSignBytes(msg.ChainID, msg.SigBlockHeight, msg.Sequence, msg.TimeoutHeight, msg.Fee, msg.Msgs, msg.Memo) } func (msg StdSignMsg) UnpackInterfaces(unpacker types.AnyUnpacker) error { diff --git a/x/auth/legacy/legacytx/stdtx.go b/x/auth/legacy/legacytx/stdtx.go index a7916b1bc3..f8b959cb05 100644 --- a/x/auth/legacy/legacytx/stdtx.go +++ b/x/auth/legacy/legacytx/stdtx.go @@ -128,20 +128,22 @@ func (ss StdSignature) UnpackInterfaces(unpacker codectypes.AnyUnpacker) error { // NOTE: the first signature is the fee payer (Signatures must not be nil). // Deprecated type StdTx struct { - Msgs []sdk.Msg `json:"msg" yaml:"msg"` - Fee StdFee `json:"fee" yaml:"fee"` - Signatures []StdSignature `json:"signatures" yaml:"signatures"` - Memo string `json:"memo" yaml:"memo"` - TimeoutHeight uint64 `json:"timeout_height" yaml:"timeout_height"` + Msgs []sdk.Msg `json:"msg" yaml:"msg"` + Fee StdFee `json:"fee" yaml:"fee"` + Signatures []StdSignature `json:"signatures" yaml:"signatures"` + SigBlockHeight uint64 `json:"sig_block_height"` + Memo string `json:"memo" yaml:"memo"` + TimeoutHeight uint64 `json:"timeout_height" yaml:"timeout_height"` } // Deprecated -func NewStdTx(msgs []sdk.Msg, fee StdFee, sigs []StdSignature, memo string) StdTx { +func NewStdTx(msgs []sdk.Msg, fee StdFee, sigs []StdSignature, sbh uint64, memo string) StdTx { return StdTx{ - Msgs: msgs, - Fee: fee, - Signatures: sigs, - Memo: memo, + Msgs: msgs, + Fee: fee, + Signatures: sigs, + SigBlockHeight: sbh, + Memo: memo, } } @@ -256,6 +258,8 @@ func (tx StdTx) GetPubKeys() []cryptotypes.PubKey { return pks } +func (tx StdTx) GetSigBlockHeight() uint64 { return tx.SigBlockHeight } + // GetGas returns the Gas in StdFee func (tx StdTx) GetGas() uint64 { return tx.Fee.Gas } diff --git a/x/auth/legacy/legacytx/stdtx_builder.go b/x/auth/legacy/legacytx/stdtx_builder.go index 647dd66aad..57358d073e 100644 --- a/x/auth/legacy/legacytx/stdtx_builder.go +++ b/x/auth/legacy/legacytx/stdtx_builder.go @@ -79,6 +79,10 @@ func (s *StdTxBuilder) SetMemo(memo string) { s.Memo = memo } +func (s *StdTxBuilder) SetSigBlockHeight(sbh uint64) { + s.SigBlockHeight = sbh +} + // SetTimeoutHeight sets the transaction's height timeout. func (s *StdTxBuilder) SetTimeoutHeight(height uint64) { s.TimeoutHeight = height diff --git a/x/auth/legacy/legacytx/stdtx_test.go b/x/auth/legacy/legacytx/stdtx_test.go index 455ccb3297..f0dabb4c79 100644 --- a/x/auth/legacy/legacytx/stdtx_test.go +++ b/x/auth/legacy/legacytx/stdtx_test.go @@ -39,10 +39,10 @@ func NewTestStdFee() StdFee { } // Deprecated, use TxBuilder. -func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []cryptotypes.PrivKey, accNums []uint64, seqs []uint64, timeout uint64, fee StdFee) sdk.Tx { +func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []cryptotypes.PrivKey, sbh []uint64, seqs []uint64, timeout uint64, fee StdFee) sdk.Tx { sigs := make([]StdSignature, len(privs)) for i, priv := range privs { - signBytes := StdSignBytes(ctx.ChainID(), accNums[i], seqs[i], timeout, fee, msgs, "") + signBytes := StdSignBytes(ctx.ChainID(), sbh[i], seqs[i], timeout, fee, msgs, "") sig, err := priv.Sign(signBytes) if err != nil { @@ -52,7 +52,7 @@ func NewTestTx(ctx sdk.Context, msgs []sdk.Msg, privs []cryptotypes.PrivKey, acc sigs[i] = StdSignature{PubKey: priv.PubKey(), Signature: sig} } - tx := NewStdTx(msgs, fee, sigs, "") + tx := NewStdTx(msgs, fee, sigs, 0, "") return tx } @@ -61,7 +61,7 @@ func TestStdTx(t *testing.T) { fee := NewTestStdFee() sigs := []StdSignature{} - tx := NewStdTx(msgs, fee, sigs, "") + tx := NewStdTx(msgs, fee, sigs, 0, "") require.Equal(t, msgs, tx.GetMsgs()) require.Equal(t, sigs, tx.Signatures) @@ -89,11 +89,11 @@ func TestStdSignBytes(t *testing.T) { }{ { args{"1234", 3, 6, 10, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, - fmt.Sprintf("{\"account_number\":\"3\",\"chain_id\":\"1234\",\"fee\":{\"amount\":[{\"amount\":\"150\",\"denom\":\"atom\"}],\"gas\":\"100000\"},\"memo\":\"memo\",\"msgs\":[[\"%s\"]],\"sequence\":\"6\",\"timeout_height\":\"10\"}", addr), + fmt.Sprintf("{\"chain_id\":\"1234\",\"fee\":{\"amount\":[{\"amount\":\"150\",\"denom\":\"atom\"}],\"gas\":\"100000\"},\"memo\":\"memo\",\"msgs\":[[\"%s\"]],\"sequence\":\"6\",\"sig_block_height\":\"3\",\"timeout_height\":\"10\"}", addr), }, { args{"1234", 3, 6, 0, defaultFee, []sdk.Msg{testdata.NewTestMsg(addr)}, "memo"}, - fmt.Sprintf("{\"account_number\":\"3\",\"chain_id\":\"1234\",\"fee\":{\"amount\":[{\"amount\":\"150\",\"denom\":\"atom\"}],\"gas\":\"100000\"},\"memo\":\"memo\",\"msgs\":[[\"%s\"]],\"sequence\":\"6\"}", addr), + fmt.Sprintf("{\"chain_id\":\"1234\",\"fee\":{\"amount\":[{\"amount\":\"150\",\"denom\":\"atom\"}],\"gas\":\"100000\"},\"memo\":\"memo\",\"msgs\":[[\"%s\"]],\"sequence\":\"6\",\"sig_block_height\":\"3\"}", addr), }, } for i, tc := range tests { @@ -171,7 +171,7 @@ func TestDefaultTxEncoder(t *testing.T) { fee := NewTestStdFee() sigs := []StdSignature{} - tx := NewStdTx(msgs, fee, sigs, "") + tx := NewStdTx(msgs, fee, sigs, 0, "") cdcBytes, err := cdc.MarshalBinaryBare(tx) @@ -274,7 +274,7 @@ func TestGetSignaturesV2(t *testing.T) { fee := NewStdFee(50000, sdk.Coins{sdk.NewInt64Coin("atom", 150)}) sig := StdSignature{PubKey: pubKey, Signature: dummy} - stdTx := NewStdTx([]sdk.Msg{testdata.NewTestMsg()}, fee, []StdSignature{sig}, "testsigs") + stdTx := NewStdTx([]sdk.Msg{testdata.NewTestMsg()}, fee, []StdSignature{sig}, 0, "testsigs") sigs, err := stdTx.GetSignaturesV2() require.Nil(t, err) diff --git a/x/auth/module.go b/x/auth/module.go index 9768ea9fee..78e6a64c05 100644 --- a/x/auth/module.go +++ b/x/auth/module.go @@ -72,7 +72,7 @@ func (AppModuleBasic) RegisterGRPCGatewayRoutes(clientCtx client.Context, mux *r // GetTxCmd returns the root tx command for the auth module. func (AppModuleBasic) GetTxCmd() *cobra.Command { - return nil + return cli.NewTxCmd() } // GetQueryCmd returns the root query command for the auth module. diff --git a/x/auth/signing/handler_map_test.go b/x/auth/signing/handler_map_test.go index 56cc2a67ae..1577c33312 100644 --- a/x/auth/signing/handler_map_test.go +++ b/x/auth/signing/handler_map_test.go @@ -43,26 +43,26 @@ func TestHandlerMap_GetSignBytes(t *testing.T) { }, } - tx := legacytx.StdTx{ - Msgs: msgs, - Fee: fee, - Signatures: nil, - Memo: memo, - } - var ( chainId = "test-chain" - accNum uint64 = 7 + sbh uint64 = 7 seqNum uint64 = 7 ) + tx := legacytx.StdTx{ + Msgs: msgs, + Fee: fee, + Signatures: nil, + SigBlockHeight: sbh, + Memo: memo, + } + handler := MakeTestHandlerMap() aminoJSONHandler := legacytx.NewStdTxSignModeHandler() signingData := signing.SignerData{ - ChainID: chainId, - AccountNumber: accNum, - Sequence: seqNum, + ChainID: chainId, + Sequence: seqNum, } signBz, err := handler.GetSignBytes(signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signingData, tx) require.NoError(t, err) diff --git a/x/auth/signing/sign_mode_handler.go b/x/auth/signing/sign_mode_handler.go index 0894791871..c0f6fba4f8 100644 --- a/x/auth/signing/sign_mode_handler.go +++ b/x/auth/signing/sign_mode_handler.go @@ -26,9 +26,6 @@ type SignerData struct { // ChainID is the chain that this transaction is targeted ChainID string - // AccountNumber is the account number of the signer - AccountNumber uint64 - // Sequence is the account sequence number of the signer that is used // for replay protection. This field is only useful for Legacy Amino signing, // since in SIGN_MODE_DIRECT the account sequence is already in the signer diff --git a/x/auth/signing/verify_test.go b/x/auth/signing/verify_test.go index 9cfca37415..8165f2536e 100644 --- a/x/auth/signing/verify_test.go +++ b/x/auth/signing/verify_test.go @@ -45,13 +45,13 @@ func TestVerifySignature(t *testing.T) { require.NoError(t, app.BankKeeper.SetBalances(ctx, addr, balances)) msgs := []sdk.Msg{testdata.NewTestMsg(addr)} + sbh := uint64(1) fee := legacytx.NewStdFee(50000, sdk.Coins{sdk.NewInt64Coin("atom", 150)}) signerData := signing.SignerData{ - ChainID: chainId, - AccountNumber: acc.GetAccountNumber(), - Sequence: acc.GetSequence(), + ChainID: chainId, + Sequence: acc.GetSequence(), } - signBytes := legacytx.StdSignBytes(signerData.ChainID, signerData.AccountNumber, signerData.Sequence, 10, fee, msgs, memo) + signBytes := legacytx.StdSignBytes(signerData.ChainID, sbh, signerData.Sequence, 10, fee, msgs, memo) signature, err := priv.Sign(signBytes) require.NoError(t, err) @@ -60,7 +60,7 @@ func TestVerifySignature(t *testing.T) { require.NoError(t, err) handler := MakeTestHandlerMap() - stdTx := legacytx.NewStdTx(msgs, fee, []legacytx.StdSignature{stdSig}, memo) + stdTx := legacytx.NewStdTx(msgs, fee, []legacytx.StdSignature{stdSig}, sbh, memo) stdTx.TimeoutHeight = 10 err = signing.VerifySignature(pubKey, signerData, sigV2.Data, handler, stdTx) require.NoError(t, err) @@ -69,7 +69,7 @@ func TestVerifySignature(t *testing.T) { multisigKey := kmultisig.NewLegacyAminoPubKey(2, pkSet) multisignature := multisig.NewMultisig(2) msgs = []sdk.Msg{testdata.NewTestMsg(addr, addr1)} - multiSignBytes := legacytx.StdSignBytes(signerData.ChainID, signerData.AccountNumber, signerData.Sequence, 10, fee, msgs, memo) + multiSignBytes := legacytx.StdSignBytes(signerData.ChainID, sbh, signerData.Sequence, 10, fee, msgs, memo) sig1, err := priv.Sign(multiSignBytes) require.NoError(t, err) @@ -88,7 +88,7 @@ func TestVerifySignature(t *testing.T) { err = multisig.AddSignatureFromPubKey(multisignature, sig2V2.Data, pkSet[1], pkSet) require.NoError(t, err) - stdTx = legacytx.NewStdTx(msgs, fee, []legacytx.StdSignature{stdSig1, stdSig2}, memo) + stdTx = legacytx.NewStdTx(msgs, fee, []legacytx.StdSignature{stdSig1, stdSig2}, sbh, memo) stdTx.TimeoutHeight = 10 err = signing.VerifySignature(multisigKey, signerData, multisignature, handler, stdTx) diff --git a/x/auth/simulation/decoder.go b/x/auth/simulation/decoder.go index 52e1cc3acd..768faffc0e 100644 --- a/x/auth/simulation/decoder.go +++ b/x/auth/simulation/decoder.go @@ -4,8 +4,6 @@ import ( "bytes" "fmt" - gogotypes "github.com/gogo/protobuf/types" - "github.com/line/lfb-sdk/codec" "github.com/line/lfb-sdk/types/kv" "github.com/line/lfb-sdk/x/auth/types" @@ -34,13 +32,6 @@ func NewDecodeStore(ak AuthUnmarshaler) func(kvA, kvB kv.Pair) string { return fmt.Sprintf("%v\n%v", accA, accB) - case bytes.Equal(kvA.Key, types.GlobalAccountNumberKey): - var globalAccNumberA, globalAccNumberB gogotypes.UInt64Value - ak.GetCodec().MustUnmarshalBinaryBare(kvA.Value, &globalAccNumberA) - ak.GetCodec().MustUnmarshalBinaryBare(kvB.Value, &globalAccNumberB) - - return fmt.Sprintf("GlobalAccNumberA: %d\nGlobalAccNumberB: %d", globalAccNumberA, globalAccNumberB) - default: panic(fmt.Sprintf("unexpected %s key %X (%s)", types.ModuleName, kvA.Key, kvA.Key)) } diff --git a/x/auth/simulation/decoder_test.go b/x/auth/simulation/decoder_test.go index d98eccde3b..7da1274869 100644 --- a/x/auth/simulation/decoder_test.go +++ b/x/auth/simulation/decoder_test.go @@ -4,7 +4,6 @@ import ( "fmt" "testing" - gogotypes "github.com/gogo/protobuf/types" "github.com/stretchr/testify/require" "github.com/line/lfb-sdk/crypto/keys/ed25519" @@ -22,25 +21,18 @@ var ( func TestDecodeStore(t *testing.T) { app := simapp.Setup(false) - cdc, _ := simapp.MakeCodecs() acc := types.NewBaseAccountWithAddress(delAddr1) dec := simulation.NewDecodeStore(app.AccountKeeper) accBz, err := app.AccountKeeper.MarshalAccount(acc) require.NoError(t, err) - globalAccNumber := gogotypes.UInt64Value{Value: 10} - kvPairs := kv.Pairs{ Pairs: []kv.Pair{ { Key: types.AddressStoreKey(delAddr1), Value: accBz, }, - { - Key: types.GlobalAccountNumberKey, - Value: cdc.MustMarshalBinaryBare(&globalAccNumber), - }, { Key: []byte{0x99}, Value: []byte{0x99}, @@ -52,7 +44,6 @@ func TestDecodeStore(t *testing.T) { expectedLog string }{ {"Account", fmt.Sprintf("%v\n%v", acc, acc)}, - {"GlobalAccNumber", fmt.Sprintf("GlobalAccNumberA: %d\nGlobalAccNumberB: %d", globalAccNumber, globalAccNumber)}, {"other", ""}, } diff --git a/x/auth/simulation/genesis.go b/x/auth/simulation/genesis.go index e865815e4e..bd74fdcba0 100644 --- a/x/auth/simulation/genesis.go +++ b/x/auth/simulation/genesis.go @@ -19,6 +19,7 @@ const ( TxSizeCostPerByte = "tx_size_cost_per_byte" SigVerifyCostED25519 = "sig_verify_cost_ed25519" SigVerifyCostSECP256K1 = "sig_verify_cost_secp256k1" + ValidSigBlockPeriod = "valid_sig_block_period" ) // RandomGenesisAccounts defines the default RandomGenesisAccountsFn used on the SDK. @@ -87,6 +88,10 @@ func GenSigVerifyCostSECP256K1(r *rand.Rand) uint64 { return uint64(simulation.RandIntBetween(r, 500, 1000)) } +func GenValidSigBlockPeriod(r *rand.Rand) uint64 { + return uint64(simulation.RandIntBetween(r, 1, 1000)) +} + // RandomizedGenState generates a random GenesisState for auth func RandomizedGenState(simState *module.SimulationState, randGenAccountsFn types.RandomGenesisAccountsFn) { var maxMemoChars uint64 @@ -119,8 +124,14 @@ func RandomizedGenState(simState *module.SimulationState, randGenAccountsFn type func(r *rand.Rand) { sigVerifyCostSECP256K1 = GenSigVerifyCostSECP256K1(r) }, ) + var validSigBlockPeriod uint64 + simState.AppParams.GetOrGenerate( + simState.Cdc, ValidSigBlockPeriod, &validSigBlockPeriod, simState.Rand, + func(r *rand.Rand) { validSigBlockPeriod = GenValidSigBlockPeriod(r) }, + ) + params := types.NewParams(maxMemoChars, txSigLimit, txSizeCostPerByte, - sigVerifyCostED25519, sigVerifyCostSECP256K1) + sigVerifyCostED25519, sigVerifyCostSECP256K1, validSigBlockPeriod) genesisAccs := randGenAccountsFn(simState) authGenesis := types.NewGenesisState(params, genesisAccs) diff --git a/x/auth/simulation/genesis_test.go b/x/auth/simulation/genesis_test.go index 2140e1de33..218bd5206d 100644 --- a/x/auth/simulation/genesis_test.go +++ b/x/auth/simulation/genesis_test.go @@ -50,6 +50,5 @@ func TestRandomizedGenState(t *testing.T) { require.NoError(t, err) require.Len(t, genAccounts, 3) require.Equal(t, "link1ghekyjucln7y67ntx7cf27m9dpuxxemnqk82wt", genAccounts[2].GetAddress().String()) - require.Equal(t, uint64(0), genAccounts[2].GetAccountNumber()) require.Equal(t, uint64(0), genAccounts[2].GetSequence()) } diff --git a/x/auth/testutil/suite.go b/x/auth/testutil/suite.go index cbe7f9bd49..297286ed32 100644 --- a/x/auth/testutil/suite.go +++ b/x/auth/testutil/suite.go @@ -128,9 +128,8 @@ func (s *TxConfigTestSuite) TestTxBuilderSetSignatures() { // sign transaction signerData := signing.SignerData{ - ChainID: "test", - AccountNumber: 1, - Sequence: seq1, + ChainID: "test", + Sequence: seq1, } signBytes, err := signModeHandler.GetSignBytes(signModeHandler.DefaultMode(), signerData, sigTx) s.Require().NoError(err) @@ -138,9 +137,8 @@ func (s *TxConfigTestSuite) TestTxBuilderSetSignatures() { s.Require().NoError(err) signerData = signing.SignerData{ - ChainID: "test", - AccountNumber: 3, - Sequence: mseq, + ChainID: "test", + Sequence: mseq, } mSignBytes, err := signModeHandler.GetSignBytes(signModeHandler.DefaultMode(), signerData, sigTx) s.Require().NoError(err) diff --git a/x/auth/tx/builder.go b/x/auth/tx/builder.go index c7eb8b02dc..a4d2f0046b 100644 --- a/x/auth/tx/builder.go +++ b/x/auth/tx/builder.go @@ -153,6 +153,10 @@ func (w *wrapper) FeeGranter() sdk.AccAddress { return nil } +func (w *wrapper) GetSigBlockHeight() uint64 { + return w.tx.Body.SigBlockHeight +} + func (w *wrapper) GetMemo() string { return w.tx.Body.Memo } @@ -232,6 +236,10 @@ func (w *wrapper) SetMemo(memo string) { w.bodyBz = nil } +func (w *wrapper) SetSigBlockHeight(sbh uint64) { + w.tx.Body.SigBlockHeight = sbh +} + func (w *wrapper) SetGasLimit(limit uint64) { if w.tx.AuthInfo.Fee == nil { w.tx.AuthInfo.Fee = &tx.Fee{} diff --git a/x/auth/tx/direct.go b/x/auth/tx/direct.go index f201688f8f..8d10fd8911 100644 --- a/x/auth/tx/direct.go +++ b/x/auth/tx/direct.go @@ -39,17 +39,16 @@ func (signModeDirectHandler) GetSignBytes(mode signingtypes.SignMode, data signi bodyBz := protoTx.getBodyBytes() authInfoBz := protoTx.getAuthInfoBytes() - return DirectSignBytes(bodyBz, authInfoBz, data.ChainID, data.AccountNumber) + return DirectSignBytes(bodyBz, authInfoBz, data.ChainID) } // DirectSignBytes returns the SIGN_MODE_DIRECT sign bytes for the provided TxBody bytes, AuthInfo bytes, chain ID, -// account number and sequence. -func DirectSignBytes(bodyBytes, authInfoBytes []byte, chainID string, accnum uint64) ([]byte, error) { +// and sequence. +func DirectSignBytes(bodyBytes, authInfoBytes []byte, chainID string) ([]byte, error) { signDoc := types.SignDoc{ BodyBytes: bodyBytes, AuthInfoBytes: authInfoBytes, ChainId: chainID, - AccountNumber: accnum, } return signDoc.Marshal() } diff --git a/x/auth/tx/direct_test.go b/x/auth/tx/direct_test.go index 1548061bfd..ed951f9837 100644 --- a/x/auth/tx/direct_test.go +++ b/x/auth/tx/direct_test.go @@ -69,8 +69,7 @@ func TestDirectModeHandler(t *testing.T) { require.Len(t, modeHandler.Modes(), 1) signingData := signing.SignerData{ - ChainID: "test-chain", - AccountNumber: 1, + ChainID: "test-chain", } signBytes, err := modeHandler.GetSignBytes(signingtypes.SignMode_SIGN_MODE_DIRECT, signingData, txBuilder.GetTx()) @@ -103,7 +102,6 @@ func TestDirectModeHandler(t *testing.T) { t.Log("verify GetSignBytes with generating sign bytes by marshaling SignDoc") signDoc := txtypes.SignDoc{ - AccountNumber: 1, AuthInfoBytes: authInfoBytes, BodyBytes: bodyBytes, ChainId: "test-chain", @@ -149,8 +147,9 @@ func TestDirectModeHandler_nonDIRECT_MODE(t *testing.T) { type nonProtoTx int -func (npt *nonProtoTx) GetMsgs() []sdk.Msg { return nil } -func (npt *nonProtoTx) ValidateBasic() error { return nil } +func (npt *nonProtoTx) GetMsgs() []sdk.Msg { return nil } +func (npt *nonProtoTx) ValidateBasic() error { return nil } +func (npt *nonProtoTx) GetSigBlockHeight() uint64 { return 0 } var _ sdk.Tx = (*nonProtoTx)(nil) diff --git a/x/auth/tx/legacy_amino_json.go b/x/auth/tx/legacy_amino_json.go index 2c44541dc8..68abda7601 100644 --- a/x/auth/tx/legacy_amino_json.go +++ b/x/auth/tx/legacy_amino_json.go @@ -47,7 +47,7 @@ func (s signModeLegacyAminoJSONHandler) GetSignBytes(mode signingtypes.SignMode, } return legacytx.StdSignBytes( - data.ChainID, data.AccountNumber, data.Sequence, protoTx.GetTimeoutHeight(), + data.ChainID, tx.GetSigBlockHeight(), data.Sequence, protoTx.GetTimeoutHeight(), legacytx.StdFee{Amount: protoTx.GetFee(), Gas: protoTx.GetGas()}, tx.GetMsgs(), protoTx.GetMemo(), ), nil diff --git a/x/auth/tx/legacy_amino_json_test.go b/x/auth/tx/legacy_amino_json_test.go index 6f924cffcd..158ded4599 100644 --- a/x/auth/tx/legacy_amino_json_test.go +++ b/x/auth/tx/legacy_amino_json_test.go @@ -21,6 +21,7 @@ var ( gas = uint64(10000) msg = testdata.NewTestMsg(addr1, addr2) memo = "foo" + sbh = uint64(1) timeout = uint64(10) ) @@ -28,6 +29,7 @@ func buildTx(t *testing.T, bldr *wrapper) { bldr.SetFeeAmount(coins) bldr.SetGasLimit(gas) bldr.SetMemo(memo) + bldr.SetSigBlockHeight(sbh) bldr.SetTimeoutHeight(timeout) require.NoError(t, bldr.SetMsgs(msg)) } @@ -39,20 +41,18 @@ func TestLegacyAminoJSONHandler_GetSignBytes(t *testing.T) { var ( chainId = "test-chain" - accNum uint64 = 7 seqNum uint64 = 7 ) handler := signModeLegacyAminoJSONHandler{} signingData := signing.SignerData{ ChainID: chainId, - AccountNumber: accNum, Sequence: seqNum, } signBz, err := handler.GetSignBytes(signingtypes.SignMode_SIGN_MODE_LEGACY_AMINO_JSON, signingData, tx) require.NoError(t, err) - expectedSignBz := legacytx.StdSignBytes(chainId, accNum, seqNum, timeout, legacytx.StdFee{ + expectedSignBz := legacytx.StdSignBytes(chainId, sbh, seqNum, timeout, legacytx.StdFee{ Amount: coins, Gas: gas, }, []sdk.Msg{msg}, memo) diff --git a/x/auth/tx/service.go b/x/auth/tx/service.go index aed3af6b73..78e0c96e8e 100644 --- a/x/auth/tx/service.go +++ b/x/auth/tx/service.go @@ -63,7 +63,7 @@ func (s txServer) GetTxsEvent(ctx context.Context, req *txtypes.GetTxsEventReque } } - result, err := queryTxsByEvents(ctx, s.clientCtx, req.Events, page, limit, "") + result, err := queryTxsByEvents(ctx, s.clientCtx, req.Events, req.Prove, page, limit, "") if err != nil { return nil, err } diff --git a/x/auth/tx/xauthclient.go b/x/auth/tx/xauthclient.go index bbafe86d15..1a3ef7d720 100644 --- a/x/auth/tx/xauthclient.go +++ b/x/auth/tx/xauthclient.go @@ -25,7 +25,7 @@ import ( // concatenated with an 'AND' operand. It returns a slice of Info object // containing txs and metadata. An error is returned if the query fails. // If an empty string is provided it will order txs by asc -func queryTxsByEvents(goCtx context.Context, clientCtx client.Context, events []string, page, limit int, orderBy string) (*sdk.SearchTxsResult, error) { +func queryTxsByEvents(goCtx context.Context, clientCtx client.Context, events []string, prove bool, page, limit int, orderBy string) (*sdk.SearchTxsResult, error) { if len(events) == 0 { return nil, errors.New("must declare at least one event to search") } @@ -46,9 +46,7 @@ func queryTxsByEvents(goCtx context.Context, clientCtx client.Context, events [] return nil, err } - // TODO: this may not always need to be proven - // https://github.com/line/lfb-sdk/issues/6807 - resTxs, err := node.TxSearch(goCtx, query, true, &page, &limit, orderBy) + resTxs, err := node.TxSearch(goCtx, query, prove, &page, &limit, orderBy) if err != nil { return nil, err } diff --git a/x/auth/types/account.go b/x/auth/types/account.go index acf6e3075d..72f0c2285b 100644 --- a/x/auth/types/account.go +++ b/x/auth/types/account.go @@ -27,11 +27,10 @@ var ( // NewBaseAccount creates a new BaseAccount object //nolint:interfacer -func NewBaseAccount(address sdk.AccAddress, pubKey cryptotypes.PubKey, accountNumber, sequence uint64) *BaseAccount { +func NewBaseAccount(address sdk.AccAddress, pubKey cryptotypes.PubKey, sequence uint64) *BaseAccount { acc := &BaseAccount{ - Address: address.String(), - AccountNumber: accountNumber, - Sequence: sequence, + Address: address.String(), + Sequence: sequence, } err := acc.SetPubKey(pubKey) @@ -95,17 +94,6 @@ func (acc *BaseAccount) SetPubKey(pubKey cryptotypes.PubKey) error { return err } -// GetAccountNumber - Implements AccountI -func (acc BaseAccount) GetAccountNumber() uint64 { - return acc.AccountNumber -} - -// SetAccountNumber - Implements AccountI -func (acc *BaseAccount) SetAccountNumber(accNumber uint64) error { - acc.AccountNumber = accNumber - return nil -} - // GetSequence - Implements sdk.AccountI. func (acc BaseAccount) GetSequence() uint64 { return acc.Sequence @@ -236,12 +224,11 @@ func (ma ModuleAccount) Validate() error { } type moduleAccountPretty struct { - Address sdk.AccAddress `json:"address" yaml:"address"` - PubKey string `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` - Sequence uint64 `json:"sequence" yaml:"sequence"` - Name string `json:"name" yaml:"name"` - Permissions []string `json:"permissions" yaml:"permissions"` + Address sdk.AccAddress `json:"address" yaml:"address"` + PubKey string `json:"public_key" yaml:"public_key"` + Sequence uint64 `json:"sequence" yaml:"sequence"` + Name string `json:"name" yaml:"name"` + Permissions []string `json:"permissions" yaml:"permissions"` } func (ma ModuleAccount) String() string { @@ -257,12 +244,11 @@ func (ma ModuleAccount) MarshalYAML() (interface{}, error) { } bs, err := yaml.Marshal(moduleAccountPretty{ - Address: accAddr, - PubKey: "", - AccountNumber: ma.AccountNumber, - Sequence: ma.Sequence, - Name: ma.Name, - Permissions: ma.Permissions, + Address: accAddr, + PubKey: "", + Sequence: ma.Sequence, + Name: ma.Name, + Permissions: ma.Permissions, }) if err != nil { @@ -280,12 +266,11 @@ func (ma ModuleAccount) MarshalJSON() ([]byte, error) { } return json.Marshal(moduleAccountPretty{ - Address: accAddr, - PubKey: "", - AccountNumber: ma.AccountNumber, - Sequence: ma.Sequence, - Name: ma.Name, - Permissions: ma.Permissions, + Address: accAddr, + PubKey: "", + Sequence: ma.Sequence, + Name: ma.Name, + Permissions: ma.Permissions, }) } @@ -296,7 +281,7 @@ func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error { return err } - ma.BaseAccount = NewBaseAccount(alias.Address, nil, alias.AccountNumber, alias.Sequence) + ma.BaseAccount = NewBaseAccount(alias.Address, nil, alias.Sequence) ma.Name = alias.Name ma.Permissions = alias.Permissions @@ -305,7 +290,7 @@ func (ma *ModuleAccount) UnmarshalJSON(bz []byte) error { // AccountI is an interface used to store coins at a given address within state. // It presumes a notion of sequence numbers for replay protection, -// a notion of account numbers for replay protection for previously pruned accounts, +// a notion of sig block height for replay protection for previously pruned accounts, // and a pubkey for authentication purposes. // // Many complex conditions can be used in the concrete struct which implements AccountI. @@ -318,9 +303,6 @@ type AccountI interface { GetPubKey() cryptotypes.PubKey // can return nil. SetPubKey(cryptotypes.PubKey) error - GetAccountNumber() uint64 - SetAccountNumber(uint64) error - GetSequence() uint64 SetSequence(uint64) error diff --git a/x/auth/types/account_retriever.go b/x/auth/types/account_retriever.go index de64c380e4..afe9b84c73 100644 --- a/x/auth/types/account_retriever.go +++ b/x/auth/types/account_retriever.go @@ -5,6 +5,7 @@ import ( "fmt" "strconv" + "github.com/line/lfb-sdk/client/grpc/tmservice" grpc "google.golang.org/grpc" "google.golang.org/grpc/metadata" @@ -29,6 +30,15 @@ func (ar AccountRetriever) GetAccount(clientCtx client.Context, addr sdk.AccAddr return account, err } +func (ar AccountRetriever) GetLatestHeight(clientCtx client.Context) (uint64, error) { + queryClient := tmservice.NewServiceClient(clientCtx) + res, err := queryClient.GetLatestBlock(context.Background(), &tmservice.GetLatestBlockRequest{}) + if err != nil { + return 0, err + } + return uint64(res.Block.Header.Height), nil +} + // GetAccountWithHeight queries for an account given an address. Returns the // height of the query with the account. An error is returned if the query // or decoding fails. @@ -69,13 +79,13 @@ func (ar AccountRetriever) EnsureExists(clientCtx client.Context, addr sdk.AccAd return nil } -// GetAccountNumberSequence returns sequence and account number for the given address. +// GetAccountSequence returns sequence for the given address. // It returns an error if the account couldn't be retrieved from the state. -func (ar AccountRetriever) GetAccountNumberSequence(clientCtx client.Context, addr sdk.AccAddress) (uint64, uint64, error) { +func (ar AccountRetriever) GetAccountSequence(clientCtx client.Context, addr sdk.AccAddress) (uint64, error) { acc, err := ar.GetAccount(clientCtx, addr) if err != nil { - return 0, 0, err + return 0, err } - return acc.GetAccountNumber(), acc.GetSequence(), nil + return acc.GetSequence(), nil } diff --git a/x/auth/types/account_retriever_test.go b/x/auth/types/account_retriever_test.go index 12aefb8564..b874e1848e 100644 --- a/x/auth/types/account_retriever_test.go +++ b/x/auth/types/account_retriever_test.go @@ -36,8 +36,7 @@ func TestAccountRetriever(t *testing.T) { require.NoError(t, ar.EnsureExists(clientCtx, val.Address)) - accNum, accSeq, err := ar.GetAccountNumberSequence(clientCtx, val.Address) + accSeq, err := ar.GetAccountSequence(clientCtx, val.Address) require.NoError(t, err) - require.Equal(t, accNum, uint64(0)) require.Equal(t, accSeq, uint64(1)) } diff --git a/x/auth/types/account_test.go b/x/auth/types/account_test.go index 47e26bdd07..9829e88f87 100644 --- a/x/auth/types/account_test.go +++ b/x/auth/types/account_test.go @@ -84,7 +84,7 @@ func TestBaseAccountMarshal(t *testing.T) { func TestGenesisAccountValidate(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) - baseAcc := types.NewBaseAccount(addr, pubkey, 0, 0) + baseAcc := types.NewBaseAccount(addr, pubkey, 0) tests := []struct { name string @@ -98,7 +98,7 @@ func TestGenesisAccountValidate(t *testing.T) { }, { "invalid base valid account", - types.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0, 0), + types.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0), true, }, } @@ -118,7 +118,7 @@ func TestModuleAccountMarshalYAML(t *testing.T) { bs, err := yaml.Marshal(moduleAcc) require.NoError(t, err) - want := "|\n address: link1n7rdpqvgf37ktx30a2sv2kkszk3m7ncma6dpv3\n public_key: \"\"\n account_number: 0\n sequence: 0\n name: test\n permissions:\n - minter\n - burner\n - staking\n" + want := "|\n address: link1n7rdpqvgf37ktx30a2sv2kkszk3m7ncma6dpv3\n public_key: \"\"\n sequence: 0\n name: test\n permissions:\n - minter\n - burner\n - staking\n" require.Equal(t, want, string(bs)) } @@ -147,7 +147,7 @@ func TestHasPermissions(t *testing.T) { func TestValidate(t *testing.T) { addr := sdk.AccAddress(secp256k1.GenPrivKey().PubKey().Address()) - baseAcc := types.NewBaseAccount(addr, nil, 0, 0) + baseAcc := types.NewBaseAccount(addr, nil, 0) tests := []struct { name string acc types.GenesisAccount @@ -181,7 +181,7 @@ func TestValidate(t *testing.T) { func TestModuleAccountJSON(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) - baseAcc := types.NewBaseAccount(addr, nil, 10, 50) + baseAcc := types.NewBaseAccount(addr, nil, 50) acc := types.NewModuleAccount(baseAcc, "test", "burner") bz, err := json.Marshal(acc) @@ -199,7 +199,7 @@ func TestModuleAccountJSON(t *testing.T) { func TestGenesisAccountsContains(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) - acc := types.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0, 0) + acc := types.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0) genAccounts := types.GenesisAccounts{} require.False(t, genAccounts.Contains(acc.GetAddress())) diff --git a/x/auth/types/auth.pb.go b/x/auth/types/auth.pb.go index 6bbf8ac0dd..1d5f565bf3 100644 --- a/x/auth/types/auth.pb.go +++ b/x/auth/types/auth.pb.go @@ -29,10 +29,9 @@ const _ = proto.GoGoProtoPackageIsVersion3 // please upgrade the proto package // for basic account functionality. Any custom account type should extend this // type for additional functionality (e.g. vesting). type BaseAccount 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:"public_key,omitempty" yaml:"public_key"` - AccountNumber uint64 `protobuf:"varint,3,opt,name=account_number,json=accountNumber,proto3" json:"account_number,omitempty" yaml:"account_number"` - Sequence uint64 `protobuf:"varint,4,opt,name=sequence,proto3" json:"sequence,omitempty"` + 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:"public_key,omitempty" yaml:"public_key"` + Sequence uint64 `protobuf:"varint,3,opt,name=sequence,proto3" json:"sequence,omitempty"` } func (m *BaseAccount) Reset() { *m = BaseAccount{} } @@ -113,6 +112,7 @@ type Params struct { TxSizeCostPerByte uint64 `protobuf:"varint,3,opt,name=tx_size_cost_per_byte,json=txSizeCostPerByte,proto3" json:"tx_size_cost_per_byte,omitempty" yaml:"tx_size_cost_per_byte"` SigVerifyCostED25519 uint64 `protobuf:"varint,4,opt,name=sig_verify_cost_ed25519,json=sigVerifyCostEd25519,proto3" json:"sig_verify_cost_ed25519,omitempty" yaml:"sig_verify_cost_ed25519"` SigVerifyCostSecp256k1 uint64 `protobuf:"varint,5,opt,name=sig_verify_cost_secp256k1,json=sigVerifyCostSecp256k1,proto3" json:"sig_verify_cost_secp256k1,omitempty" yaml:"sig_verify_cost_secp256k1"` + ValidSigBlockPeriod uint64 `protobuf:"varint,6,opt,name=valid_sig_block_period,json=validSigBlockPeriod,proto3" json:"valid_sig_block_period,omitempty" yaml:"valid_sig_block_period"` } func (m *Params) Reset() { *m = Params{} } @@ -182,6 +182,13 @@ func (m *Params) GetSigVerifyCostSecp256k1() uint64 { return 0 } +func (m *Params) GetValidSigBlockPeriod() uint64 { + if m != nil { + return m.ValidSigBlockPeriod + } + return 0 +} + func init() { proto.RegisterType((*BaseAccount)(nil), "lfb.auth.v1beta1.BaseAccount") proto.RegisterType((*ModuleAccount)(nil), "lfb.auth.v1beta1.ModuleAccount") @@ -191,50 +198,51 @@ func init() { func init() { proto.RegisterFile("lfb/auth/v1beta1/auth.proto", fileDescriptor_f89657c3058cd869) } var fileDescriptor_f89657c3058cd869 = []byte{ - // 678 bytes of a gzipped FileDescriptorProto + // 689 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x54, 0x3d, 0x4f, 0xdb, 0x5a, - 0x18, 0x8e, 0x6f, 0x72, 0xf9, 0x38, 0x01, 0x74, 0x31, 0x01, 0x9c, 0x70, 0xaf, 0x1d, 0x59, 0x77, - 0xc8, 0xd0, 0xd8, 0x4a, 0x2a, 0x2a, 0x91, 0x01, 0x15, 0xd3, 0x0e, 0xa8, 0x05, 0x21, 0x23, 0x75, - 0xa8, 0x5a, 0x59, 0xc7, 0xce, 0x89, 0xb1, 0xf0, 0xf1, 0x31, 0x3e, 0xc7, 0x28, 0xe6, 0x17, 0x74, - 0xec, 0xd8, 0x91, 0x1f, 0xc1, 0x0f, 0xe8, 0xd8, 0x11, 0x31, 0x75, 0x72, 0xab, 0xb0, 0x54, 0x1d, - 0xb3, 0x57, 0xaa, 0xe2, 0xe3, 0x84, 0x04, 0xd1, 0xed, 0x3c, 0xef, 0xf3, 0xbc, 0xcf, 0xfb, 0x95, - 0x18, 0x6c, 0xf9, 0x3d, 0x5b, 0x87, 0x31, 0x3b, 0xd5, 0x2f, 0x5a, 0x36, 0x62, 0xb0, 0x95, 0x01, - 0x2d, 0x8c, 0x08, 0x23, 0xe2, 0x3f, 0x7e, 0xcf, 0xd6, 0x32, 0x9c, 0x93, 0xb5, 0xaa, 0x43, 0x28, - 0x26, 0xd4, 0xca, 0x78, 0x9d, 0x03, 0x2e, 0xae, 0x55, 0x5c, 0xe2, 0x12, 0x1e, 0x1f, 0xbd, 0xf2, - 0x68, 0xd5, 0x25, 0xc4, 0xf5, 0x91, 0x9e, 0x21, 0x3b, 0xee, 0xe9, 0x30, 0x48, 0x38, 0xa5, 0xfe, - 0x12, 0x40, 0xd9, 0x80, 0x14, 0xed, 0x39, 0x0e, 0x89, 0x03, 0x26, 0x4a, 0x60, 0x1e, 0x76, 0xbb, - 0x11, 0xa2, 0x54, 0x12, 0xea, 0x42, 0x63, 0xd1, 0x1c, 0x43, 0xf1, 0x1d, 0x98, 0x0f, 0x63, 0xdb, - 0x3a, 0x43, 0x89, 0xf4, 0x57, 0x5d, 0x68, 0x94, 0xdb, 0x15, 0x8d, 0xdb, 0x6a, 0x63, 0x5b, 0x6d, - 0x2f, 0x48, 0x8c, 0xe6, 0xcf, 0x54, 0xa9, 0x84, 0xb1, 0xed, 0x7b, 0xce, 0x48, 0xfb, 0x84, 0x60, - 0x8f, 0x21, 0x1c, 0xb2, 0x64, 0x98, 0x2a, 0xab, 0x09, 0xc4, 0x7e, 0x47, 0xbd, 0x67, 0x55, 0x73, - 0x2e, 0x8c, 0xed, 0x57, 0x28, 0x11, 0x9f, 0x83, 0x15, 0xc8, 0x5b, 0xb0, 0x82, 0x18, 0xdb, 0x28, - 0x92, 0x8a, 0x75, 0xa1, 0x51, 0x32, 0xaa, 0xc3, 0x54, 0x59, 0xe7, 0x69, 0xb3, 0xbc, 0x6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0x5c, 0x4f, 0x13, 0x45, 0xce, 0xbb, 0xfd, + 0x21, 0x40, 0x35, 0x2b, 0xf4, 0x5e, 0x5d, 0x4e, 0x8b, 0x31, 0xd8, 0x7c, 0x58, 0x41, 0x91, 0x13, + 0xb4, 0x76, 0x9e, 0xf7, 0x9b, 0xd2, 0xdf, 0xbc, 0xe9, 0xde, 0x28, 0x51, 0xd6, 0xef, 0x35, 0xed, + 0x4c, 0x1c, 0x69, 0xa2, 0xd4, 0xe6, 0xb7, 0x9d, 0x86, 0xa8, 0xe6, 0x3a, 0x9d, 0x5b, 0x2b, 0x9e, + 0x80, 0xf5, 0x73, 0xe8, 0xe1, 0x2e, 0xbf, 0xb0, 0xed, 0x11, 0xa7, 0x9f, 0x5d, 0x07, 0x93, 0xae, + 0x54, 0xe2, 0x7d, 0x1f, 0xa7, 0x89, 0xb2, 0x9d, 0xa7, 0xcf, 0xf7, 0xa9, 0xe6, 0x1a, 0x17, 0x3a, + 0xd8, 0x35, 0x32, 0xfa, 0x98, 0xb3, 0xed, 0xa5, 0xf1, 0x87, 0x20, 0x18, 0x7b, 0xdf, 0x46, 0xb2, + 0x70, 0x3d, 0x92, 0x85, 0x1f, 0x23, 0x59, 0xf8, 0x78, 0x2b, 0x17, 0xae, 0x6f, 0xe5, 0xc2, 0xf7, + 0x5b, 0xb9, 0xf0, 0xf6, 0x89, 0x8b, 0xd9, 0x69, 0x64, 0x6b, 0x0e, 0xf1, 0x75, 0x0f, 0x0f, 0x90, + 0xee, 0xf5, 0xec, 0x06, 0xed, 0xf6, 0xf5, 0x61, 0xfe, 0x97, 0x61, 0x71, 0x80, 0xa8, 0x5d, 0xe2, + 0xdf, 0xed, 0xb3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x78, 0x3d, 0x9d, 0xdb, 0x7e, 0x04, 0x00, + 0x00, } func (this *Params) Equal(that interface{}) bool { @@ -271,6 +279,9 @@ func (this *Params) Equal(that interface{}) bool { if this.SigVerifyCostSecp256k1 != that1.SigVerifyCostSecp256k1 { return false } + if this.ValidSigBlockPeriod != that1.ValidSigBlockPeriod { + return false + } return true } func (m *BaseAccount) Marshal() (dAtA []byte, err error) { @@ -296,11 +307,6 @@ func (m *BaseAccount) MarshalToSizedBuffer(dAtA []byte) (int, error) { if m.Sequence != 0 { i = encodeVarintAuth(dAtA, i, uint64(m.Sequence)) i-- - dAtA[i] = 0x20 - } - if m.AccountNumber != 0 { - i = encodeVarintAuth(dAtA, i, uint64(m.AccountNumber)) - i-- dAtA[i] = 0x18 } if m.PubKey != nil { @@ -396,6 +402,11 @@ func (m *Params) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.ValidSigBlockPeriod != 0 { + i = encodeVarintAuth(dAtA, i, uint64(m.ValidSigBlockPeriod)) + i-- + dAtA[i] = 0x30 + } if m.SigVerifyCostSecp256k1 != 0 { i = encodeVarintAuth(dAtA, i, uint64(m.SigVerifyCostSecp256k1)) i-- @@ -449,9 +460,6 @@ func (m *BaseAccount) Size() (n int) { l = m.PubKey.Size() n += 1 + l + sovAuth(uint64(l)) } - if m.AccountNumber != 0 { - n += 1 + sovAuth(uint64(m.AccountNumber)) - } if m.Sequence != 0 { n += 1 + sovAuth(uint64(m.Sequence)) } @@ -502,6 +510,9 @@ func (m *Params) Size() (n int) { if m.SigVerifyCostSecp256k1 != 0 { n += 1 + sovAuth(uint64(m.SigVerifyCostSecp256k1)) } + if m.ValidSigBlockPeriod != 0 { + n += 1 + sovAuth(uint64(m.ValidSigBlockPeriod)) + } return n } @@ -609,25 +620,6 @@ func (m *BaseAccount) Unmarshal(dAtA []byte) error { } iNdEx = postIndex case 3: - if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field AccountNumber", wireType) - } - m.AccountNumber = 0 - for shift := uint(0); ; shift += 7 { - if shift >= 64 { - return ErrIntOverflowAuth - } - if iNdEx >= l { - return io.ErrUnexpectedEOF - } - b := dAtA[iNdEx] - iNdEx++ - m.AccountNumber |= uint64(b&0x7F) << shift - if b < 0x80 { - break - } - } - case 4: if wireType != 0 { return fmt.Errorf("proto: wrong wireType = %d for field Sequence", wireType) } @@ -941,6 +933,25 @@ func (m *Params) Unmarshal(dAtA []byte) error { break } } + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field ValidSigBlockPeriod", wireType) + } + m.ValidSigBlockPeriod = 0 + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowAuth + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + m.ValidSigBlockPeriod |= uint64(b&0x7F) << shift + if b < 0x80 { + break + } + } default: iNdEx = preIndex skippy, err := skipAuth(dAtA[iNdEx:]) diff --git a/x/auth/types/genesis.go b/x/auth/types/genesis.go index 52c704d847..e174fc357d 100644 --- a/x/auth/types/genesis.go +++ b/x/auth/types/genesis.go @@ -76,7 +76,7 @@ func ValidateGenesis(data GenesisState) error { // SanitizeGenesisAccounts sorts accounts and coin sets. func SanitizeGenesisAccounts(genAccs GenesisAccounts) GenesisAccounts { sort.Slice(genAccs, func(i, j int) bool { - return genAccs[i].GetAccountNumber() < genAccs[j].GetAccountNumber() + return genAccs[i].GetAddress().String() < genAccs[j].GetAddress().String() }) return genAccs diff --git a/x/auth/types/genesis_test.go b/x/auth/types/genesis_test.go index da7c8672e8..233334c20a 100644 --- a/x/auth/types/genesis_test.go +++ b/x/auth/types/genesis_test.go @@ -16,20 +16,15 @@ import ( func TestSanitize(t *testing.T) { addr1 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) authAcc1 := types.NewBaseAccountWithAddress(addr1) - err := authAcc1.SetAccountNumber(1) - require.NoError(t, err) addr2 := sdk.AccAddress(ed25519.GenPrivKey().PubKey().Address()) authAcc2 := types.NewBaseAccountWithAddress(addr2) genAccs := types.GenesisAccounts{authAcc1, authAcc2} - require.True(t, genAccs[0].GetAccountNumber() > genAccs[1].GetAccountNumber()) - require.Equal(t, genAccs[1].GetAddress(), addr2) genAccs = types.SanitizeGenesisAccounts(genAccs) - require.False(t, genAccs[0].GetAccountNumber() > genAccs[1].GetAccountNumber()) - require.Equal(t, genAccs[1].GetAddress(), addr1) + require.False(t, genAccs[0].GetAddress().String() > genAccs[1].GetAddress().String()) } var ( diff --git a/x/auth/types/keys.go b/x/auth/types/keys.go index e0af40cb6d..70bd8542ca 100644 --- a/x/auth/types/keys.go +++ b/x/auth/types/keys.go @@ -24,9 +24,6 @@ const ( var ( // AddressStoreKeyPrefix prefix for account-by-address store AddressStoreKeyPrefix = []byte{0x01} - - // param key for global account number - GlobalAccountNumberKey = []byte("globalAccountNumber") ) // AddressStoreKey turn an address to key used to get it from the account store diff --git a/x/auth/types/params.go b/x/auth/types/params.go index bd1c4fa3ba..15bd4a44b1 100644 --- a/x/auth/types/params.go +++ b/x/auth/types/params.go @@ -15,6 +15,7 @@ const ( DefaultTxSizeCostPerByte uint64 = 10 DefaultSigVerifyCostED25519 uint64 = 590 DefaultSigVerifyCostSecp256k1 uint64 = 1000 + DefaultValidSigBlockPeriod uint64 = 100 ) // Parameter keys @@ -24,13 +25,15 @@ var ( KeyTxSizeCostPerByte = []byte("TxSizeCostPerByte") KeySigVerifyCostED25519 = []byte("SigVerifyCostED25519") KeySigVerifyCostSecp256k1 = []byte("SigVerifyCostSecp256k1") + KeyValidSigBlockPeriod = []byte("ValidSigBlockPeriod") ) var _ paramtypes.ParamSet = &Params{} // NewParams creates a new Params object func NewParams( - maxMemoCharacters, txSigLimit, txSizeCostPerByte, sigVerifyCostED25519, sigVerifyCostSecp256k1 uint64, + maxMemoCharacters, txSigLimit, txSizeCostPerByte, sigVerifyCostED25519, sigVerifyCostSecp256k1, + validSigBlockPeriod uint64, ) Params { return Params{ MaxMemoCharacters: maxMemoCharacters, @@ -38,6 +41,7 @@ func NewParams( TxSizeCostPerByte: txSizeCostPerByte, SigVerifyCostED25519: sigVerifyCostED25519, SigVerifyCostSecp256k1: sigVerifyCostSecp256k1, + ValidSigBlockPeriod: validSigBlockPeriod, } } @@ -56,6 +60,7 @@ func (p *Params) ParamSetPairs() paramtypes.ParamSetPairs { paramtypes.NewParamSetPair(KeyTxSizeCostPerByte, &p.TxSizeCostPerByte, validateTxSizeCostPerByte), paramtypes.NewParamSetPair(KeySigVerifyCostED25519, &p.SigVerifyCostED25519, validateSigVerifyCostED25519), paramtypes.NewParamSetPair(KeySigVerifyCostSecp256k1, &p.SigVerifyCostSecp256k1, validateSigVerifyCostSecp256k1), + paramtypes.NewParamSetPair(KeyValidSigBlockPeriod, &p.ValidSigBlockPeriod, validateValidSigBlockPeriod), } } @@ -67,6 +72,7 @@ func DefaultParams() Params { TxSizeCostPerByte: DefaultTxSizeCostPerByte, SigVerifyCostED25519: DefaultSigVerifyCostED25519, SigVerifyCostSecp256k1: DefaultSigVerifyCostSecp256k1, + ValidSigBlockPeriod: DefaultValidSigBlockPeriod, } } @@ -115,6 +121,19 @@ func validateSigVerifyCostSecp256k1(i interface{}) error { return nil } +func validateValidSigBlockPeriod(i interface{}) error { + v, ok := i.(uint64) + if !ok { + return fmt.Errorf("invalid parameter type: %T", i) + } + + if v == 0 { + return fmt.Errorf("invalid validSigBlockPeriod: %d", v) + } + + return nil +} + func validateMaxMemoCharacters(i interface{}) error { v, ok := i.(uint64) if !ok { @@ -158,6 +177,8 @@ func (p Params) Validate() error { if err := validateTxSizeCostPerByte(p.TxSizeCostPerByte); err != nil { return err } - + if err := validateValidSigBlockPeriod(p.ValidSigBlockPeriod); err != nil { + return err + } return nil } diff --git a/x/auth/types/params_test.go b/x/auth/types/params_test.go index c878edbc06..7750509374 100644 --- a/x/auth/types/params_test.go +++ b/x/auth/types/params_test.go @@ -26,15 +26,17 @@ func TestParams_Validate(t *testing.T) { }{ {"default params", types.DefaultParams(), nil}, {"invalid tx signature limit", types.NewParams(types.DefaultMaxMemoCharacters, 0, types.DefaultTxSizeCostPerByte, - types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1), fmt.Errorf("invalid tx signature limit: 0")}, + types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1, types.DefaultValidSigBlockPeriod), fmt.Errorf("invalid tx signature limit: 0")}, {"invalid ED25519 signature verification cost", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, - 0, types.DefaultSigVerifyCostSecp256k1), fmt.Errorf("invalid ED25519 signature verification cost: 0")}, + 0, types.DefaultSigVerifyCostSecp256k1, types.DefaultValidSigBlockPeriod), fmt.Errorf("invalid ED25519 signature verification cost: 0")}, {"invalid SECK256k1 signature verification cost", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, - types.DefaultSigVerifyCostED25519, 0), fmt.Errorf("invalid SECK256k1 signature verification cost: 0")}, + types.DefaultSigVerifyCostED25519, 0, types.DefaultValidSigBlockPeriod), fmt.Errorf("invalid SECK256k1 signature verification cost: 0")}, {"invalid max memo characters", types.NewParams(0, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, - types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1), fmt.Errorf("invalid max memo characters: 0")}, + types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1, types.DefaultValidSigBlockPeriod), fmt.Errorf("invalid max memo characters: 0")}, {"invalid tx size cost per byte", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, 0, - types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1), fmt.Errorf("invalid tx size cost per byte: 0")}, + types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1, types.DefaultValidSigBlockPeriod), fmt.Errorf("invalid tx size cost per byte: 0")}, + {"invalid valid sig block period", types.NewParams(types.DefaultMaxMemoCharacters, types.DefaultTxSigLimit, types.DefaultTxSizeCostPerByte, + types.DefaultSigVerifyCostED25519, types.DefaultSigVerifyCostSecp256k1, 0), fmt.Errorf("invalid validSigBlockPeriod: 0")}, } for _, tt := range tests { tt := tt diff --git a/x/auth/vesting/types/vesting_account.go b/x/auth/vesting/types/vesting_account.go index daf3fe3440..55f40c3b96 100644 --- a/x/auth/vesting/types/vesting_account.go +++ b/x/auth/vesting/types/vesting_account.go @@ -164,7 +164,6 @@ func (bva BaseVestingAccount) Validate() error { type vestingAccountYAML struct { Address sdk.AccAddress `json:"address" yaml:"address"` PubKey string `json:"public_key" yaml:"public_key"` - AccountNumber uint64 `json:"account_number" yaml:"account_number"` Sequence uint64 `json:"sequence" yaml:"sequence"` OriginalVesting sdk.Coins `json:"original_vesting" yaml:"original_vesting"` DelegatedFree sdk.Coins `json:"delegated_free" yaml:"delegated_free"` @@ -190,7 +189,6 @@ func (bva BaseVestingAccount) MarshalYAML() (interface{}, error) { alias := vestingAccountYAML{ Address: accAddr, - AccountNumber: bva.AccountNumber, Sequence: bva.Sequence, OriginalVesting: bva.OriginalVesting, DelegatedFree: bva.DelegatedFree, @@ -318,7 +316,6 @@ func (cva ContinuousVestingAccount) MarshalYAML() (interface{}, error) { alias := vestingAccountYAML{ Address: accAddr, - AccountNumber: cva.AccountNumber, Sequence: cva.Sequence, OriginalVesting: cva.OriginalVesting, DelegatedFree: cva.DelegatedFree, @@ -476,7 +473,6 @@ func (pva PeriodicVestingAccount) MarshalYAML() (interface{}, error) { alias := vestingAccountYAML{ Address: accAddr, - AccountNumber: pva.AccountNumber, Sequence: pva.Sequence, OriginalVesting: pva.OriginalVesting, DelegatedFree: pva.DelegatedFree, diff --git a/x/auth/vesting/types/vesting_account_test.go b/x/auth/vesting/types/vesting_account_test.go index 58e68db763..f7da227131 100644 --- a/x/auth/vesting/types/vesting_account_test.go +++ b/x/auth/vesting/types/vesting_account_test.go @@ -581,7 +581,7 @@ func TestTrackUndelegationPeriodicVestingAcc(t *testing.T) { func TestGenesisAccountValidate(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) - baseAcc := authtypes.NewBaseAccount(addr, pubkey, 0, 0) + baseAcc := authtypes.NewBaseAccount(addr, pubkey, 0) initialVesting := sdk.NewCoins(sdk.NewInt64Coin(sdk.DefaultBondDenom, 50)) baseVestingWithCoins := types.NewBaseVestingAccount(baseAcc, initialVesting, 100) tests := []struct { @@ -596,7 +596,7 @@ func TestGenesisAccountValidate(t *testing.T) { }, { "invalid base valid account", - authtypes.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0, 0), + authtypes.NewBaseAccount(addr, secp256k1.GenPrivKey().PubKey(), 0), true, }, { @@ -648,7 +648,7 @@ func TestContinuousVestingAccountMarshal(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) coins := sdk.NewCoins(sdk.NewInt64Coin("test", 5)) - baseAcc := authtypes.NewBaseAccount(addr, pubkey, 10, 50) + baseAcc := authtypes.NewBaseAccount(addr, pubkey, 50) baseVesting := types.NewBaseVestingAccount(baseAcc, coins, time.Now().Unix()) acc := types.NewContinuousVestingAccountRaw(baseVesting, baseVesting.EndTime) @@ -670,7 +670,7 @@ func TestPeriodicVestingAccountMarshal(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) coins := sdk.NewCoins(sdk.NewInt64Coin("test", 5)) - baseAcc := authtypes.NewBaseAccount(addr, pubkey, 10, 50) + baseAcc := authtypes.NewBaseAccount(addr, pubkey, 50) acc := types.NewPeriodicVestingAccount(baseAcc, coins, time.Now().Unix(), types.Periods{types.Period{3600, coins}}) @@ -691,7 +691,7 @@ func TestDelayedVestingAccountMarshal(t *testing.T) { pubkey := secp256k1.GenPrivKey().PubKey() addr := sdk.AccAddress(pubkey.Address()) coins := sdk.NewCoins(sdk.NewInt64Coin("test", 5)) - baseAcc := authtypes.NewBaseAccount(addr, pubkey, 10, 50) + baseAcc := authtypes.NewBaseAccount(addr, pubkey, 50) acc := types.NewDelayedVestingAccount(baseAcc, coins, time.Now().Unix()) diff --git a/x/bank/app_test.go b/x/bank/app_test.go index d9ea6e1f77..f0568e7fc9 100644 --- a/x/bank/app_test.go +++ b/x/bank/app_test.go @@ -25,7 +25,7 @@ type ( expSimPass bool expPass bool msgs []sdk.Msg - accNums []uint64 + sbh []uint64 accSeqs []uint64 privKeys []cryptotypes.PrivKey expectedBalances []expectedBalance @@ -103,13 +103,12 @@ func TestSendNotEnoughBalance(t *testing.T) { require.NotNil(t, res1) require.Equal(t, acc, res1.(*authtypes.BaseAccount)) - origAccNum := res1.GetAccountNumber() origSeq := res1.GetSequence() sendMsg := types.NewMsgSend(addr1, addr2, sdk.Coins{sdk.NewInt64Coin("foocoin", 100)}) header := ostproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig - _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{sendMsg}, "", []uint64{origAccNum}, []uint64{origSeq}, false, false, priv1) + _, _, err = simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, []sdk.Msg{sendMsg}, "", []uint64{0}, []uint64{origSeq}, false, false, priv1) require.Error(t, err) simapp.CheckBalance(t, app, addr1, sdk.Coins{sdk.NewInt64Coin("foocoin", 67)}) @@ -117,7 +116,6 @@ func TestSendNotEnoughBalance(t *testing.T) { res2 := app.AccountKeeper.GetAccount(app.NewContext(true, ostproto.Header{}), addr1) require.NotNil(t, res2) - require.Equal(t, res2.GetAccountNumber(), origAccNum) require.Equal(t, res2.GetSequence(), origSeq+1) } @@ -143,7 +141,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { { desc: "make a valid tx", msgs: []sdk.Msg{multiSendMsg1}, - accNums: []uint64{0}, + sbh: []uint64{0}, accSeqs: []uint64{0}, expSimPass: true, expPass: true, @@ -154,9 +152,9 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { }, }, { - desc: "wrong accNum should pass Simulate, but not Deliver", + desc: "wrong sig block height should pass Simulate, but not Deliver", msgs: []sdk.Msg{multiSendMsg1, multiSendMsg2}, - accNums: []uint64{1}, // wrong account number + sbh: []uint64{5}, // wrong sig block height accSeqs: []uint64{1}, expSimPass: true, // doesn't check signature expPass: false, @@ -165,7 +163,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { { desc: "wrong accSeq should not pass Simulate", msgs: []sdk.Msg{multiSendMsg5}, - accNums: []uint64{0}, + sbh: []uint64{0}, accSeqs: []uint64{0}, // wrong account sequence expSimPass: false, expPass: false, @@ -176,7 +174,7 @@ func TestMsgMultiSendWithAccounts(t *testing.T) { for _, tc := range testCases { header := ostproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig - _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) + _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) if tc.expPass { require.NoError(t, err) } else { @@ -212,7 +210,7 @@ func TestMsgMultiSendMultipleOut(t *testing.T) { testCases := []appTestCase{ { msgs: []sdk.Msg{multiSendMsg2}, - accNums: []uint64{0}, + sbh: []uint64{0}, accSeqs: []uint64{0}, expSimPass: true, expPass: true, @@ -228,7 +226,7 @@ func TestMsgMultiSendMultipleOut(t *testing.T) { for _, tc := range testCases { header := ostproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig - _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) + _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) require.NoError(t, err) for _, eb := range tc.expectedBalances { @@ -266,7 +264,7 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) { testCases := []appTestCase{ { msgs: []sdk.Msg{multiSendMsg3}, - accNums: []uint64{0, 2}, + sbh: []uint64{0, 0}, accSeqs: []uint64{0, 0}, expSimPass: true, expPass: true, @@ -283,7 +281,7 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) { for _, tc := range testCases { header := ostproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig - _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) + _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) require.NoError(t, err) for _, eb := range tc.expectedBalances { @@ -295,14 +293,12 @@ func TestMsgMultiSendMultipleInOut(t *testing.T) { func TestMsgMultiSendDependent(t *testing.T) { acc1 := authtypes.NewBaseAccountWithAddress(addr1) acc2 := authtypes.NewBaseAccountWithAddress(addr2) - err := acc2.SetAccountNumber(1) - require.NoError(t, err) genAccs := []authtypes.GenesisAccount{acc1, acc2} app := simapp.SetupWithGenesisAccounts(genAccs) ctx := app.BaseApp.NewContext(false, ostproto.Header{}) - err = app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 42))) + err := app.BankKeeper.SetBalances(ctx, addr1, sdk.NewCoins(sdk.NewInt64Coin("foocoin", 42))) require.NoError(t, err) app.Commit() @@ -310,7 +306,7 @@ func TestMsgMultiSendDependent(t *testing.T) { testCases := []appTestCase{ { msgs: []sdk.Msg{multiSendMsg1}, - accNums: []uint64{0}, + sbh: []uint64{0}, accSeqs: []uint64{0}, expSimPass: true, expPass: true, @@ -322,7 +318,7 @@ func TestMsgMultiSendDependent(t *testing.T) { }, { msgs: []sdk.Msg{multiSendMsg4}, - accNums: []uint64{1}, + sbh: []uint64{0}, accSeqs: []uint64{0}, expSimPass: true, expPass: true, @@ -336,7 +332,7 @@ func TestMsgMultiSendDependent(t *testing.T) { for _, tc := range testCases { header := ostproto.Header{Height: app.LastBlockHeight() + 1} txGen := simapp.MakeTestEncodingConfig().TxConfig - _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.accNums, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) + _, _, err := simapp.SignCheckDeliver(t, txGen, app.BaseApp, header, tc.msgs, "", tc.sbh, tc.accSeqs, tc.expSimPass, tc.expPass, tc.privKeys...) require.NoError(t, err) for _, eb := range tc.expectedBalances { diff --git a/x/bank/client/cli/tx.go b/x/bank/client/cli/tx.go index cf2f5d2a69..7f8db26a5e 100644 --- a/x/bank/client/cli/tx.go +++ b/x/bank/client/cli/tx.go @@ -31,7 +31,8 @@ func NewSendTxCmd() *cobra.Command { Use: "send [from_key_or_address] [to_address] [amount]", Short: `Send funds from one account to another. Note, the'--from' flag is ignored as it is implied from [from_key_or_address].`, - Args: cobra.ExactArgs(3), + Args: cobra.ExactArgs(3), + PreRun: preSendCmd, RunE: func(cmd *cobra.Command, args []string) error { cmd.Flags().Set(flags.FlagFrom, args[0]) clientCtx, err := client.GetClientTxContext(cmd) @@ -61,3 +62,9 @@ ignored as it is implied from [from_key_or_address].`, return cmd } + +func preSendCmd(cmd *cobra.Command, _ []string) { + if offline, _ := cmd.Flags().GetBool(flags.FlagOffline); offline { + cmd.MarkFlagRequired(flags.FlagSequence) + } +} diff --git a/x/bank/client/rest/tx_test.go b/x/bank/client/rest/tx_test.go index 7ebdbf304e..6ea5c683ff 100644 --- a/x/bank/client/rest/tx_test.go +++ b/x/bank/client/rest/tx_test.go @@ -75,7 +75,7 @@ func generateSendReq(from authtypes.AccountI, amount types.Coins) bankrest.SendR "some-id", "10000", fmt.Sprintf("%f", 1.0), - from.GetAccountNumber(), + 0, from.GetSequence(), types.NewCoins(), nil, diff --git a/x/bank/simulation/operations.go b/x/bank/simulation/operations.go index e15d1e67d2..3732f3fac3 100644 --- a/x/bank/simulation/operations.go +++ b/x/bank/simulation/operations.go @@ -114,7 +114,7 @@ func sendMsgSend( fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, privkeys..., ) @@ -229,7 +229,7 @@ func sendMsgMultiSend( msg *types.MsgMultiSend, ctx sdk.Context, chainID string, privkeys []cryptotypes.PrivKey, ) error { - accountNumbers := make([]uint64, len(msg.Inputs)) + sbh := make([]uint64, len(msg.Inputs)) sequenceNumbers := make([]uint64, len(msg.Inputs)) for i := 0; i < len(msg.Inputs); i++ { @@ -238,7 +238,7 @@ func sendMsgMultiSend( panic(err) } acc := ak.GetAccount(ctx, addr) - accountNumbers[i] = acc.GetAccountNumber() + sbh[i] = 0 sequenceNumbers[i] = acc.GetSequence() } @@ -271,7 +271,7 @@ func sendMsgMultiSend( fees, helpers.DefaultGenTxGas, chainID, - accountNumbers, + sbh, sequenceNumbers, privkeys..., ) diff --git a/x/bank/types/expected_keepers.go b/x/bank/types/expected_keepers.go index 9053677d4f..7ecfa1ddff 100644 --- a/x/bank/types/expected_keepers.go +++ b/x/bank/types/expected_keepers.go @@ -8,7 +8,6 @@ import ( // AccountKeeper defines the account contract that must be fulfilled when // creating a x/bank keeper. type AccountKeeper interface { - NewAccount(sdk.Context, types.AccountI) types.AccountI NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) types.AccountI GetAccount(ctx sdk.Context, addr sdk.AccAddress) types.AccountI diff --git a/x/distribution/simulation/operations.go b/x/distribution/simulation/operations.go index d96336f14a..a1a6f6329f 100644 --- a/x/distribution/simulation/operations.go +++ b/x/distribution/simulation/operations.go @@ -107,7 +107,7 @@ func SimulateMsgSetWithdrawAddress(ak types.AccountKeeper, bk types.BankKeeper, fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -159,7 +159,7 @@ func SimulateMsgWithdrawDelegatorReward(ak types.AccountKeeper, bk types.BankKee fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -214,7 +214,7 @@ func SimulateMsgWithdrawValidatorCommission(ak types.AccountKeeper, bk types.Ban fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -269,7 +269,7 @@ func SimulateMsgFundCommunityPool(ak types.AccountKeeper, bk types.BankKeeper, k fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, funder.PrivKey, ) diff --git a/x/evidence/keeper/keeper_test.go b/x/evidence/keeper/keeper_test.go index 56a11047da..aed555b3ed 100644 --- a/x/evidence/keeper/keeper_test.go +++ b/x/evidence/keeper/keeper_test.go @@ -98,7 +98,7 @@ func (suite *KeeperTestSuite) SetupTest() { for i, addr := range valAddresses { addr := sdk.AccAddress(addr) - app.AccountKeeper.SetAccount(suite.ctx, authtypes.NewBaseAccount(addr, pubkeys[i], uint64(i), 0)) + app.AccountKeeper.SetAccount(suite.ctx, authtypes.NewBaseAccount(addr, pubkeys[i], 0)) } queryHelper := baseapp.NewQueryServerTestHelper(suite.ctx, app.InterfaceRegistry()) diff --git a/x/genutil/types/expected_keepers.go b/x/genutil/types/expected_keepers.go index 0e35e24f62..7375eb0bf9 100644 --- a/x/genutil/types/expected_keepers.go +++ b/x/genutil/types/expected_keepers.go @@ -18,7 +18,6 @@ type StakingKeeper interface { // AccountKeeper defines the expected account keeper (noalias) type AccountKeeper interface { - NewAccount(sdk.Context, auth.AccountI) auth.AccountI SetAccount(sdk.Context, auth.AccountI) IterateAccounts(ctx sdk.Context, process func(auth.AccountI) (stop bool)) } diff --git a/x/gov/simulation/operations.go b/x/gov/simulation/operations.go index f1745dce3a..5fd847e331 100644 --- a/x/gov/simulation/operations.go +++ b/x/gov/simulation/operations.go @@ -149,7 +149,7 @@ func SimulateMsgSubmitProposal( fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -236,7 +236,7 @@ func SimulateMsgDeposit(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Ke fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -298,7 +298,7 @@ func operationSimulateMsgVote(ak types.AccountKeeper, bk types.BankKeeper, k kee fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) diff --git a/x/ibc/applications/transfer/spec/01_concepts.md b/x/ibc/applications/transfer/spec/01_concepts.md index 96f05f12a7..582a332813 100644 --- a/x/ibc/applications/transfer/spec/01_concepts.md +++ b/x/ibc/applications/transfer/spec/01_concepts.md @@ -31,8 +31,6 @@ acting as the "source zone". When the token is sent back to the chain it previou prefix is removed. This is a backwards movement in the token's timeline and the sender chain is acting as the "sink zone". -It is strongly recommended to read the full details of [ADR 001: Coin Source Tracing](./../../../../../docs/architecture/adr-001-coin-source-tracing.md) to understand the implications and context of the IBC token representations. - ### UX suggestions for clients For clients (wallets, exchanges, applications, block explorers, etc) that want to display the source of the token, it is recommended to use the following diff --git a/x/ibc/applications/transfer/spec/02_state.md b/x/ibc/applications/transfer/spec/02_state.md index 9cab8d677f..d75c622396 100644 --- a/x/ibc/applications/transfer/spec/02_state.md +++ b/x/ibc/applications/transfer/spec/02_state.md @@ -4,7 +4,7 @@ order: 2 # State -The transfer IBC application module keeps state of the port to which the module is binded and the denomination trace information as outlined in [ADR 01](./../../../../../docs/architecture/adr-001-coin-source-tracing.md). +The transfer IBC application module keeps state of the port to which the module is binded and the denomination trace information. - `Port`: `0x01 -> ProtocolBuffer(string)` - `DenomTrace`: `0x02 | []bytes(traceHash) -> ProtocolBuffer(DenomTrace)` diff --git a/x/ibc/applications/transfer/spec/04_messages.md b/x/ibc/applications/transfer/spec/04_messages.md index 9da7673eb3..60ab3fe040 100644 --- a/x/ibc/applications/transfer/spec/04_messages.md +++ b/x/ibc/applications/transfer/spec/04_messages.md @@ -29,7 +29,7 @@ This message is expected to fail if: - `Sender` is empty - `Receiver` is empty - `TimeoutHeight` and `TimeoutTimestamp` are both zero -- `Token.Denom` is not a valid IBC denomination as per [ADR 001 - Coin Source Tracing](./../../../../../docs/architecture/adr-001-coin-source-tracing.md). +- `Token.Denom` is not a valid IBC denomination. This message will send a fungible token to the counterparty chain represented by the counterparty Channel End connected to the Channel End with the identifiers diff --git a/x/ibc/applications/transfer/spec/06_metrics.md b/x/ibc/applications/transfer/spec/06_metrics.md index 21bb51c0a1..d36b44a950 100644 --- a/x/ibc/applications/transfer/spec/06_metrics.md +++ b/x/ibc/applications/transfer/spec/06_metrics.md @@ -4,7 +4,7 @@ order: 6 # Metrics -The transfer IBC application module exposes the following set of [metrics](./../../../../../docs/core/telemetry.md). +The transfer IBC application module exposes the following set of metrics. | Metric | Description | Unit | Type | |:--------------------------------|:------------------------------------------------------------------------------------------|:----------------|:--------| diff --git a/x/ibc/applications/transfer/spec/README.md b/x/ibc/applications/transfer/spec/README.md index 5230fdde41..c5574580c4 100644 --- a/x/ibc/applications/transfer/spec/README.md +++ b/x/ibc/applications/transfer/spec/README.md @@ -11,7 +11,7 @@ parent: This paper defines the implementation of the ICS20 protocol on the Cosmos SDK. -For the general specification please refer to the [ICS20 Specification](https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer). +For the general specification please refer to the [ICS20 Specification](https://github.com/cosmos/ics/tree/master/spec/app/ics-020-fungible-token-transfer). ## Contents diff --git a/x/ibc/core/spec/01_concepts.md b/x/ibc/core/spec/01_concepts.md index 045508999d..7e73ceaa1c 100644 --- a/x/ibc/core/spec/01_concepts.md +++ b/x/ibc/core/spec/01_concepts.md @@ -4,9 +4,6 @@ order: 1 # Concepts -> NOTE: if you are not familiar with the IBC terminology and concepts, please read -this [document](https://github.com/cosmos/ics/blob/master/ibc/1_IBC_TERMINOLOGY.md) as prerequisite reading. - ## Client Creation, Updates, and Upgrades IBC clients are on chain light clients. The light client is responsible for verifying @@ -128,7 +125,7 @@ The IBC interfaces expect an `ibcexported.Height` interface, however all clients ## Connection Handshake -The connection handshake occurs in 4 steps as defined in [ICS 03](https://github.com/cosmos/ics/tree/master/spec/ics-003-connection-semantics). +The connection handshake occurs in 4 steps as defined in [ICS 03](https://github.com/cosmos/ics/tree/master/spec/core/ics-003-connection-semantics). `ConnOpenInit` is the first attempt to initialize a connection on the executing chain. The handshake is expected to succeed if the version selected is supported. The connection @@ -207,7 +204,7 @@ versions should have a unique version identifier. ## Channel Handshake -The channel handshake occurs in 4 steps as defined in [ICS 04](https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics). +The channel handshake occurs in 4 steps as defined in [ICS 04](https://github.com/cosmos/ics/tree/master/spec/core/ics-004-channel-and-packet-semantics). `ChanOpenInit` is the first attempt to initialize a channel on top of an existing connection. The handshake is expected to succeed if the version selected for the existing connection is a @@ -355,7 +352,7 @@ Each packet is required to have at least one valid timeout field. ## Closing Channels -Closing a channel occurs in occurs in 2 handshake steps as defined in [ICS 04](https://github.com/cosmos/ics/tree/master/spec/ics-004-channel-and-packet-semantics). +Closing a channel occurs in occurs in 2 handshake steps as defined in [ICS 04](https://github.com/cosmos/ics/tree/master/spec/core/ics-004-channel-and-packet-semantics). `ChanCloseInit` will close a channel on the executing chain if the channel exists, it is not already closed and the connection it exists upon is OPEN. Channels can only be closed by a @@ -370,7 +367,7 @@ that the counterparty channel has been closed. ## Hostname Validation -Hostname validation is implemented as defined in [ICS 24](https://github.com/cosmos/ics/tree/master/spec/ics-024-host-requirements). +Hostname validation is implemented as defined in [ICS 24](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements). The 24-host sub-module parses and validates identifiers. It also builds the key paths used to store IBC related information. diff --git a/x/ibc/core/spec/02_state.md b/x/ibc/core/spec/02_state.md index 2c85a525a9..91f606f252 100644 --- a/x/ibc/core/spec/02_state.md +++ b/x/ibc/core/spec/02_state.md @@ -4,7 +4,7 @@ order: 2 # State -The paths for the values stored in state is defined [here](https://github.com/cosmos/ics/blob/master/spec/ics-024-host-requirements/README.md#path-space). +The paths for the values stored in state is defined [here](https://github.com/cosmos/ics/blob/master/spec/core/ics-024-host-requirements/README.md#path-space). Additionally, the SDK adds a prefix to the path to be able to aggregate the values for querying purposes. The client type is not stored since it can be obtained through the client state. diff --git a/x/ibc/spec/README.md b/x/ibc/spec/README.md index a699c10abd..eb626c82ca 100644 --- a/x/ibc/spec/README.md +++ b/x/ibc/spec/README.md @@ -9,7 +9,7 @@ parent: ## Abstract -This specification defines the implementation of the IBC protocol on the Cosmos SDK, the +This specification defines the implementation of the IBC protocol on the LFB SDK, the changes made to the specification and where to find each specific ICS spec within the module. @@ -31,7 +31,7 @@ For the general specification please refer to the [Interchain Standards](https:/ ## Implementation Details -As stated above, the IBC implementation on the Cosmos SDK introduces some changes +As stated above, the IBC implementation on the LFB SDK introduces some changes to the general specification, in order to avoid code duplication and to take advantage of the SDK architectural components such as the transaction routing through `Handlers`. @@ -41,44 +41,26 @@ through `Handlers`. The following list is a mapping from each Interchain Standard to their implementation in the SDK's `x/ibc` module: -* [ICS 002 - Client Semantics](https://github.com/cosmos/ics/tree/master/spec/ics-002-client-semantics): Implemented in [`x/ibc/core/02-client`](https://github.com/cosmos/tree/master/ibc/core/02-client) -* [ICS 003 - Connection Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-003-connection-semantics): Implemented in [`x/ibc/core/03-connection`](https://github.com/cosmos/tree/master/ibc/core/03-connection) -* [ICS 004 - Channel and Packet Semantics](https://github.com/cosmos/ics/blob/master/spec/ics-004-channel-and-packet-semantics): Implemented in [`x/ibc/core/04-channel`](https://github.com/cosmos/tree/master/ibc/core/04-channel) -* [ICS 005 - Port Allocation](https://github.com/cosmos/ics/blob/master/spec/ics-005-port-allocation): Implemented in [`x/ibc/core/05-port`](https://github.com/cosmos/tree/master/ibc/core/05-port) -* [ICS 006 - Solo Machine Client](https://github.com/cosmos/ics/blob/master/spec/ics-006-solo-machine-client): Implemented in [`x/ibc/light-clients/06-solomachine`](https://github.com/cosmos/tree/master/ibc/solomachine) -* [ICS 007 - Tendermint Client](https://github.com/cosmos/ics/blob/master/spec/ics-007-tendermint-client): Implemented in [`x/ibc/light-clients/07-tendermint`](https://github.com/cosmos/tree/master/ibc/light-clients/07-tendermint) -* [ICS 009 - Loopback Client](https://github.com/cosmos/ics/blob/master/spec/ics-009-loopback-client): Implemented in [`x/ibc/light-clients/09-localhost`](https://github.com/cosmos/tree/master/ibc/light-clients/09-localhost) -* [ICS 018- Relayer Algorithms](https://github.com/cosmos/ics/tree/master/spec/ics-018-relayer-algorithms): Implemented in it's own [relayer repository](https://github.com/cosmos/relayer) -* [ICS 020 - Fungible Token Transfer](https://github.com/cosmos/ics/tree/master/spec/ics-020-fungible-token-transfer): Implemented in [`x/ibc/applications/transfer`](https://github.com/cosmos/tree/master/ibc/applications/transfer) -* [ICS 023 - Vector Commitments](https://github.com/cosmos/ics/tree/master/spec/ics-023-vector-commitments): Implemented in [`x/ibc/core/23-commitment`](https://github.com/cosmos/tree/master/ibc/core/23-commitment) -* [ICS 024 - Host Requirements](https://github.com/cosmos/ics/tree/master/spec/ics-024-host-requirements): Implemented in [`x/ibc/core/24-host`](https://github.com/cosmos/tree/master/ibc/core/24-host) -* [ICS 025 - Handler Interface](https://github.com/cosmos/ics/tree/master/spec/ics-025-handler-interface): `Handler` interfaces are implemented at the top level in `x/ibc/handler.go`, +* [ICS 002 - Client Semantics](https://github.com/cosmos/ibc/tree/master/spec/core/ics-002-client-semantics): Implemented in [`x/ibc/core/02-client`](github.com/line/lfb-sdk/tree/main/x/ibc/core/02-client) +* [ICS 003 - Connection Semantics](https://github.com/cosmos/ibc/tree/master/spec/core/ics-003-connection-semantics): Implemented in [`x/ibc/core/03-connection`](github.com/line/lfb-sdk/tree/main/x/ibc/core/03-connection) +* [ICS 004 - Channel and Packet Semantics](https://github.com/cosmos/ibc/tree/master/spec/core/ics-004-channel-and-packet-semantics): Implemented in [`x/ibc/core/04-channel`](github.com/line/lfb-sdk/tree/main/x/ibc/core/04-channel) +* [ICS 005 - Port Allocation](https://github.com/cosmos/ics/blob/master/spec/core/ics-005-port-allocation): Implemented in [`x/ibc/core/05-port`](github.com/line/lfb-sdk/tree/main/x/ibc/core/05-port) +* [ICS 006 - Solo Machine Client](https://github.com/cosmos/ics/blob/master/spec/client/ics-006-solo-machine-client): Implemented in [`x/ibc/light-clients/06-solomachine`](https://github.com/line/lfb-sdk/tree/main/x/ibc/light-clients/06-solomachine) +* [ICS 007 - Tendermint Client](https://github.com/cosmos/ics/blob/master/spec/client/ics-007-tendermint-client): Implemented in [`x/ibc/light-clients/07-tendermint`](https://github.com/line/lfb-sdk/tree/main/x/ibc/light-clients/07-tendermint) +* [ICS 009 - Loopback Client](https://github.com/cosmos/ibc/tree/master/spec/client/ics-009-loopback-client): Implemented in [`x/ibc/light-clients/09-localhost`](https://github.com/line/lfb-sdk/tree/main/x/ibc/light-clients/09-localhost) +* [ICS 018- Relayer Algorithms](https://github.com/cosmos/ibc/tree/master/spec/relayer/ics-018-relayer-algorithms): Not implemented yet. +* [ICS 020 - Fungible Token Transfer](https://github.com/cosmos/ibc/tree/master/spec/app/ics-020-fungible-token-transfer): Implemented in [`x/ibc/applications/transfer`](https://github.com/line/lfb-sdk/tree/main/x/ibc/applications/transfer) +* [ICS 023 - Vector Commitments](https://github.com/cosmos/ibc/tree/master/spec/core/ics-023-vector-commitments): Implemented in [`x/ibc/core/23-commitment`](github.com/line/lfb-sdk/tree/main/x/ibc/core/23-commitment) +* [ICS 024 - Host Requirements](https://github.com/cosmos/ics/tree/master/spec/core/ics-024-host-requirements): Implemented in [`x/ibc/core/24-host`](github.com/line/lfb-sdk/tree/main/x/ibc/core/24-host) +* [ICS 025 - Handler Interface](https://github.com/cosmos/ics/tree/master/spec/core/ics-025-handler-interface): `Handler` interfaces are implemented at the top level in `x/ibc/handler.go`, which call each ICS submodule's handlers (i.e `x/ibc/*/{XX-ICS}/handler.go`). -* [ICS 026 - Routing Module](https://github.com/cosmos/ics/blob/master/spec/ics-026-routing-module): Replaced by [ADR 15 - IBC Packet Receiver](../../../docs/architecture/adr-015-ibc-packet-receiver.md). - -### Architecture Decision Records (ADR) - -The following ADR provide the design and architecture decision of IBC-related components. - -* [ADR 001 - Coin Source Tracing](../../../docs/architecture/adr-001-coin-source-tracing.md): standard to hash the ICS20's fungible token -denomination trace path in order to support special characters and limit the maximum denomination length. -* [ADR 17 - Historical Header Module](../../../docs/architecture/adr-017-historical-header-module.md): Introduces the ability to introspect past -consensus states in order to verify their membership in the counterparty clients. -* [ADR 19 - Protobuf State Encoding](../../../docs/architecture/adr-019-protobuf-state-encoding.md): Migration from Amino to Protobuf for state encoding. -* [ADR 020 - Protocol Buffer Transaction Encoding](./../../docs/architecture/adr-020-protobuf-transaction-encoding.md): Client side migration to Protobuf. -* [ADR 021 - Protocol Buffer Query Encoding](../../../docs/architecture/adr-020-protobuf-query-encoding.md): Queries migration to Protobuf. -* [ADR 026 - IBC Client Recovery Mechanisms](../../../docs/architecture/adr-026-ibc-client-recovery-mechanisms.md): Allows IBC Clients to be recovered after freezing or expiry. ### SDK Modules -* [`x/capability`](https://github.com/cosmos/tree/master/x/capability): The capability module provides object-capability keys support through scoped keepers in order to authenticate usage of ports or channels. Check [ADR 3 - Dynamic Capability Store](../../../docs/architecture/adr-003-dynamic-capability-store.md) for more details. +* [`x/capability`](https://github.com/line/lfb-sdk/tree/main/x/capability): The capability module provides object-capability keys support through scoped keepers in order to authenticate usage of ports or channels. Check [ADR 3 - Dynamic Capability Store](../../../docs/architecture/adr-003-dynamic-capability-store.md) for more details. ## IBC module architecture -> **NOTE for auditors**: If you're not familiar with the overall module structure from -the SDK modules, please check this [document](../../../docs/building-modules/structure.md) as -prerequisite reading. - For ease of auditing, every Interchain Standard has been developed in its own package. The development team separated the IBC TAO (Transport, Authentication, Ordering) ICS specifications from the IBC application level specification. The following tree describes the architecture of the directories that diff --git a/x/ibc/testing/chain.go b/x/ibc/testing/chain.go index 497db90b3f..0c8bad3886 100644 --- a/x/ibc/testing/chain.go +++ b/x/ibc/testing/chain.go @@ -124,7 +124,7 @@ func NewTestChain(t *testing.T, chainID string) *TestChain { // generate genesis account senderPrivKey := secp256k1.GenPrivKey() - acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0, 0) + acc := authtypes.NewBaseAccount(senderPrivKey.PubKey().Address().Bytes(), senderPrivKey.PubKey(), 0) balance := banktypes.Balance{ Address: acc.GetAddress().String(), Coins: sdk.NewCoins(sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(100000000000000))), @@ -294,7 +294,7 @@ func (chain *TestChain) SendMsgs(msgs ...sdk.Msg) (*sdk.Result, error) { chain.GetContext().BlockHeader(), msgs, chain.ChainID, - []uint64{chain.SenderAccount.GetAccountNumber()}, + []uint64{0}, []uint64{chain.SenderAccount.GetSequence()}, true, true, chain.senderPrivKey, ) diff --git a/x/slashing/simulation/operations.go b/x/slashing/simulation/operations.go index 6cf3207072..53608f35c8 100644 --- a/x/slashing/simulation/operations.go +++ b/x/slashing/simulation/operations.go @@ -96,7 +96,7 @@ func SimulateMsgUnjail(ak types.AccountKeeper, bk types.BankKeeper, k keeper.Kee fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) diff --git a/x/staking/simulation/operations.go b/x/staking/simulation/operations.go index e09e7828f6..5ef103e4a7 100644 --- a/x/staking/simulation/operations.go +++ b/x/staking/simulation/operations.go @@ -160,7 +160,7 @@ func SimulateMsgCreateValidator(ak types.AccountKeeper, bk types.BankKeeper, k k fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -231,7 +231,7 @@ func SimulateMsgEditValidator(ak types.AccountKeeper, bk types.BankKeeper, k kee fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -304,7 +304,7 @@ func SimulateMsgDelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper.K fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -394,7 +394,7 @@ func SimulateMsgUndelegate(ak types.AccountKeeper, bk types.BankKeeper, k keeper fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) @@ -507,7 +507,7 @@ func SimulateMsgBeginRedelegate(ak types.AccountKeeper, bk types.BankKeeper, k k fees, helpers.DefaultGenTxGas, chainID, - []uint64{account.GetAccountNumber()}, + []uint64{0}, []uint64{account.GetSequence()}, simAccount.PrivKey, ) diff --git a/x/staking/spec/01_state.md b/x/staking/spec/01_state.md index e090acb015..8df7394c0e 100644 --- a/x/staking/spec/01_state.md +++ b/x/staking/spec/01_state.md @@ -17,7 +17,7 @@ and defines overall functioning of the staking module. - Params: `Paramsspace("staking") -> legacy_amino(params)` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.1/proto/cosmos/staking/v1beta1/staking.proto#L230-L241 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L269-L284 ## Validator @@ -70,9 +70,7 @@ is updated during the validator set update process which takes place in [`EndBlo Each validator's state is stored in a `Validator` struct: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L65-L99 - -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L24-L63 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L83-L120 ## Delegation @@ -86,7 +84,7 @@ funds are held in a `Delegation` data structure. It is owned by one delegator, and is associated with the shares for one validator. The sender of the transaction is the owner of the bond. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L159-L170 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L183-L194 ### Delegator Shares @@ -125,7 +123,7 @@ slashed. A UnbondingDelegation object is created every time an unbonding is initiated. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L172-L198 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L198-L209 ## Redelegation @@ -153,7 +151,7 @@ A redelegation object is created every time a redelegation occurs. To prevent - and, the (re)delegator is attempting to create a _new_ redelegation where the source validator for this new redelegation is `Validator-X`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L200-L228 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L253-L266 ## Queues @@ -168,14 +166,14 @@ used is a slight modification of the RFC3339Nano and uses the the format string In all cases, the stored timestamp represents the maturation time of the queue element. -### UnbondingDelegationQueue +### UnbondingDelegationEntry For the purpose of tracking progress of unbonding delegations the unbonding delegations queue is kept. - UnbondingDelegation: `0x41 | format(time) -> []DVPair` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L123-L133 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L212-L229 ### RedelegationQueue @@ -184,7 +182,7 @@ kept. - UnbondingDelegation: `0x42 | format(time) -> []DVVTriplet` -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L140-L152 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L232-L249 ### ValidatorQueue @@ -203,7 +201,7 @@ that multiple validators exist in the queue at the same location. HistoricalInfo objects are stored and pruned at each block such that the staking keeper persists the `n` most recent historical info defined by staking module parameter: `HistoricalEntries`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/staking.proto#L15-L22 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/staking.proto#L19-L22 At each BeginBlock, the staking keeper will persist the current Header and the Validators that committed the current block in a `HistoricalInfo` object. The Validators are sorted on their address to ensure that diff --git a/x/staking/spec/03_messages.md b/x/staking/spec/03_messages.md index 1155da93d9..ebeed3e11e 100644 --- a/x/staking/spec/03_messages.md +++ b/x/staking/spec/03_messages.md @@ -10,9 +10,9 @@ In this section we describe the processing of the staking messages and the corre A validator is created using the `Msg/CreateValidator` service message. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L16-L17 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L16-L17 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L35-L51 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L36-L51 This service message is expected to fail if: @@ -35,9 +35,9 @@ in the first end-block. The `Description`, `CommissionRate` of a validator can be updated using the `Msg/EditCandidacy` service message. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L19-L20 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L19-L20 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L56-L76 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L56-L76 This service message is expected to fail if: @@ -54,9 +54,9 @@ Within this service message the delegator provides coins, and in return receives some amount of their validator's (newly created) delegator-shares that are assigned to `Delegation.Shares`. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L22-L24 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L22-L24 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L81-L90 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L81-L90 This service message is expected to fail if: @@ -73,13 +73,13 @@ exist than it is created as part of this service message otherwise the existing The `Msg/Undelegate` service message allows delegators to undelegate their tokens from validator. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L30-L32 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L30-L32 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L112-L121 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L112-L121 This service message returns a response containing the completion time of the undelegation: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L123-L126 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L123-L126 This service message is expected to fail if: @@ -106,13 +106,13 @@ The redelegation command allows delegators to instantly switch validators. Once the unbonding period has passed, the redelegation is automatically completed in the EndBlocker. -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L26-L28 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L26-L28 -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L95-L105 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L95-L105 This service message returns a response containing the completion time of the redelegation: -+++ https://github.com/cosmos/cosmos-sdk/blob/v0.40.0/proto/cosmos/staking/v1beta1/tx.proto#L107-L110 ++++ https://github.com/line/lfb-sdk/blob/main/proto/lfb/staking/v1beta1/tx.proto#L107-L110 This service message is expected to fail if: diff --git a/x/wasm/CHANGELOG.md b/x/wasm/CHANGELOG.md index 16425b347e..22e81f1af7 100644 --- a/x/wasm/CHANGELOG.md +++ b/x/wasm/CHANGELOG.md @@ -13,6 +13,7 @@ - Add tests for managing max contract size (#51) ### Changed +- Replace links to original CosmWasm code with ours (#244) - Change used marshal/unmarshal from json.(Un)Marshal -> codec.(Un)Marshal (#37) - Change the max size of contract managed with the parameter module (#44) - Update linkwasmd to follow CosmWasm's wasmd v0.11.1 (#65) diff --git a/x/wasm/README.md b/x/wasm/README.md deleted file mode 100644 index 302653fcfc..0000000000 --- a/x/wasm/README.md +++ /dev/null @@ -1,219 +0,0 @@ -# Wasm Module - -This should be a brief overview of the functionality - -## Configuration - -You can add the following section to `config/app.toml`: - -```toml -[wasm] -# This is the maximum sdk gas (wasm and storage) that we allow for any x/wasm "smart" queries -query_gas_limit = 300000 -# This defines the memory size for Wasm modules that we can keep cached to speed-up instantiation -# The value is in MiB not bytes -memory_cache_size = 300 -``` - -The values can also be set via CLI flags on with the `start` command: -```shell script ---wasm.memory_cache_size uint32 Sets the size in MiB (NOT bytes) of an in-memory cache for wasm modules. Set to 0 to disable. (default 100) ---wasm.query_gas_limit uint Set the max gas that can be spent on executing a query with a Wasm contract (default 3000000) -``` - -## Events - -A number of events are returned to allow good indexing of the transactions from smart contracts. - -Every call to Instantiate or Execute will be tagged with the info on the contract that was executed and who executed it. -It should look something like this (with different addresses). The module is always `wasm`, and `code_id` is only present -when Instantiating a contract, so you can subscribe to new instances, it is omitted on Execute. There is also an `action` tag -which is auto-added by the Cosmos SDK and has a value of either `store-code`, `instantiate` or `execute` depending on which message -was sent: - -```json -{ - "Type": "message", - "Attr": [ - { - "key": "module", - "value": "wasm" - }, - { - "key": "action", - "value": "instantiate" - }, - { - "key": "signer", - "value": "cosmos1vx8knpllrj7n963p9ttd80w47kpacrhuts497x" - }, - { - "key": "code_id", - "value": "1" - }, - { - "key": "contract_address", - "value": "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5" - } - ] -} -``` - -If any funds were transferred to the contract as part of the message, or if the contract released funds as part of it's executions, -it will receive the typical events associated with sending tokens from bank. In this case, we instantiate the contract and -provide a initial balance in the same `MsgInstantiateContract`. We see the following events in addition to the above one: - -```json -[ - { - "Type": "transfer", - "Attr": [ - { - "key": "recipient", - "value": "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5" - }, - { - "key": "sender", - "value": "cosmos1ffnqn02ft2psvyv4dyr56nnv6plllf9pm2kpmv" - }, - { - "key": "amount", - "value": "100000denom" - } - ] - } -] -``` - -Finally, the contract itself can emit a "custom event" on Execute only (not on Init). -There is one event per contract, so if one contract calls a second contract, you may receive -one event for the original contract and one for the re-invoked contract. All attributes from the contract are passed through verbatim, -and we add a `contract_address` attribute that contains the actual contract that emitted that event. -Here is an example from the escrow contract successfully releasing funds to the destination address: - -```json -{ - "Type": "wasm", - "Attr": [ - { - "key": "contract_address", - "value": "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5" - }, - { - "key": "action", - "value": "release" - }, - { - "key": "destination", - "value": "cosmos14k7v7ms4jxkk2etmg9gljxjm4ru3qjdugfsflq" - } - ] -} -``` - -### Pulling this all together - -We will invoke an escrow contract to release to the designated beneficiary. -The escrow was previously loaded with `100000denom` (from the above example). -In this transaction, we send `5000denom` along with the `MsgExecuteContract` -and the contract releases the entire funds (`105000denom`) to the beneficiary. - -We will see all the following events, where you should be able to reconstruct the actions -(remember there are two events for each transfer). We see (1) the initial transfer of funds -to the contract, (2) the contract custom event that it released funds (3) the transfer of funds -from the contract to the beneficiary and (4) the generic x/wasm event stating that the contract -was executed (which always appears, while 2 is optional and has information as reliable as the contract): - -```json -[ - { - "Type": "transfer", - "Attr": [ - { - "key": "recipient", - "value": "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5" - }, - { - "key": "sender", - "value": "cosmos1zm074khx32hqy20hlshlsd423n07pwlu9cpt37" - }, - { - "key": "amount", - "value": "5000denom" - } - ] - }, - { - "Type": "wasm", - "Attr": [ - { - "key": "contract_address", - "value": "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5" - }, - { - "key": "action", - "value": "release" - }, - { - "key": "destination", - "value": "cosmos14k7v7ms4jxkk2etmg9gljxjm4ru3qjdugfsflq" - } - ] - }, - { - "Type": "transfer", - "Attr": [ - { - "key": "recipient", - "value": "cosmos14k7v7ms4jxkk2etmg9gljxjm4ru3qjdugfsflq" - }, - { - "key": "sender", - "value": "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5" - }, - { - "key": "amount", - "value": "105000denom" - } - ] - }, - { - "Type": "message", - "Attr": [ - { - "key": "module", - "value": "wasm" - }, - { - "key": "action", - "value": "execute" - }, - { - "key": "signer", - "value": "cosmos1zm074khx32hqy20hlshlsd423n07pwlu9cpt37" - }, - { - "key": "contract_address", - "value": "cosmos18vd8fpwxzck93qlwghaj6arh4p7c5n89uzcee5" - } - ] - } -] -``` - -A note on this format. This is what we return from our module. However, it seems to me that many events with the same `Type` -get merged together somewhere along the stack, so in this case, you *may* end up with one "transfer" event with the info for -both transfers. Double check when evaluating the event logs, I will document better with more experience, especially when I -find out the entire path for the events. - -## Messages - -TODO - -## CLI - -TODO - working, but not the nicest interface (json + bash = bleh). Use to upload, but I suggest to focus on frontend / js tooling - -## Rest - -TODO - main supported interface, under rapid change diff --git a/x/wasm/alias.go b/x/wasm/alias.go index 5c423abe04..92cf34841d 100644 --- a/x/wasm/alias.go +++ b/x/wasm/alias.go @@ -1,8 +1,4 @@ // nolint -// autogenerated code using github.com/rigelrozanski/multitool -// aliases generated for the following subdirectories: -// ALIASGEN: github.com/Cosmwasm/wasmd/x/wasm/types -// ALIASGEN: github.com/CosmWasm/wasmd/x/wasm/keeper package wasm import ( @@ -29,7 +25,6 @@ const ( ProposalTypeMigrateContract = types.ProposalTypeMigrateContract ProposalTypeUpdateAdmin = types.ProposalTypeUpdateAdmin ProposalTypeClearAdmin = types.ProposalTypeClearAdmin - MaxGas = keeper.MaxGas QueryListContractByCode = keeper.QueryListContractByCode QueryGetContract = keeper.QueryGetContract QueryGetContractState = keeper.QueryGetContractState diff --git a/x/wasm/genesis_test.go b/x/wasm/genesis_test.go index abf87cd229..e10c004ba4 100644 --- a/x/wasm/genesis_test.go +++ b/x/wasm/genesis_test.go @@ -22,7 +22,7 @@ func TestInitGenesis(t *testing.T) { msg := MsgStoreCode{ Sender: creator.String(), WASMByteCode: testContract, - Source: "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/hackatom.wasm", + Source: "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", Builder: "confio/cosmwasm-opt:0.7.0", } err := msg.ValidateBasic() @@ -58,7 +58,7 @@ func TestInitGenesis(t *testing.T) { } res, err = h(data.ctx, &execCmd) require.NoError(t, err) - // from https://github.com/CosmWasm/cosmwasm/blob/master/contracts/hackatom/src/contract.rs#L167 + // executing https://github.com/line/cosmwasm/blob/main/contracts/hackatom/src/contract.rs do_release assertExecuteResponse(t, res.Data, []byte{0xf0, 0x0b, 0xaa}) // ensure all contract state is as after init diff --git a/x/wasm/keeper/keeper.go b/x/wasm/keeper/keeper.go index 3a4ea48180..9b6bce1c4f 100644 --- a/x/wasm/keeper/keeper.go +++ b/x/wasm/keeper/keeper.go @@ -21,11 +21,6 @@ import ( wasmvmtypes "github.com/line/wasmvm/types" ) -// MaxGas for a contract is 10 billion wasmer gas (enforced in rust to prevent overflow) -// The limit for v0.9.3 is defined here: https://github.com/CosmWasm/cosmwasm/blob/v0.9.3/packages/vm/src/backends/singlepass.rs#L15-L23 -// (this will be increased in future releases) -const MaxGas = 10_000_000_000 - // contractMemoryLimit is the memory limit of each contract execution (in MiB) // constant value so all nodes run with the same limit. const contractMemoryLimit = 32 @@ -874,9 +869,6 @@ func gasForContract(ctx sdk.Context, gasMultiplier uint64) uint64 { return 0 } remaining := (meter.Limit() - meter.GasConsumedToLimit()) * gasMultiplier - if remaining > MaxGas { - return MaxGas - } return remaining } @@ -1010,7 +1002,8 @@ func (k Keeper) QueryGasLimit() sdk.Gas { } // BankCoinTransferrer replicates the cosmos-sdk behaviour as in -// https://github.com/cosmos/cosmos-sdk/blob/v0.41.4/x/bank/keeper/msg_server.go#L26 +// lfb-sdk's x/bank/keeper/msg_server.go Send +// (https://github.com/line/lfb-sdk/blob/2a5a2d2c885b03e278bcd67546d4f21e74614ead/x/bank/keeper/msg_server.go#L26) type BankCoinTransferrer struct { keeper types.BankKeeper } diff --git a/x/wasm/keeper/keeper_test.go b/x/wasm/keeper/keeper_test.go index faecb5c2fb..c695f3e694 100644 --- a/x/wasm/keeper/keeper_test.go +++ b/x/wasm/keeper/keeper_test.go @@ -39,7 +39,7 @@ func TestCreate(t *testing.T) { wasmCode, err := ioutil.ReadFile("./testdata/hackatom.wasm") require.NoError(t, err) - contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "any/builder:tag", nil) + contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "any/builder:tag", nil) require.NoError(t, err) require.Equal(t, uint64(1), contractID) // and verify content @@ -92,7 +92,7 @@ func TestCreateStoresInstantiatePermission(t *testing.T) { }) fundAccounts(t, ctx, accKeeper, bankKeeper, myAddr, deposit) - codeID, err := keeper.Create(ctx, myAddr, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "any/builder:tag", nil) + codeID, err := keeper.Create(ctx, myAddr, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "any/builder:tag", nil) require.NoError(t, err) codeInfo := keepers.WasmKeeper.GetCodeInfo(ctx, codeID) @@ -140,7 +140,7 @@ func TestCreateWithParamPermissions(t *testing.T) { params := types.DefaultParams() params.CodeUploadAccess = spec.srcPermission keepers.WasmKeeper.setParams(ctx, params) - _, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "any/builder:tag", nil) + _, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/keeper/testdata/hackatom.wasm", "any/builder:tag", nil) require.True(t, spec.expError.Is(err), err) if spec.expError != nil { return @@ -160,12 +160,12 @@ func TestCreateDuplicate(t *testing.T) { require.NoError(t, err) // create one copy - contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "any/builder:tag", nil) + contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "any/builder:tag", nil) require.NoError(t, err) require.Equal(t, uint64(1), contractID) // create second copy - duplicateID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "any/builder:tag", nil) + duplicateID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "any/builder:tag", nil) require.NoError(t, err) require.Equal(t, uint64(2), duplicateID) @@ -192,14 +192,14 @@ func TestCreateWithSimulation(t *testing.T) { require.NoError(t, err) // create this once in simulation mode - contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "any/builder:tag", nil) + contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/keeper/testdata/hackatom.wasm", "any/builder:tag", nil) require.NoError(t, err) require.Equal(t, uint64(1), contractID) // then try to create it in non-simulation mode (should not fail) ctx, keepers = CreateTestInput(t, false, SupportedFeatures, nil, nil) - accKeeper, keeper = keepers.AccountKeeper, keepers.ContractKeeper - contractID, err = keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "any/builder:tag", nil) + accKeeper, keeper = keepers.AccountKeeper, keepers.WasmKeeper + contractID, err = keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/keeper/testdata/hackatom.wasm", "any/builder:tag", nil) require.NoError(t, err) require.Equal(t, uint64(1), contractID) @@ -244,7 +244,7 @@ func TestCreateWithGzippedPayload(t *testing.T) { wasmCode, err := ioutil.ReadFile("./testdata/hackatom.wasm.gzip") require.NoError(t, err) - contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "", nil) + contractID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "", nil) require.NoError(t, err) require.Equal(t, uint64(1), contractID) // and verify content @@ -265,7 +265,7 @@ func TestInstantiate(t *testing.T) { wasmCode, err := ioutil.ReadFile("./testdata/hackatom.wasm") require.NoError(t, err) - codeID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "", nil) + codeID, err := keeper.Create(ctx, creator, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "", nil) require.NoError(t, err) _, _, bob := keyPubAddr() @@ -349,7 +349,7 @@ func TestInstantiateWithDeposit(t *testing.T) { if spec.fundAddr { fundAccounts(t, ctx, accKeeper, bankKeeper, spec.srcActor, sdk.NewCoins(sdk.NewInt64Coin("denom", 200))) } - contractID, err := keeper.Create(ctx, spec.srcActor, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "", nil) + contractID, err := keeper.Create(ctx, spec.srcActor, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "", nil) require.NoError(t, err) // when @@ -417,7 +417,7 @@ func TestInstantiateWithPermissions(t *testing.T) { accKeeper, bankKeeper, keeper := keepers.AccountKeeper, keepers.BankKeeper, keepers.ContractKeeper fundAccounts(t, ctx, accKeeper, bankKeeper, spec.srcActor, deposit) - contractID, err := keeper.Create(ctx, myAddr, wasmCode, "https://github.com/CosmWasm/wasmd/blob/master/x/wasm/testdata/escrow.wasm", "", &spec.srcPermission) + contractID, err := keeper.Create(ctx, myAddr, wasmCode, "https://github.com/line/lfb-sdk/blob/main/x/wasm/internal/keeper/testdata/hackatom.wasm", "", &spec.srcPermission) require.NoError(t, err) _, _, err = keepers.ContractKeeper.Instantiate(ctx, contractID, spec.srcActor, nil, initMsgBz, "demo contract 1", nil) diff --git a/x/wasm/keeper/query_plugins.go b/x/wasm/keeper/query_plugins.go index 99288da44a..5608e01d00 100644 --- a/x/wasm/keeper/query_plugins.go +++ b/x/wasm/keeper/query_plugins.go @@ -390,7 +390,8 @@ func sdkToDelegations(ctx sdk.Context, keeper types.StakingKeeper, delegations [ } // shares to amount logic comes from here: - // https://github.com/cosmos/cosmos-sdk/blob/v0.38.3/x/staking/keeper/querier.go#L404 + // x/staking/keeper/querier.go DelegationToDelegationResponse + /// https://github.com/line/lfb-sdk/blob/3ccf3913f53e2a9ccb4be8429bee32e67669e89a/x/staking/keeper/querier.go#L450 val, found := keeper.GetValidator(ctx, valAddr) if !found { return nil, sdkerrors.Wrap(stakingtypes.ErrNoValidatorFound, "can't load validator for delegation") @@ -425,7 +426,7 @@ func sdkToFullDelegation(ctx sdk.Context, keeper types.StakingKeeper, distKeeper delegationCoins := convertSdkCoinToWasmCoin(amount) // FIXME: this is very rough but better than nothing... - // https://github.com/CosmWasm/wasmd/issues/282 + // https://github.com/line/lfb-sdk/issues/225 // if this (val, delegate) pair is receiving a redelegation, it cannot redelegate more // otherwise, it can redelegate the full amount // (there are cases of partial funds redelegated, but this is a start) diff --git a/x/wasm/keeper/relay_test.go b/x/wasm/keeper/relay_test.go index 60c7747417..7946401b14 100644 --- a/x/wasm/keeper/relay_test.go +++ b/x/wasm/keeper/relay_test.go @@ -3,6 +3,7 @@ package keeper import ( "encoding/json" "errors" + "math" "testing" sdk "github.com/line/lfb-sdk/types" @@ -33,7 +34,7 @@ func TestOnOpenChannel(t *testing.T) { }, "consume max gas": { contractAddr: example.Contract, - contractGas: MaxGas, + contractGas: math.MaxUint64 / types.DefaultGasMultiplier, }, "consume gas on error": { contractAddr: example.Contract, diff --git a/x/wasm/keeper/submsg_test.go b/x/wasm/keeper/submsg_test.go index 5103e83d80..3420a054a6 100644 --- a/x/wasm/keeper/submsg_test.go +++ b/x/wasm/keeper/submsg_test.go @@ -263,7 +263,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { submsgID: 5, msg: validBankSend, // note we charge another 40k for the reply call - resultAssertions: []assertion{assertReturnedEvents(3), assertGasUsed(121000, 134000)}, + resultAssertions: []assertion{assertReturnedEvents(3), assertGasUsed(118000, 130000)}, }, "not enough tokens": { submsgID: 6, @@ -283,7 +283,7 @@ func TestDispatchSubMsgErrorHandling(t *testing.T) { msg: validBankSend, gasLimit: &subGasLimit, // uses same gas as call without limit - resultAssertions: []assertion{assertReturnedEvents(3), assertGasUsed(121000, 134000)}, + resultAssertions: []assertion{assertReturnedEvents(3), assertGasUsed(118000, 130000)}, }, "not enough tokens with limit": { submsgID: 16, diff --git a/x/wasm/keeper/test_common.go b/x/wasm/keeper/test_common.go index 2e61f07f17..dcdd7c6e24 100644 --- a/x/wasm/keeper/test_common.go +++ b/x/wasm/keeper/test_common.go @@ -258,7 +258,7 @@ func createTestInput( distKeeper.SetFeePool(ctx, distributiontypes.InitialFeePool()) // set some funds ot pay out validatores, based on code from: - // https://github.com/cosmos/cosmos-sdk/blob/fea231556aee4d549d7551a6190389c4328194eb/x/distribution/keeper/keeper_test.go#L50-L57 + // https://github.com/line/lfb-sdk/blob/95b22d3a685f7eb531198e0023ef06873835e632/x/distribution/keeper/keeper_test.go#L49-L56 distrAcc := distKeeper.GetDistributionAccount(ctx) err := bankKeeper.SetBalances(ctx, distrAcc.GetAddress(), sdk.NewCoins( sdk.NewCoin("stake", sdk.NewInt(2000000)), diff --git a/x/wasm/linkwasmd/app/app.go b/x/wasm/linkwasmd/app/app.go index fb51331582..0eb32f848b 100644 --- a/x/wasm/linkwasmd/app/app.go +++ b/x/wasm/linkwasmd/app/app.go @@ -107,7 +107,7 @@ var ( ProposalsEnabled = "false" // If set to non-empty string it must be comma-separated list of values that are all a subset // of "EnableAllProposals" (takes precedence over ProposalsEnabled) - // https://github.com/CosmWasm/wasmd/blob/02a54d33ff2c064f3539ae12d75d027d9c665f05/x/wasm/internal/types/proposal.go#L28-L34 + // "EnableAllProposals" is defined in internal/types/proposal.go EnableSpecificProposals = "" ) diff --git a/x/wasm/linkwasmd/app/params/doc.go b/x/wasm/linkwasmd/app/params/doc.go index ce25702b26..b3c32ed985 100644 --- a/x/wasm/linkwasmd/app/params/doc.go +++ b/x/wasm/linkwasmd/app/params/doc.go @@ -1,5 +1,5 @@ /* -Package params defines the simulation parameters in the gaia. +Package params defines the simulation parameters in the lfb. It contains the default weights used for each transaction used on the module's simulation. These weights define the chance for a transaction to be simulated at any gived operation. diff --git a/x/wasm/module_test.go b/x/wasm/module_test.go index e5335d0ea9..066045f2b5 100644 --- a/x/wasm/module_test.go +++ b/x/wasm/module_test.go @@ -446,7 +446,7 @@ func TestHandleExecute(t *testing.T) { } res, err = h(data.ctx, &execCmd) require.NoError(t, err) - // from https://github.com/CosmWasm/cosmwasm/blob/master/contracts/hackatom/src/contract.rs#L167 + // executing https://github.com/line/cosmwasm/blob/main/contracts/hackatom/src/contract.rs do_release assertExecuteResponse(t, res.Data, []byte{0xf0, 0x0b, 0xaa}) // this should be standard x/wasm init event, plus 2 bank send event, plus a special event from the contract @@ -547,7 +547,7 @@ func TestHandleExecuteEscrow(t *testing.T) { } res, err = h(data.ctx, &execCmd) require.NoError(t, err) - // from https://github.com/CosmWasm/cosmwasm/blob/master/contracts/hackatom/src/contract.rs#L167 + // executing https://github.com/line/cosmwasm/blob/main/contracts/hackatom/src/contract.rs do_release assertExecuteResponse(t, res.Data, []byte{0xf0, 0x0b, 0xaa}) // ensure bob now exists and got both payments released diff --git a/x/wasm/types/expected_keepers.go b/x/wasm/types/expected_keepers.go index 4c73591552..b5fb94c8db 100644 --- a/x/wasm/types/expected_keepers.go +++ b/x/wasm/types/expected_keepers.go @@ -35,7 +35,7 @@ type BankKeeper interface { // AccountKeeper defines a subset of methods implemented by the cosmos-sdk account keeper type AccountKeeper interface { - // Return a new account with the next account number and the specified address. Does not save the new account to the store. + // Return a new account with the specified address. Does not save the new account to the store. NewAccountWithAddress(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI // Retrieve an account from the store. GetAccount(ctx sdk.Context, addr sdk.AccAddress) authtypes.AccountI diff --git a/x/wasm/types/params.go b/x/wasm/types/params.go index daa4061a21..dcec948e5c 100644 --- a/x/wasm/types/params.go +++ b/x/wasm/types/params.go @@ -18,7 +18,8 @@ const ( // DefaultMaxWasmCodeSize limit max bytes read to prevent gzip bombs DefaultMaxWasmCodeSize = 600 * 1024 // GasMultiplier is how many cosmwasm gas points = 1 sdk gas point - // SDK reference costs can be found here: https://github.com/cosmos/cosmos-sdk/blob/02c6c9fafd58da88550ab4d7d494724a477c8a68/store/types/gas.go#L153-L164 + // SDK reference costs is defined in x/store/types/gas.go KVGasConfig() + // https://github.com/line/lfb-sdk/blob/main/store/types/gas.go // A write at ~3000 gas and ~200us = 10 gas per us (microsecond) cpu/io // Rough timing have 88k gas at 90us, which is equal to 1k sdk gas... (one read) //