docs: Update v0.34.x to prepare for v0.37 (#9244)

* Ignore generated/copied RPC docs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync vuepress config with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs package-lock.json with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs redirects with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs versions with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update OpenAPI version to v0.34

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync DOCS_README with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update all v0.34.x docs references from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update v0.34 OpenAPI references from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update repo doc links from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update code comment references from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update repo root doc links from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update repo root doc links for docs.tendermint.com from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Build v0.34.x as "latest"

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Explicitly mark v0.34 docs as latest in version selector

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add nav link to main and clearly mark as unstable

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Direct all docs.tendermint.com links to v0.34 on v0.34.x

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update all relevant links on v0.34.x branch to be v0.34-specific

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update changelog refs to docs.tendermint.com

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update remaining GH master link to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs build and nav config with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Migrate spec links to GitHub repo from docs site

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
This commit is contained in:
Thane Thomson
2022-08-19 07:20:32 -04:00
committed by GitHub
parent a41c5eec11
commit eed27addec
67 changed files with 251 additions and 245 deletions

View File

@@ -9,7 +9,7 @@ import (
)
// ABCIQuery queries the application for some information.
// More: https://docs.tendermint.com/master/rpc/#/ABCI/abci_query
// More: https://docs.tendermint.com/v0.34/rpc/#/ABCI/abci_query
func ABCIQuery(
ctx *rpctypes.Context,
path string,
@@ -31,7 +31,7 @@ func ABCIQuery(
}
// ABCIInfo gets some info about the application.
// More: https://docs.tendermint.com/master/rpc/#/ABCI/abci_info
// More: https://docs.tendermint.com/v0.34/rpc/#/ABCI/abci_info
func ABCIInfo(ctx *rpctypes.Context) (*ctypes.ResultABCIInfo, error) {
resInfo, err := env.ProxyAppQuery.InfoSync(proxy.RequestInfo)
if err != nil {

View File

@@ -15,7 +15,7 @@ import (
// BlockchainInfo gets block headers for minHeight <= height <= maxHeight.
// Block headers are returned in descending order (highest first).
// More: https://docs.tendermint.com/master/rpc/#/Info/blockchain
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/blockchain
func BlockchainInfo(ctx *rpctypes.Context, minHeight, maxHeight int64) (*ctypes.ResultBlockchainInfo, error) {
// maximum 20 block metas
const limit int64 = 20
@@ -77,7 +77,7 @@ func filterMinMax(base, height, min, max, limit int64) (int64, int64, error) {
// Block gets block at a given height.
// If no height is provided, it will fetch the latest block.
// More: https://docs.tendermint.com/master/rpc/#/Info/block
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/block
func Block(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlock, error) {
height, err := getHeight(env.BlockStore.Height(), heightPtr)
if err != nil {
@@ -93,7 +93,7 @@ func Block(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlock, error)
}
// BlockByHash gets block by hash.
// More: https://docs.tendermint.com/master/rpc/#/Info/block_by_hash
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/block_by_hash
func BlockByHash(ctx *rpctypes.Context, hash []byte) (*ctypes.ResultBlock, error) {
block := env.BlockStore.LoadBlockByHash(hash)
if block == nil {
@@ -106,7 +106,7 @@ func BlockByHash(ctx *rpctypes.Context, hash []byte) (*ctypes.ResultBlock, error
// Commit gets block commit at a given height.
// If no height is provided, it will fetch the commit for the latest block.
// More: https://docs.tendermint.com/master/rpc/#/Info/commit
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/commit
func Commit(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultCommit, error) {
height, err := getHeight(env.BlockStore.Height(), heightPtr)
if err != nil {
@@ -138,7 +138,7 @@ func Commit(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultCommit, erro
// Results are for the height of the block containing the txs.
// Thus response.results.deliver_tx[5] is the results of executing
// getBlock(h).Txs[5]
// More: https://docs.tendermint.com/master/rpc/#/Info/block_results
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/block_results
func BlockResults(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultBlockResults, error) {
height, err := getHeight(env.BlockStore.Height(), heightPtr)
if err != nil {

View File

@@ -14,7 +14,7 @@ import (
// validators are sorted by their voting power - this is the canonical order
// for the validators in the set as used in computing their Merkle root.
//
// More: https://docs.tendermint.com/master/rpc/#/Info/validators
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/validators
func Validators(ctx *rpctypes.Context, heightPtr *int64, pagePtr, perPagePtr *int) (*ctypes.ResultValidators, error) {
// The latest validator that we know is the NextValidator of the last block.
height, err := getHeight(latestUncommittedHeight(), heightPtr)
@@ -47,7 +47,7 @@ func Validators(ctx *rpctypes.Context, heightPtr *int64, pagePtr, perPagePtr *in
// DumpConsensusState dumps consensus state.
// UNSTABLE
// More: https://docs.tendermint.com/master/rpc/#/Info/dump_consensus_state
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/dump_consensus_state
func DumpConsensusState(ctx *rpctypes.Context) (*ctypes.ResultDumpConsensusState, error) {
// Get Peer consensus states.
peers := env.P2PPeers.Peers().List()
@@ -80,7 +80,7 @@ func DumpConsensusState(ctx *rpctypes.Context) (*ctypes.ResultDumpConsensusState
// ConsensusState returns a concise summary of the consensus state.
// UNSTABLE
// More: https://docs.tendermint.com/master/rpc/#/Info/consensus_state
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/consensus_state
func ConsensusState(ctx *rpctypes.Context) (*ctypes.ResultConsensusState, error) {
// Get self round state.
bz, err := env.ConsensusState.GetRoundStateSimpleJSON()
@@ -89,7 +89,7 @@ func ConsensusState(ctx *rpctypes.Context) (*ctypes.ResultConsensusState, error)
// ConsensusParams gets the consensus parameters at the given block height.
// If no height is provided, it will fetch the latest consensus params.
// More: https://docs.tendermint.com/master/rpc/#/Info/consensus_params
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/consensus_params
func ConsensusParams(ctx *rpctypes.Context, heightPtr *int64) (*ctypes.ResultConsensusParams, error) {
// The latest consensus params that we know is the consensus params after the
// last block.

View File

@@ -2,7 +2,7 @@
Package core defines the Tendermint RPC endpoints.
Tendermint ships with its own JSONRPC library -
https://github.com/tendermint/tendermint/tree/master/rpc/jsonrpc.
https://github.com/tendermint/tendermint/tree/v0.34.x/rpc/jsonrpc.
## Get the list

View File

@@ -19,7 +19,7 @@ const (
)
// Subscribe for events via WebSocket.
// More: https://docs.tendermint.com/master/rpc/#/Websocket/subscribe
// More: https://docs.tendermint.com/v0.34/rpc/#/Websocket/subscribe
func Subscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultSubscribe, error) {
addr := ctx.RemoteAddr()
@@ -102,7 +102,7 @@ func Subscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultSubscribe, er
}
// Unsubscribe from events via WebSocket.
// More: https://docs.tendermint.com/master/rpc/#/Websocket/unsubscribe
// More: https://docs.tendermint.com/v0.34/rpc/#/Websocket/unsubscribe
func Unsubscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultUnsubscribe, error) {
addr := ctx.RemoteAddr()
env.Logger.Info("Unsubscribe from query", "remote", addr, "query", query)
@@ -118,7 +118,7 @@ func Unsubscribe(ctx *rpctypes.Context, query string) (*ctypes.ResultUnsubscribe
}
// UnsubscribeAll from all events via WebSocket.
// More: https://docs.tendermint.com/master/rpc/#/Websocket/unsubscribe_all
// More: https://docs.tendermint.com/v0.34/rpc/#/Websocket/unsubscribe_all
func UnsubscribeAll(ctx *rpctypes.Context) (*ctypes.ResultUnsubscribe, error) {
addr := ctx.RemoteAddr()
env.Logger.Info("Unsubscribe from all", "remote", addr)

View File

@@ -10,7 +10,7 @@ import (
)
// BroadcastEvidence broadcasts evidence of the misbehavior.
// More: https://docs.tendermint.com/master/rpc/#/Info/broadcast_evidence
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/broadcast_evidence
func BroadcastEvidence(ctx *rpctypes.Context, ev types.Evidence) (*ctypes.ResultBroadcastEvidence, error) {
if ev == nil {
return nil, errors.New("no evidence was provided")

View File

@@ -7,7 +7,7 @@ import (
// Health gets node health. Returns empty result (200 OK) on success, no
// response - in case of an error.
// More: https://docs.tendermint.com/master/rpc/#/Info/health
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/health
func Health(ctx *rpctypes.Context) (*ctypes.ResultHealth, error) {
return &ctypes.ResultHealth{}, nil
}

View File

@@ -18,7 +18,7 @@ import (
// BroadcastTxAsync returns right away, with no response. Does not wait for
// CheckTx nor DeliverTx results.
// More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_async
// More: https://docs.tendermint.com/v0.34/rpc/#/Tx/broadcast_tx_async
func BroadcastTxAsync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
err := env.Mempool.CheckTx(tx, nil, mempl.TxInfo{})
@@ -30,7 +30,7 @@ func BroadcastTxAsync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadca
// BroadcastTxSync returns with the response from CheckTx. Does not wait for
// DeliverTx result.
// More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_sync
// More: https://docs.tendermint.com/v0.34/rpc/#/Tx/broadcast_tx_sync
func BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTx, error) {
resCh := make(chan *abci.Response, 1)
err := env.Mempool.CheckTx(tx, func(res *abci.Response) {
@@ -60,7 +60,7 @@ func BroadcastTxSync(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcas
}
// BroadcastTxCommit returns with the responses from CheckTx and DeliverTx.
// More: https://docs.tendermint.com/master/rpc/#/Tx/broadcast_tx_commit
// More: https://docs.tendermint.com/v0.34/rpc/#/Tx/broadcast_tx_commit
func BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadcastTxCommit, error) {
subscriber := ctx.RemoteAddr()
@@ -149,7 +149,7 @@ func BroadcastTxCommit(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultBroadc
// UnconfirmedTxs gets unconfirmed transactions (maximum ?limit entries)
// including their number.
// More: https://docs.tendermint.com/master/rpc/#/Info/unconfirmed_txs
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/unconfirmed_txs
func UnconfirmedTxs(ctx *rpctypes.Context, limitPtr *int) (*ctypes.ResultUnconfirmedTxs, error) {
// reuse per_page validator
limit := validatePerPage(limitPtr)
@@ -163,7 +163,7 @@ func UnconfirmedTxs(ctx *rpctypes.Context, limitPtr *int) (*ctypes.ResultUnconfi
}
// NumUnconfirmedTxs gets number of unconfirmed transactions.
// More: https://docs.tendermint.com/master/rpc/#/Info/num_unconfirmed_txs
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/num_unconfirmed_txs
func NumUnconfirmedTxs(ctx *rpctypes.Context) (*ctypes.ResultUnconfirmedTxs, error) {
return &ctypes.ResultUnconfirmedTxs{
Count: env.Mempool.Size(),
@@ -173,7 +173,7 @@ func NumUnconfirmedTxs(ctx *rpctypes.Context) (*ctypes.ResultUnconfirmedTxs, err
// CheckTx checks the transaction without executing it. The transaction won't
// be added to the mempool either.
// More: https://docs.tendermint.com/master/rpc/#/Tx/check_tx
// More: https://docs.tendermint.com/v0.34/rpc/#/Tx/check_tx
func CheckTx(ctx *rpctypes.Context, tx types.Tx) (*ctypes.ResultCheckTx, error) {
res, err := env.ProxyAppMempool.CheckTxSync(abci.RequestCheckTx{Tx: tx})
if err != nil {

View File

@@ -11,7 +11,7 @@ import (
)
// NetInfo returns network info.
// More: https://docs.tendermint.com/master/rpc/#/Info/net_info
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/net_info
func NetInfo(ctx *rpctypes.Context) (*ctypes.ResultNetInfo, error) {
peersList := env.P2PPeers.Peers().List()
peers := make([]ctypes.Peer, 0, len(peersList))
@@ -92,7 +92,7 @@ func UnsafeDialPeers(ctx *rpctypes.Context, peers []string, persistent, uncondit
}
// Genesis returns genesis file.
// More: https://docs.tendermint.com/master/rpc/#/Info/genesis
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/genesis
func Genesis(ctx *rpctypes.Context) (*ctypes.ResultGenesis, error) {
if len(env.genChunks) > 1 {
return nil, errors.New("genesis response is large, please use the genesis_chunked API instead")

View File

@@ -12,7 +12,7 @@ import (
// Status returns Tendermint status including node info, pubkey, latest block
// hash, app hash, block height and time.
// More: https://docs.tendermint.com/master/rpc/#/Info/status
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/status
func Status(ctx *rpctypes.Context) (*ctypes.ResultStatus, error) {
var (
earliestBlockHeight int64

View File

@@ -16,7 +16,7 @@ import (
// Tx allows you to query the transaction results. `nil` could mean the
// transaction is in the mempool, invalidated, or was not sent in the first
// place.
// More: https://docs.tendermint.com/master/rpc/#/Info/tx
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/tx
func Tx(ctx *rpctypes.Context, hash []byte, prove bool) (*ctypes.ResultTx, error) {
// if index is disabled, return error
if _, ok := env.TxIndexer.(*null.TxIndex); ok {
@@ -53,7 +53,7 @@ func Tx(ctx *rpctypes.Context, hash []byte, prove bool) (*ctypes.ResultTx, error
// TxSearch allows you to query for multiple transactions results. It returns a
// list of transactions (maximum ?per_page entries) and the total count.
// More: https://docs.tendermint.com/master/rpc/#/Info/tx_search
// More: https://docs.tendermint.com/v0.34/rpc/#/Info/tx_search
func TxSearch(
ctx *rpctypes.Context,
query string,

View File

@@ -80,5 +80,5 @@
//
// # Examples
//
// - [Tendermint](https://github.com/tendermint/tendermint/blob/master/rpc/core/routes.go)
// - [Tendermint](https://github.com/tendermint/tendermint/blob/v0.34.x/rpc/core/routes.go)
package jsonrpc

View File

@@ -51,10 +51,10 @@ info:
ws ws://localhost:26657/websocket
> { "jsonrpc": "2.0", "method": "subscribe", "params": ["tm.event='NewBlock'"], "id": 1 }
version: "Master"
version: "v0.34"
license:
name: Apache 2.0
url: https://github.com/tendermint/tendermint/blob/master/LICENSE
url: https://github.com/tendermint/tendermint/blob/main/LICENSE
servers:
- url: https://rpc.cosmos.network
description: Cosmos mainnet node to interact with the Tendermint RPC
@@ -83,7 +83,7 @@ paths:
description: |
If you want to be sure that the transaction is included in a block, you can
subscribe for the result using JSONRPC via a websocket. See
https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
https://docs.tendermint.com/v0.34/app-dev/subscribing-to-events-via-websocket.html
If you haven't received anything after a couple of blocks, resend it. If the
same happens again, send it to some other node. A few reasons why it could
happen:
@@ -95,7 +95,7 @@ paths:
Please refer to
https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting
https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#formatting
for formatting/encoding rules.
parameters:
- in: query
@@ -127,7 +127,7 @@ paths:
description: |
If you want to be sure that the transaction is included in a block, you can
subscribe for the result using JSONRPC via a websocket. See
https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
https://docs.tendermint.com/v0.34/app-dev/subscribing-to-events-via-websocket.html
If you haven't received anything after a couple of blocks, resend it. If the
same happens again, send it to some other node. A few reasons why it could
happen:
@@ -139,7 +139,7 @@ paths:
3. node can be offline
Please refer to
https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting
https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#formatting
for formatting/encoding rules.
parameters:
- in: query
@@ -172,7 +172,7 @@ paths:
IMPORTANT: use only for testing and development. In production, use
BroadcastTxSync or BroadcastTxAsync. You can subscribe for the transaction
result using JSONRPC via a websocket. See
https://docs.tendermint.com/master/app-dev/subscribing-to-events-via-websocket.html
https://docs.tendermint.com/v0.34/app-dev/subscribing-to-events-via-websocket.html
CONTRACT: only returns error if mempool.CheckTx() errs or if we timeout
waiting for tx to commit.
@@ -181,7 +181,7 @@ paths:
will contain a non-OK ABCI code.
Please refer to
https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting
https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#formatting
for formatting/encoding rules.
parameters:
- in: query
@@ -214,7 +214,7 @@ paths:
The transaction won't be added to the mempool.
Please refer to
https://docs.tendermint.com/master/tendermint-core/using-tendermint.html#formatting
https://docs.tendermint.com/v0.34/tendermint-core/using-tendermint.html#formatting
for formatting/encoding rules.
parameters:
- in: query