Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport tendermint-v0.34.22 into main #669

Merged
merged 17 commits into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
00c3919
docs: Update v0.34.x to prepare for v0.37 (#9244)
tnasu Jul 18, 2023
5a07abd
test: add the loadtime tool (Backport #9342) (#9358)
tnasu Jul 18, 2023
8f7939a
test: add the loadtime report tool (backport #9351) (#9365)
tnasu Jul 19, 2023
f406b46
add separated runs by UUID (backport #9367) (#9380)
tnasu Jul 19, 2023
bb0db92
print all versions of tendermint and its sub protocols (#9329) (#9387)
tnasu Jul 19, 2023
82334d9
test: generate uuid on startup for load tool (#9383) (#9393)
tnasu Jul 19, 2023
4049050
feat: support HTTPS inside websocket (backport #9416) (#9423)
tnasu Jul 19, 2023
5c66c59
state: restore previous error message (#9435) (#9441)
tnasu Jul 19, 2023
90ea82d
config: Add missing storage section when generating config (backport …
tnasu Jul 19, 2023
2f76b29
loadtime: add block time to the data point (backport #9484) (#9490)
tnasu Jul 19, 2023
71b458d
Extend the load report tool to include transactions' hashes (backport…
tnasu Jul 19, 2023
69cde03
security/p2p: prevent peers who errored being added to the peer_set (…
tnasu Jul 19, 2023
3d863fc
indexer: move deduplication functionality purely to the kvindexer (ba…
tnasu Jul 19, 2023
47ec1d8
blocksync: retry requests after timeout (backport #9518) (#9534)
tnasu Jul 19, 2023
9353d3b
Fix TX payload for DO testnets (#9540) (#9543)
tnasu Jul 19, 2023
c94737c
QA Process report for v0.37.x (and baseline for v0.34.x) (backport #9…
tnasu Jul 19, 2023
450d1c1
Upgrade to tendermint/tendermint v0.34.22
tnasu Jul 19, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ docs/.vuepress/dist
docs/package-lock.json # To avoid security notifications. If the time comes to use VuePress, activate this.
*.log
docs/node_modules/
docs/.vuepress/public/rpc
index.html.md
node/data

Expand All @@ -50,6 +51,14 @@ terraform.tfstate
terraform.tfstate.backup
terraform.tfstate.d
profile\.out
test/app/grpc_client
test/loadtime/build
test/e2e/build
test/e2e/networks/*/
test/logs
test/maverick/maverick
test/p2p/data/
vendor
test/fuzz/**/corpus
test/fuzz/**/crashers
test/fuzz/**/suppressions
Expand All @@ -60,3 +69,5 @@ test/fuzz/**/*.zip
*.pdf
*.gz
*.dvi
# Python virtual environments
.venv
2 changes: 1 addition & 1 deletion DOCKER/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Docker

Basically, see the [Tendermint v0.34.8 Docker](https://github.com/tendermint/tendermint/blob/v0.34.8/DOCKER/README.md).
Basically, see the [Tendermint v0.34 Docker](https://github.com/tendermint/tendermint/blob/v0.34.x/DOCKER/README.md).

## Quick Start

Expand Down
2 changes: 1 addition & 1 deletion abci/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Application BlockChain Interface (ABCI)

Basically, see the [Tendermint v0.34.8 ABCI spec](https://github.com/tendermint/tendermint/blob/v0.34.8/abci/README.md).
Basically, see the [Tendermint v0.34 ABCI spec](https://github.com/tendermint/tendermint/blob/v0.34.x/abci/README.md).
2 changes: 1 addition & 1 deletion abci/example/kvstore/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# KVStore

Basically, see the [Tendermint v0.34.8 KVStore spec](https://github.com/tendermint/tendermint/blob/v0.34.8/abci/example/kvstore/README.md).
Basically, see the [Tendermint v0.34 KVStore spec](https://github.com/tendermint/tendermint/blob/v0.34.x/abci/example/kvstore/README.md).
9 changes: 8 additions & 1 deletion blockchain/v0/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ const (
maxTotalRequesters = 600
maxPendingRequests = maxTotalRequesters
maxPendingRequestsPerPeer = 20
requestRetrySeconds = 30

// Minimum recv rate to ensure we're receiving blocks from a peer fast
// enough. If a peer is not sending us data at at least that rate, we
Expand Down Expand Up @@ -602,7 +603,7 @@ OUTER_LOOP:
}
peer = bpr.pool.pickIncrAvailablePeer(bpr.height)
if peer == nil {
// log.Info("No peers available", "height", height)
bpr.Logger.Debug("No peers currently available; will retry shortly", "height", bpr.height)
time.Sleep(requestIntervalMS * time.Millisecond)
continue PICK_PEER_LOOP
}
Expand All @@ -612,6 +613,7 @@ OUTER_LOOP:
bpr.peerID = peer.id
bpr.mtx.Unlock()

to := time.NewTimer(requestRetrySeconds * time.Second)
// Send request and wait.
bpr.pool.sendRequest(bpr.height, peer.id)
WAIT_LOOP:
Expand All @@ -624,6 +626,11 @@ OUTER_LOOP:
return
case <-bpr.Quit():
return
case <-to.C:
bpr.Logger.Debug("Retrying block request after timeout", "height", bpr.height, "peer", bpr.peerID)
// Simulate a redo
bpr.reset()
continue OUTER_LOOP
case peerID := <-bpr.redoCh:
if peerID == bpr.peerID {
bpr.reset()
Expand Down
3 changes: 3 additions & 0 deletions blockchain/v2/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func (mp mockPeer) Get(string) interface{} { return struct{}{} }

func (mp mockPeer) String() string { return fmt.Sprintf("%v", mp.id) }

func (mp mockPeer) SetRemovalFailed() {}
func (mp mockPeer) GetRemovalFailed() bool { return false }

// nolint:unused // ignore
type mockBlockStore struct {
blocks map[int64]*types.Block
Expand Down
22 changes: 21 additions & 1 deletion cmd/ostracon/commands/version.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package commands

import (
"encoding/json"
"fmt"

"github.com/spf13/cobra"
Expand All @@ -13,6 +14,25 @@ var VersionCmd = &cobra.Command{
Use: "version",
Short: "Show version info",
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(version.OCCoreSemVer)
if verbose {
values, _ := json.MarshalIndent(struct {
Ostracon string `json:"ostracon"`
ABCI string `json:"abci"`
BlockProtocol uint64 `json:"block_protocol"`
P2PProtocol uint64 `json:"p2p_protocol"`
}{
Ostracon: version.OCCoreSemVer,
ABCI: version.ABCIVersion,
BlockProtocol: version.BlockProtocol,
P2PProtocol: version.P2PProtocol,
}, "", " ")
fmt.Println(string(values))
} else {
fmt.Println(version.OCCoreSemVer)
}
},
}

func init() {
VersionCmd.Flags().BoolVarP(&verbose, "verbose", "v", false, "Show protocol and library versions")
}
1 change: 1 addition & 0 deletions config/toml.go
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,7 @@ peer_query_maj23_sleep_duration = "{{ .Consensus.PeerQueryMaj23SleepDuration }}"
#######################################################
### Storage Configuration Options ###
#######################################################
[storage]

# Set to true to discard ABCI responses from the state store, which can save a
# considerable amount of disk space. Set to false to ensure ABCI responses are
Expand Down
2 changes: 1 addition & 1 deletion consensus/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Consensus

Basically, see the [Tendermint v0.34.8 Consensus spec](https://github.com/tendermint/tendermint/blob/v0.34.8/consensus/README.md).
Basically, see the [Tendermint v0.34 Consensus spec](https://github.com/tendermint/tendermint/blob/v0.34.x/consensus/README.md).
5 changes: 3 additions & 2 deletions consensus/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -2313,10 +2313,11 @@ func (cs *State) voteTime() time.Time {
now := tmtime.Now()
minVoteTime := now
// TODO: We should remove next line in case we don't vote for v in case cs.ProposalBlock == nil,
// even if cs.LockedBlock != nil. See https://docs.tendermint.com/master/spec/.
// even if cs.LockedBlock != nil. See https://github.com/tendermint/tendermint/tree/v0.34.x/spec/.
timeIota := time.Duration(cs.state.ConsensusParams.Block.TimeIotaMs) * time.Millisecond
if cs.LockedBlock != nil {
// See the BFT time spec https://docs.tendermint.com/master/spec/consensus/bft-time.html
// See the BFT time spec
// https://github.com/tendermint/tendermint/blob/v0.34.x/spec/consensus/bft-time.md
minVoteTime = cs.LockedBlock.Time.Add(timeIota)
} else if cs.ProposalBlock != nil {
minVoteTime = cs.ProposalBlock.Time.Add(timeIota)
Expand Down
2 changes: 1 addition & 1 deletion crypto/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Crypto

Basically, see the [Tendermint v0.34.8 Crypto spec](https://github.com/tendermint/tendermint/blob/v0.34.8/crypto/README.md).
Basically, see the [Tendermint v0.34 Crypto spec](https://github.com/tendermint/tendermint/blob/v0.34.x/crypto/README.md).
2 changes: 1 addition & 1 deletion crypto/merkle/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Merkle Tree

Basically, see the [Tendermint v0.34.8 Merkle Tree spec](https://github.com/tendermint/tendermint/blob/v0.34.8/crypto/merkle/README.md).
Basically, see the [Tendermint v0.34 Merkle Tree spec](https://github.com/tendermint/tendermint/blob/v0.34.x/crypto/merkle/README.md).
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: Ostracon is a blockchain application platform.
Welcome to the Ostracon documentation!
Therefore, sorry for under construction.

Basically, you can find the information on [Tendermint v0.34.8 docs/README.md](https://github.com/tendermint/tendermint/blob/v0.34.8/docs/README.md)
Basically, you can find the information on [Tendermint v0.34 docs/README.md](https://github.com/tendermint/tendermint/blob/v0.34.x/docs/README.md)

In addition, we have prepared a simple document here.
* [English](en)
Expand Down
2 changes: 1 addition & 1 deletion evidence/doc.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
Package evidence handles all evidence storage and gossiping from detection to block proposal.
For the different types of evidence refer to the `evidence.go` file in the types package
or https://github.com/tendermint/spec/blob/master/spec/consensus/light-client/accountability.md.
or https://github.com/tendermint/tendermint/blob/v0.34.x/spec/consensus/light-client/accountability.md.

# Gossiping

Expand Down
49 changes: 32 additions & 17 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ require (
github.com/adlio/schema v1.3.4
github.com/btcsuite/btcd v0.22.1
github.com/btcsuite/btcutil v1.0.3-0.20201208143702-a53e38424cce
github.com/bufbuild/buf v1.25.0
github.com/cenkalti/backoff v2.2.1+incompatible // indirect
github.com/creachadair/taskgroup v0.3.2
github.com/fortytw2/leaktest v1.3.0
github.com/go-kit/kit v0.12.0
github.com/go-kit/log v0.2.1
Expand All @@ -21,41 +23,53 @@ require (
github.com/gtank/merlin v0.1.1
github.com/lib/pq v1.10.9
github.com/libp2p/go-buffer-pool v0.1.0
github.com/miekg/dns v1.1.55
github.com/minio/highwayhash v1.0.2
github.com/ory/dockertest v3.3.5+incompatible
github.com/pkg/errors v0.9.1
github.com/prometheus/client_golang v1.16.0
github.com/rcrowley/go-metrics v0.0.0-20200313005456-10cdbea86bc0
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475
github.com/rs/cors v1.9.0
github.com/sasha-s/go-deadlock v0.3.1
github.com/snikch/goodman v0.0.0-20171125024755-10e37e294daa
github.com/spf13/cobra v1.7.0
github.com/spf13/viper v1.16.0
github.com/stretchr/testify v1.8.4
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca
)

// ========================================
// Added by Ostracon
require (
github.com/Finschia/r2ishiguro_vrf v0.1.2
github.com/miekg/dns v1.1.55
github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce
github.com/rs/zerolog v1.29.1
github.com/tendermint/go-amino v0.16.0
github.com/tendermint/tendermint v0.34.21
github.com/tendermint/tendermint v0.34.22
gopkg.in/natefinch/lumberjack.v2 v2.2.1
gopkg.in/yaml.v3 v3.0.1
)
// ========================================

require (
github.com/gofrs/uuid v4.4.0+incompatible
github.com/google/uuid v1.3.0
github.com/tendermint/tm-db v0.6.7
github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673 // indirect
golang.org/x/crypto v0.11.0
golang.org/x/net v0.12.0
gonum.org/v1/gonum v0.13.0
google.golang.org/grpc v1.56.2
gopkg.in/yaml.v3 v3.0.1
)

require (
github.com/Finschia/r2ishiguro_vrf v0.1.2
github.com/bufbuild/buf v1.25.0
github.com/creachadair/taskgroup v0.3.2
github.com/golangci/golangci-lint v1.53.3
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/oasisprotocol/curve25519-voi v0.0.0-20230110094441-db37f07504ce
github.com/prometheus/common v0.42.0 // indirect
github.com/rs/zerolog v1.29.1
github.com/syndtr/goleveldb v1.0.1-0.20200815110645-5c35d600f0ca
github.com/vektra/mockery/v2 v2.32.0
gopkg.in/natefinch/lumberjack.v2 v2.2.1
)

require (
github.com/informalsystems/tm-load-test v1.0.0
gonum.org/v1/gonum v0.13.0
google.golang.org/protobuf v1.31.0
)

require (
Expand Down Expand Up @@ -134,7 +148,6 @@ require (
github.com/go-xmlfmt/xmlfmt v1.1.2 // indirect
github.com/gobwas/glob v0.2.3 // indirect
github.com/gofrs/flock v0.8.1 // indirect
github.com/gofrs/uuid v4.4.0+incompatible // indirect
github.com/golang/snappy v0.0.3 // indirect
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2 // indirect
github.com/golangci/dupl v0.0.0-20180902072040-3e9179ac440a // indirect
Expand Down Expand Up @@ -173,6 +186,7 @@ require (
github.com/kisielk/gotool v1.0.0 // indirect
github.com/kkHAIKE/contextcheck v1.1.4 // indirect
github.com/klauspost/compress v1.16.7 // indirect
github.com/klauspost/pgzip v1.2.5 // indirect
github.com/kulti/thelper v0.6.3 // indirect
github.com/kunwardeep/paralleltest v1.0.7 // indirect
github.com/kyoh86/exportloopref v0.1.11 // indirect
Expand All @@ -190,7 +204,7 @@ require (
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/mbilski/exhaustivestruct v1.2.0 // indirect
github.com/mgechev/revive v1.3.2 // indirect
github.com/mimoo/StrobeGo v0.0.0-20181016162300-f8f6d4d2b643 // indirect
github.com/mimoo/StrobeGo v0.0.0-20210601165009-122bf33a46e0 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/term v0.5.0 // indirect
Expand Down Expand Up @@ -223,6 +237,7 @@ require (
github.com/sanposhiho/wastedassign/v2 v2.0.7 // indirect
github.com/sashamelentyev/interfacebloat v1.1.0 // indirect
github.com/sashamelentyev/usestdlibvars v1.23.0 // indirect
github.com/satori/go.uuid v1.2.0 // indirect
github.com/securego/gosec/v2 v2.16.0 // indirect
github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
Expand Down Expand Up @@ -252,6 +267,7 @@ require (
github.com/vbatts/tar-split v0.11.3 // indirect
github.com/xen0n/gosmopolitan v1.2.1 // indirect
github.com/yagipy/maintidx v1.0.0 // indirect
github.com/yahoo/coname v0.0.0-20170609175141-84592ddf8673 // indirect
github.com/yeya24/promlinter v0.2.0 // indirect
github.com/ykadowak/zerologlint v0.1.2 // indirect
gitlab.com/bosi/decorder v0.2.3 // indirect
Expand All @@ -272,7 +288,6 @@ require (
golang.org/x/text v0.11.0 // indirect
golang.org/x/tools v0.11.0 // indirect
google.golang.org/genproto v0.0.0-20230410155749-daa745c078e1 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
honnef.co/go/tools v0.4.3 // indirect
Expand Down
Loading