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.21 into main #667

Merged
merged 13 commits into from
Jul 20, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
10 changes: 10 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1,11 @@
# CODEOWNERS: https://help.github.com/articles/about-codeowners/

# Everything goes through the following "global owners" by default.
# Unless a later match takes precedence, these three will be
# requested for review when someone opens a PR.
# Note that the last matching pattern takes precedence, so
# global owners are only requested if there isn't a more specific
# codeowner specified below. For this reason, the global codeowners
# are often repeated in package-level definitions.

* @torao @tnasu @ulbqb
37 changes: 37 additions & 0 deletions .github/ISSUE_TEMPLATE/proposal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
name: Protocol Change Proposal
about: Create a proposal to request a change to the protocol

---

<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for opening an issue! ✰
v Before smashing the submit button please review the template.
v Word of caution: Under-specified proposals may be rejected summarily
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

# Protocol Change Proposal

## Summary

<!-- Short, concise description of the proposed change -->

## Problem Definition

<!-- Why do we need this change?
What problems may be addressed by introducing this change?
What benefits does Tendermint stand to gain by including this change?
Are there any disadvantages of including this change? -->

## Proposal

<!-- Detailed description of requirements of implementation -->

____

#### For Admin Use

- [ ] Not duplicate issue
- [ ] Appropriate labels applied
- [ ] Appropriate contributors tagged
- [ ] Contributor assigned/self-assigned
2 changes: 1 addition & 1 deletion .github/workflows/check-generated.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
run: |
set -euo pipefail

readonly MOCKERY=2.30.18 # N.B. no leading "v"
readonly MOCKERY=2.32.0 # N.B. no leading "v"
curl -sL "https://github.com/vektra/mockery/releases/download/v${MOCKERY}/mockery_${MOCKERY}_Linux_x86_64.tar.gz" | tar -C /usr/local/bin -xzf -
make mockery 2>/dev/null

Expand Down
9 changes: 7 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ docs/package-lock.json # To avoid security notifications. If the time comes to
*.log
docs/node_modules/
index.html.md
node/data

scripts/wal2json/wal2json
scripts/cutWALUntil/cutWALUntil
Expand Down Expand Up @@ -53,5 +54,9 @@ test/fuzz/**/corpus
test/fuzz/**/crashers
test/fuzz/**/suppressions
test/fuzz/**/*.zip
node/data
crypto/vrf/internal/vrf/sodium
*.aux
*.bbl
*.blg
*.pdf
*.gz
*.dvi
31 changes: 15 additions & 16 deletions behaviour/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,35 +8,34 @@ There are four different behaviours a reactor can report.

1. bad message

type badMessage struct {
explanation string
}
type badMessage struct {
explanation string
}

This message will request the peer be stopped for an error
# This message will request the peer be stopped for an error

2. message out of order

type messageOutOfOrder struct {
explanation string
}
type messageOutOfOrder struct {
explanation string
}

This message will request the peer be stopped for an error
# This message will request the peer be stopped for an error

3. consesnsus Vote

type consensusVote struct {
explanation string
}
type consensusVote struct {
explanation string
}

This message will request the peer be marked as good
# This message will request the peer be marked as good

4. block part

type blockPart struct {
explanation string
}
type blockPart struct {
explanation string
}

This message will request the peer be marked as good

*/
package behaviour
1 change: 1 addition & 0 deletions blockchain/v0/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,7 @@ func (pool *BlockPool) sendError(err error, peerID p2p.ID) {
}

// for debugging purposes
//
//nolint:unused
func (pool *BlockPool) debug() string {
pool.mtx.Lock()
Expand Down
8 changes: 6 additions & 2 deletions blockchain/v0/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ func newBlockchainReactor(

blockDB := dbm.NewMemDB()
stateDB := dbm.NewMemDB()
stateStore := sm.NewStore(stateDB)
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardABCIResponses: false,
})
blockStore := store.NewBlockStore(blockDB)

state, err := stateStore.LoadFromDBOrGenesisDoc(genDoc)
Expand All @@ -86,7 +88,9 @@ func newBlockchainReactor(
// pool.height is determined from the store.
fastSync := true
db := dbm.NewMemDB()
stateStore = sm.NewStore(db)
stateStore = sm.NewStore(db, sm.StoreOptions{
DiscardABCIResponses: false,
})
blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(),
mock.Mempool{}, sm.EmptyEvidencePool{})
if err = stateStore.Save(state); err != nil {
Expand Down
8 changes: 6 additions & 2 deletions blockchain/v1/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,9 @@ func newBlockchainReactor(

blockDB := dbm.NewMemDB()
stateDB := dbm.NewMemDB()
stateStore := sm.NewStore(stateDB)
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardABCIResponses: false,
})
blockStore := store.NewBlockStore(blockDB)

state, err := stateStore.LoadFromDBOrGenesisDoc(genDoc)
Expand All @@ -115,7 +117,9 @@ func newBlockchainReactor(
// pool.height is determined from the store.
fastSync := true
db := dbm.NewMemDB()
stateStore = sm.NewStore(db)
stateStore = sm.NewStore(db, sm.StoreOptions{
DiscardABCIResponses: false,
})
blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(),
mock.Mempool{}, sm.EmptyEvidencePool{})
if err = stateStore.Save(state); err != nil {
Expand Down
12 changes: 9 additions & 3 deletions blockchain/v2/reactor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,9 @@ func newTestReactor(p testReactorParams) *BlockchainReactor {
panic(fmt.Errorf("error start app: %w", err))
}
db := dbm.NewMemDB()
stateStore := sm.NewStore(db)
stateStore := sm.NewStore(db, sm.StoreOptions{
DiscardABCIResponses: false,
})
appl = sm.NewBlockExecutor(stateStore, p.logger, proxyApp.Consensus(), mock.Mempool{}, sm.EmptyEvidencePool{})
if err = stateStore.Save(state); err != nil {
panic(err)
Expand Down Expand Up @@ -509,14 +511,18 @@ func newReactorStore(

stateDB := dbm.NewMemDB()
blockStore := store.NewBlockStore(dbm.NewMemDB())
stateStore := sm.NewStore(stateDB)
stateStore := sm.NewStore(stateDB, sm.StoreOptions{
DiscardABCIResponses: false,
})
state, err := stateStore.LoadFromDBOrGenesisDoc(genDoc)
if err != nil {
panic(fmt.Errorf("error constructing state from genesis file: %w", err))
}

db := dbm.NewMemDB()
stateStore = sm.NewStore(db)
stateStore = sm.NewStore(db, sm.StoreOptions{
DiscardABCIResponses: false},
)
blockExec := sm.NewBlockExecutor(stateStore, log.TestingLogger(), proxyApp.Consensus(),
mock.Mempool{}, sm.EmptyEvidencePool{})
if err = stateStore.Save(state); err != nil {
Expand Down
Loading
Loading