From 3a75fbceece4890b70dc904984b9d074e2b31a54 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 12:42:01 +0000 Subject: [PATCH 01/13] build(deps): Bump gaurav-nelson/github-action-markdown-link-check from 1.0.13 to 1.0.14 (#8166) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) from 1.0.13 to 1.0.14.
Release notes

Sourced from gaurav-nelson/github-action-markdown-link-check's releases.

1.0.14

Changes

Thank you @​thanethomson @​edumco

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=gaurav-nelson/github-action-markdown-link-check&package-manager=github_actions&previous-version=1.0.13&new-version=1.0.14)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/linkchecker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linkchecker.yml b/.github/workflows/linkchecker.yml index 89eabc77e..d143fd905 100644 --- a/.github/workflows/linkchecker.yml +++ b/.github/workflows/linkchecker.yml @@ -7,6 +7,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: gaurav-nelson/github-action-markdown-link-check@1.0.13 + - uses: gaurav-nelson/github-action-markdown-link-check@1.0.14 with: folder-path: "docs" From 039fef14e0dc571119bbaebf4aae4a5102be2676 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 13:56:13 +0000 Subject: [PATCH 02/13] build(deps): Bump docker/build-push-action from 2.9.0 to 2.10.0 (#8167) Bumps [docker/build-push-action](https://github.com/docker/build-push-action) from 2.9.0 to 2.10.0.
Release notes

Sourced from docker/build-push-action's releases.

v2.10.0

Commits

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=2.9.0&new-version=2.10.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- .github/workflows/docker.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 8f88e9d49..5fb219e24 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -49,7 +49,7 @@ jobs: password: ${{ secrets.DOCKERHUB_TOKEN }} - name: Publish to Docker Hub - uses: docker/build-push-action@v2.9.0 + uses: docker/build-push-action@v2.10.0 with: context: . file: ./DOCKER/Dockerfile From c680cca96e2b087853cb54f05ab0542dcb7a6726 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Mon, 21 Mar 2022 11:07:52 -0400 Subject: [PATCH 03/13] consensus: reduce size of test fixtures and logging rate (#8172) We can reduce the size of test fixtures (which will improve test reliability) without impacting these tests' primary role (which is correctness.) Also reducing these test logging will make the tests easier to read, which whill be a good quality of life improvement for devs. --- internal/consensus/invalid_test.go | 4 +-- internal/consensus/reactor_test.go | 12 ++++----- internal/consensus/state_test.go | 40 +++++------------------------- 3 files changed, 14 insertions(+), 42 deletions(-) diff --git a/internal/consensus/invalid_test.go b/internal/consensus/invalid_test.go index 033b096ba..f38598af9 100644 --- a/internal/consensus/invalid_test.go +++ b/internal/consensus/invalid_test.go @@ -26,13 +26,13 @@ func TestReactorInvalidPrecommit(t *testing.T) { config := configSetup(t) - n := 4 + const n = 2 states, cleanup := makeConsensusState(ctx, t, config, n, "consensus_reactor_test", newMockTickerFunc(true)) t.Cleanup(cleanup) - for i := 0; i < 4; i++ { + for i := 0; i < n; i++ { ticker := NewTimeoutTicker(states[i].logger) states[i].SetTimeoutTicker(ticker) } diff --git a/internal/consensus/reactor_test.go b/internal/consensus/reactor_test.go index b8d638976..c284b4345 100644 --- a/internal/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -355,7 +355,7 @@ func TestReactorBasic(t *testing.T) { cfg := configSetup(t) - n := 4 + n := 2 states, cleanup := makeConsensusState(ctx, t, cfg, n, "consensus_reactor_test", newMockTickerFunc(true)) @@ -445,7 +445,7 @@ func TestReactorWithEvidence(t *testing.T) { cfg := configSetup(t) - n := 4 + n := 2 testName := "consensus_reactor_test" tickerFunc := newMockTickerFunc(true) @@ -551,7 +551,7 @@ func TestReactorCreatesBlockWhenEmptyBlocksFalse(t *testing.T) { cfg := configSetup(t) - n := 4 + n := 2 states, cleanup := makeConsensusState(ctx, t, cfg, @@ -574,7 +574,7 @@ func TestReactorCreatesBlockWhenEmptyBlocksFalse(t *testing.T) { // send a tx require.NoError( t, - assertMempool(t, states[3].txNotifier).CheckTx( + assertMempool(t, states[1].txNotifier).CheckTx( ctx, []byte{1, 2, 3}, nil, @@ -605,7 +605,7 @@ func TestReactorRecordsVotesAndBlockParts(t *testing.T) { cfg := configSetup(t) - n := 4 + n := 2 states, cleanup := makeConsensusState(ctx, t, cfg, n, "consensus_reactor_test", newMockTickerFunc(true)) @@ -670,7 +670,7 @@ func TestReactorVotingPowerChange(t *testing.T) { cfg := configSetup(t) - n := 4 + n := 2 states, cleanup := makeConsensusState(ctx, t, cfg, diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index f008e75d3..58addd620 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -3,7 +3,6 @@ package consensus import ( "bytes" "context" - "fmt" "testing" "time" @@ -312,8 +311,6 @@ func TestStateOversizedBlock(t *testing.T) { // start the machine startTestRound(ctx, cs1, height, round) - t.Log("Block Sizes", "Limit", cs1.state.ConsensusParams.Block.MaxBytes, "Current", totalBytes) - // c1 should log an error with the block part message as it exceeds the consensus params. The // block is not added to cs.ProposalBlock so the node timeouts. ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) @@ -490,7 +487,6 @@ func TestStateLock_NoPOL(t *testing.T) { round++ // moving to the next round ensureNewRound(t, newRoundCh, height, round) - t.Log("#### ONTO ROUND 1") /* Round2 (cs1, B) // B B2 */ @@ -533,7 +529,6 @@ func TestStateLock_NoPOL(t *testing.T) { round++ // entering new round ensureNewRound(t, newRoundCh, height, round) - t.Log("#### ONTO ROUND 2") /* Round3 (vs2, _) // B, B2 */ @@ -590,7 +585,6 @@ func TestStateLock_NoPOL(t *testing.T) { round++ // entering new round ensureNewRound(t, newRoundCh, height, round) - t.Log("#### ONTO ROUND 3") /* Round4 (vs2, C) // B C // B C */ @@ -662,7 +656,6 @@ func TestStateLock_POLUpdateLock(t *testing.T) { This ensures that cs1 will lock on B in this round but not precommit it. */ - t.Log("### Starting Round 0") // start round and wait for propose and prevote startTestRound(ctx, cs1, height, round) @@ -700,7 +693,6 @@ func TestStateLock_POLUpdateLock(t *testing.T) { Check that cs1 is now locked on the new block, D and no longer on the old block. */ - t.Log("### Starting Round 1") incrementRound(vs2, vs3, vs4) round++ @@ -769,7 +761,6 @@ func TestStateLock_POLRelock(t *testing.T) { Send a precommit for nil from all of the validators to cs1. This ensures that cs1 will lock on B in this round but not precommit it. */ - t.Log("### Starting Round 0") startTestRound(ctx, cs1, height, round) @@ -808,7 +799,6 @@ func TestStateLock_POLRelock(t *testing.T) { Check that cs1 updates its 'locked round' value to the current round. */ - t.Log("### Starting Round 1") incrementRound(vs2, vs3, vs4) round++ propR1 := types.NewProposal(height, round, cs1.ValidRound, blockID, theBlock.Header.Time) @@ -868,7 +858,6 @@ func TestStateLock_PrevoteNilWhenLockedAndMissProposal(t *testing.T) { This ensures that cs1 will lock on B in this round but not precommit it. */ - t.Log("### Starting Round 0") startTestRound(ctx, cs1, height, round) @@ -905,7 +894,6 @@ func TestStateLock_PrevoteNilWhenLockedAndMissProposal(t *testing.T) { Check that cs1 prevotes nil instead of its locked block, but ensure that it maintains its locked block. */ - t.Log("### Starting Round 1") incrementRound(vs2, vs3, vs4) round++ @@ -957,7 +945,6 @@ func TestStateLock_PrevoteNilWhenLockedAndDifferentProposal(t *testing.T) { This ensures that cs1 will lock on B in this round but not precommit it. */ - t.Log("### Starting Round 0") startTestRound(ctx, cs1, height, round) ensureNewRound(t, newRoundCh, height, round) @@ -994,7 +981,6 @@ func TestStateLock_PrevoteNilWhenLockedAndDifferentProposal(t *testing.T) { Check that cs1 prevotes nil instead of its locked block, but ensure that it maintains its locked block. */ - t.Log("### Starting Round 1") incrementRound(vs2, vs3, vs4) round++ cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) @@ -1059,7 +1045,6 @@ func TestStateLock_POLDoesNotUnlock(t *testing.T) { This ensures that cs1 will lock on B in this round. */ - t.Log("#### ONTO ROUND 0") // start round and wait for propose and prevote startTestRound(ctx, cs1, height, round) @@ -1101,7 +1086,6 @@ func TestStateLock_POLDoesNotUnlock(t *testing.T) { Check that cs1 maintains its lock on B but precommits nil. Send a precommit for nil from >2/3 of the validators to `cs1`. */ - t.Log("#### ONTO ROUND 1") round++ incrementRound(vs2, vs3, vs4) cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) @@ -1136,7 +1120,6 @@ func TestStateLock_POLDoesNotUnlock(t *testing.T) { Send the validator >2/3 prevotes for nil and ensure that it did not unlock its block at the end of the previous round. */ - t.Log("#### ONTO ROUND 2") round++ incrementRound(vs2, vs3, vs4) cs3 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) @@ -1193,7 +1176,6 @@ func TestStateLock_MissingProposalWhenPOLSeenDoesNotUpdateLock(t *testing.T) { This ensures that cs1 will lock on B in this round but not precommit it. */ - t.Log("### Starting Round 0") startTestRound(ctx, cs1, height, round) ensureNewRound(t, newRoundCh, height, round) @@ -1225,7 +1207,6 @@ func TestStateLock_MissingProposalWhenPOLSeenDoesNotUpdateLock(t *testing.T) { Check that cs1 does not update its locked block to this missed block D. */ - t.Log("### Starting Round 1") incrementRound(vs2, vs3, vs4) round++ cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) @@ -1281,7 +1262,6 @@ func TestStateLock_DoesNotLockOnOldProposal(t *testing.T) { This ensures that cs1 will not lock on B. */ - t.Log("### Starting Round 0") startTestRound(ctx, cs1, height, round) ensureNewRound(t, newRoundCh, height, round) @@ -1315,7 +1295,6 @@ func TestStateLock_DoesNotLockOnOldProposal(t *testing.T) { cs1 saw a POL for the block it saw in round 0. We ensure that it does not lock on this block, since it did not see a proposal for it in this round. */ - t.Log("### Starting Round 1") round++ ensureNewRound(t, newRoundCh, height, round) @@ -1379,7 +1358,6 @@ func TestStateLock_POLSafety1(t *testing.T) { ensurePrecommit(t, voteCh, height, round) ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) - t.Log("### ONTO ROUND 1") incrementRound(vs2, vs3, vs4) round++ // moving to the next round cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) @@ -1407,8 +1385,6 @@ func TestStateLock_POLSafety1(t *testing.T) { require.Nil(t, rs.LockedBlock, "we should not be locked!") - t.Logf("new prop hash %v", fmt.Sprintf("%X", propBlock.Hash())) - // go to prevote, prevote for proposal block ensurePrevoteMatch(t, voteCh, height, round, r2BlockID.Hash) @@ -1428,7 +1404,6 @@ func TestStateLock_POLSafety1(t *testing.T) { ensureNewRound(t, newRoundCh, height, round) - t.Log("### ONTO ROUND 2") /*Round3 we see the polka from round 1 but we shouldn't unlock! */ @@ -1494,7 +1469,7 @@ func TestStateLock_POLSafety2(t *testing.T) { incrementRound(vs2, vs3, vs4) round++ // moving to the next round - t.Log("### ONTO Round 1") + // jump in at round 1 startTestRound(ctx, cs1, height, round) ensureNewRound(t, newRoundCh, height, round) @@ -1536,7 +1511,7 @@ func TestStateLock_POLSafety2(t *testing.T) { addVotes(cs1, prevotes...) ensureNewRound(t, newRoundCh, height, round) - t.Log("### ONTO Round 2") + /*Round2 // now we see the polka from round 1, but we shouldnt unlock */ @@ -1579,7 +1554,6 @@ func TestState_PrevotePOLFromPreviousRound(t *testing.T) { This ensures that cs1 will lock on B in this round but not precommit it. */ - t.Log("### Starting Round 0") startTestRound(ctx, cs1, height, round) @@ -1617,14 +1591,16 @@ func TestState_PrevotePOLFromPreviousRound(t *testing.T) { cs1 has now seen greater than 2/3 of the voting power prevote D in this round but cs1 did not see the proposal for D in this round so it will not prevote or precommit it. */ - t.Log("### Starting Round 1") + incrementRound(vs2, vs3, vs4) round++ // Generate a new proposal block. cs2 := newState(ctx, t, logger, cs1.state, vs2, kvstore.NewApplication()) cs2.ValidRound = 1 propR1, propBlockR1 := decideProposal(ctx, t, cs2, vs2, vs2.Height, round) - t.Log(propR1.POLRound) + + assert.EqualValues(t, 1, propR1.POLRound) + propBlockR1Parts, err := propBlockR1.MakePartSet(partSize) require.NoError(t, err) r1BlockID := types.BlockID{ @@ -1658,7 +1634,6 @@ func TestState_PrevotePOLFromPreviousRound(t *testing.T) { Send cs1 prevotes for nil and check that it still prevotes its locked block and not the block that it prevoted. */ - t.Log("### Starting Round 2") incrementRound(vs2, vs3, vs4) round++ propR2 := types.NewProposal(height, round, 1, r1BlockID, propBlockR1.Header.Time) @@ -1745,7 +1720,6 @@ func TestProposeValidBlock(t *testing.T) { round++ // moving to the next round ensureNewRound(t, newRoundCh, height, round) - t.Log("### ONTO ROUND 1") // timeout of propose ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) @@ -1768,7 +1742,6 @@ func TestProposeValidBlock(t *testing.T) { round += 2 // increment by multiple rounds ensureNewRound(t, newRoundCh, height, round) - t.Log("### ONTO ROUND 3") ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) @@ -2470,7 +2443,6 @@ func TestStateHalt1(t *testing.T) { ensureNewRound(t, newRoundCh, height, round) - t.Log("### ONTO ROUND 1") /*Round2 // we timeout and prevote // a polka happened but we didn't see it! From c33be0a4106fcefe77bf67eef020a3f32932341f Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Mon, 21 Mar 2022 11:28:42 -0400 Subject: [PATCH 04/13] state: propogate error from state store (#8171) * state: propogate error from state store * fix lint --- internal/state/errors.go | 8 +++++++- internal/state/store.go | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/internal/state/errors.go b/internal/state/errors.go index 6e0cdfa47..e8ad776f4 100644 --- a/internal/state/errors.go +++ b/internal/state/errors.go @@ -39,6 +39,7 @@ type ( ErrNoValSetForHeight struct { Height int64 + Err error } ErrNoConsensusParamsForHeight struct { @@ -89,9 +90,14 @@ func (e ErrStateMismatch) Error() string { } func (e ErrNoValSetForHeight) Error() string { - return fmt.Sprintf("could not find validator set for height #%d", e.Height) + if e.Err == nil { + return fmt.Sprintf("could not find validator set for height #%d", e.Height) + } + return fmt.Sprintf("could not find validator set for height #%d: %s", e.Height, e.Err.Error()) } +func (e ErrNoValSetForHeight) Unwrap() error { return e.Err } + func (e ErrNoConsensusParamsForHeight) Error() string { return fmt.Sprintf("could not find consensus params for height #%d", e.Height) } diff --git a/internal/state/store.go b/internal/state/store.go index 93bd3eb2b..87f5e0c4f 100644 --- a/internal/state/store.go +++ b/internal/state/store.go @@ -488,7 +488,7 @@ func (store dbStore) LoadValidators(height int64) (*types.ValidatorSet, error) { valInfo, err := loadValidatorsInfo(store.db, height) if err != nil { - return nil, ErrNoValSetForHeight{height} + return nil, ErrNoValSetForHeight{Height: height, Err: err} } if valInfo.ValidatorSet == nil { lastStoredHeight := lastStoredHeightFor(height, valInfo.LastHeightChanged) From cc838a5a19401e6b349f9eae4c9d8ab2b35ce4a5 Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Mon, 21 Mar 2022 12:57:34 -0400 Subject: [PATCH 05/13] ABCI++: Update new protos to use enum instead of bool (#8158) closes: #8039 This pull request updates the new ABCI++ protos to use `enum`s in place of `bool`s. `enums` may be preferred over `bool` because an `enum` can be udpated to include new statuses in the future, whereas a `bool` cannot and is fixed as just `true` or `false` over the whole lifecycle of the API. --- abci/example/kvstore/kvstore.go | 9 +- abci/types/application.go | 6 +- abci/types/mocks/base.go | 42 +- abci/types/types.go | 32 +- abci/types/types.pb.go | 610 ++++++++++-------- internal/consensus/mempool_test.go | 6 +- internal/consensus/state_test.go | 16 +- internal/state/execution.go | 10 +- internal/state/execution_test.go | 29 +- internal/state/helpers_test.go | 4 +- proto/tendermint/abci/types.proto | 100 +-- .../tendermint/abci/types.proto.intermediate | 65 +- scripts/abci-gen.sh | 2 - spec/abci++/abci++_methods_002_draft.md | 123 ++-- test/e2e/app/app.go | 6 +- 15 files changed, 599 insertions(+), 461 deletions(-) diff --git a/abci/example/kvstore/kvstore.go b/abci/example/kvstore/kvstore.go index 6b98d54bb..40f45d459 100644 --- a/abci/example/kvstore/kvstore.go +++ b/abci/example/kvstore/kvstore.go @@ -284,16 +284,19 @@ func (app *Application) PrepareProposal(req types.RequestPrepareProposal) types. app.mu.Lock() defer app.mu.Unlock() - return types.ResponsePrepareProposal{TxRecords: app.substPrepareTx(req.Txs)} + return types.ResponsePrepareProposal{ + ModifiedTxStatus: types.ResponsePrepareProposal_MODIFIED, + TxRecords: app.substPrepareTx(req.Txs), + } } func (*Application) ProcessProposal(req types.RequestProcessProposal) types.ResponseProcessProposal { for _, tx := range req.Txs { if len(tx) == 0 { - return types.ResponseProcessProposal{Accept: false} + return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_REJECT} } } - return types.ResponseProcessProposal{Accept: true} + return types.ResponseProcessProposal{Status: types.ResponseProcessProposal_ACCEPT} } //--------------------------------------------- diff --git a/abci/types/application.go b/abci/types/application.go index 6961ea200..8b8991adc 100644 --- a/abci/types/application.go +++ b/abci/types/application.go @@ -66,7 +66,7 @@ func (BaseApplication) ExtendVote(req RequestExtendVote) ResponseExtendVote { func (BaseApplication) VerifyVoteExtension(req RequestVerifyVoteExtension) ResponseVerifyVoteExtension { return ResponseVerifyVoteExtension{ - Result: ResponseVerifyVoteExtension_ACCEPT, + Status: ResponseVerifyVoteExtension_ACCEPT, } } @@ -95,11 +95,11 @@ func (BaseApplication) ApplySnapshotChunk(req RequestApplySnapshotChunk) Respons } func (BaseApplication) PrepareProposal(req RequestPrepareProposal) ResponsePrepareProposal { - return ResponsePrepareProposal{} + return ResponsePrepareProposal{ModifiedTxStatus: ResponsePrepareProposal_UNMODIFIED} } func (BaseApplication) ProcessProposal(req RequestProcessProposal) ResponseProcessProposal { - return ResponseProcessProposal{} + return ResponseProcessProposal{Status: ResponseProcessProposal_ACCEPT} } func (BaseApplication) FinalizeBlock(req RequestFinalizeBlock) ResponseFinalizeBlock { diff --git a/abci/types/mocks/base.go b/abci/types/mocks/base.go index f9d84b858..fe0516e26 100644 --- a/abci/types/mocks/base.go +++ b/abci/types/mocks/base.go @@ -25,8 +25,7 @@ func NewBaseMock() BaseMock { // Info/Query Connection // Return application info -func (m BaseMock) Info(input types.RequestInfo) types.ResponseInfo { - var ret types.ResponseInfo +func (m BaseMock) Info(input types.RequestInfo) (ret types.ResponseInfo) { defer func() { if r := recover(); r != nil { ret = m.base.Info(input) @@ -36,8 +35,7 @@ func (m BaseMock) Info(input types.RequestInfo) types.ResponseInfo { return ret } -func (m BaseMock) Query(input types.RequestQuery) types.ResponseQuery { - var ret types.ResponseQuery +func (m BaseMock) Query(input types.RequestQuery) (ret types.ResponseQuery) { defer func() { if r := recover(); r != nil { ret = m.base.Query(input) @@ -49,8 +47,7 @@ func (m BaseMock) Query(input types.RequestQuery) types.ResponseQuery { // Mempool Connection // Validate a tx for the mempool -func (m BaseMock) CheckTx(input types.RequestCheckTx) types.ResponseCheckTx { - var ret types.ResponseCheckTx +func (m BaseMock) CheckTx(input types.RequestCheckTx) (ret types.ResponseCheckTx) { defer func() { if r := recover(); r != nil { ret = m.base.CheckTx(input) @@ -62,8 +59,7 @@ func (m BaseMock) CheckTx(input types.RequestCheckTx) types.ResponseCheckTx { // Consensus Connection // Initialize blockchain w validators/other info from TendermintCore -func (m BaseMock) InitChain(input types.RequestInitChain) types.ResponseInitChain { - var ret types.ResponseInitChain +func (m BaseMock) InitChain(input types.RequestInitChain) (ret types.ResponseInitChain) { defer func() { if r := recover(); r != nil { ret = m.base.InitChain(input) @@ -73,8 +69,7 @@ func (m BaseMock) InitChain(input types.RequestInitChain) types.ResponseInitChai return ret } -func (m BaseMock) PrepareProposal(input types.RequestPrepareProposal) types.ResponsePrepareProposal { - var ret types.ResponsePrepareProposal +func (m BaseMock) PrepareProposal(input types.RequestPrepareProposal) (ret types.ResponsePrepareProposal) { defer func() { if r := recover(); r != nil { ret = m.base.PrepareProposal(input) @@ -84,8 +79,7 @@ func (m BaseMock) PrepareProposal(input types.RequestPrepareProposal) types.Resp return ret } -func (m BaseMock) ProcessProposal(input types.RequestProcessProposal) types.ResponseProcessProposal { - var ret types.ResponseProcessProposal +func (m BaseMock) ProcessProposal(input types.RequestProcessProposal) (ret types.ResponseProcessProposal) { defer func() { if r := recover(); r != nil { ret = m.base.ProcessProposal(input) @@ -96,8 +90,7 @@ func (m BaseMock) ProcessProposal(input types.RequestProcessProposal) types.Resp } // Commit the state and return the application Merkle root hash -func (m BaseMock) Commit() types.ResponseCommit { - var ret types.ResponseCommit +func (m BaseMock) Commit() (ret types.ResponseCommit) { defer func() { if r := recover(); r != nil { ret = m.base.Commit() @@ -108,8 +101,7 @@ func (m BaseMock) Commit() types.ResponseCommit { } // Create application specific vote extension -func (m BaseMock) ExtendVote(input types.RequestExtendVote) types.ResponseExtendVote { - var ret types.ResponseExtendVote +func (m BaseMock) ExtendVote(input types.RequestExtendVote) (ret types.ResponseExtendVote) { defer func() { if r := recover(); r != nil { ret = m.base.ExtendVote(input) @@ -120,8 +112,7 @@ func (m BaseMock) ExtendVote(input types.RequestExtendVote) types.ResponseExtend } // Verify application's vote extension data -func (m BaseMock) VerifyVoteExtension(input types.RequestVerifyVoteExtension) types.ResponseVerifyVoteExtension { - var ret types.ResponseVerifyVoteExtension +func (m BaseMock) VerifyVoteExtension(input types.RequestVerifyVoteExtension) (ret types.ResponseVerifyVoteExtension) { defer func() { if r := recover(); r != nil { ret = m.base.VerifyVoteExtension(input) @@ -133,8 +124,7 @@ func (m BaseMock) VerifyVoteExtension(input types.RequestVerifyVoteExtension) ty // State Sync Connection // List available snapshots -func (m BaseMock) ListSnapshots(input types.RequestListSnapshots) types.ResponseListSnapshots { - var ret types.ResponseListSnapshots +func (m BaseMock) ListSnapshots(input types.RequestListSnapshots) (ret types.ResponseListSnapshots) { defer func() { if r := recover(); r != nil { ret = m.base.ListSnapshots(input) @@ -144,8 +134,7 @@ func (m BaseMock) ListSnapshots(input types.RequestListSnapshots) types.Response return ret } -func (m BaseMock) OfferSnapshot(input types.RequestOfferSnapshot) types.ResponseOfferSnapshot { - var ret types.ResponseOfferSnapshot +func (m BaseMock) OfferSnapshot(input types.RequestOfferSnapshot) (ret types.ResponseOfferSnapshot) { defer func() { if r := recover(); r != nil { ret = m.base.OfferSnapshot(input) @@ -155,8 +144,7 @@ func (m BaseMock) OfferSnapshot(input types.RequestOfferSnapshot) types.Response return ret } -func (m BaseMock) LoadSnapshotChunk(input types.RequestLoadSnapshotChunk) types.ResponseLoadSnapshotChunk { - var ret types.ResponseLoadSnapshotChunk +func (m BaseMock) LoadSnapshotChunk(input types.RequestLoadSnapshotChunk) (ret types.ResponseLoadSnapshotChunk) { defer func() { if r := recover(); r != nil { ret = m.base.LoadSnapshotChunk(input) @@ -166,8 +154,7 @@ func (m BaseMock) LoadSnapshotChunk(input types.RequestLoadSnapshotChunk) types. return ret } -func (m BaseMock) ApplySnapshotChunk(input types.RequestApplySnapshotChunk) types.ResponseApplySnapshotChunk { - var ret types.ResponseApplySnapshotChunk +func (m BaseMock) ApplySnapshotChunk(input types.RequestApplySnapshotChunk) (ret types.ResponseApplySnapshotChunk) { defer func() { if r := recover(); r != nil { ret = m.base.ApplySnapshotChunk(input) @@ -177,8 +164,7 @@ func (m BaseMock) ApplySnapshotChunk(input types.RequestApplySnapshotChunk) type return ret } -func (m BaseMock) FinalizeBlock(input types.RequestFinalizeBlock) types.ResponseFinalizeBlock { - var ret types.ResponseFinalizeBlock +func (m BaseMock) FinalizeBlock(input types.RequestFinalizeBlock) (ret types.ResponseFinalizeBlock) { defer func() { if r := recover(); r != nil { ret = m.base.FinalizeBlock(input) diff --git a/abci/types/types.go b/abci/types/types.go index 4240301b5..3955e7af0 100644 --- a/abci/types/types.go +++ b/abci/types/types.go @@ -53,19 +53,35 @@ func (r ResponseQuery) IsErr() bool { return r.Code != CodeTypeOK } -// IsUnknown returns true if Code is Unknown -func (r ResponseVerifyVoteExtension) IsUnknown() bool { - return r.Result == ResponseVerifyVoteExtension_UNKNOWN +func (r ResponsePrepareProposal) IsTxStatusUnknown() bool { + return r.ModifiedTxStatus == ResponsePrepareProposal_UNKNOWN +} + +func (r ResponsePrepareProposal) IsTxStatusModified() bool { + return r.ModifiedTxStatus == ResponsePrepareProposal_MODIFIED +} + +func (r ResponseProcessProposal) IsAccepted() bool { + return r.Status == ResponseProcessProposal_ACCEPT +} + +func (r ResponseProcessProposal) IsStatusUnknown() bool { + return r.Status == ResponseProcessProposal_UNKNOWN +} + +// IsStatusUnknown returns true if Code is Unknown +func (r ResponseVerifyVoteExtension) IsStatusUnknown() bool { + return r.Status == ResponseVerifyVoteExtension_UNKNOWN } // IsOK returns true if Code is OK func (r ResponseVerifyVoteExtension) IsOK() bool { - return r.Result == ResponseVerifyVoteExtension_ACCEPT + return r.Status == ResponseVerifyVoteExtension_ACCEPT } // IsErr returns true if Code is something other than OK. func (r ResponseVerifyVoteExtension) IsErr() bool { - return r.Result != ResponseVerifyVoteExtension_ACCEPT + return r.Status != ResponseVerifyVoteExtension_ACCEPT } //--------------------------------------------------------------------------- @@ -159,12 +175,12 @@ func RespondExtendVote(appDataToSign, appDataSelfAuthenticating []byte) Response } func RespondVerifyVoteExtension(ok bool) ResponseVerifyVoteExtension { - result := ResponseVerifyVoteExtension_REJECT + status := ResponseVerifyVoteExtension_REJECT if ok { - result = ResponseVerifyVoteExtension_ACCEPT + status = ResponseVerifyVoteExtension_ACCEPT } return ResponseVerifyVoteExtension{ - Result: result, + Status: status, } } diff --git a/abci/types/types.pb.go b/abci/types/types.pb.go index b42c1e0bf..cbea553af 100644 --- a/abci/types/types.pb.go +++ b/abci/types/types.pb.go @@ -160,37 +160,90 @@ func (ResponseApplySnapshotChunk_Result) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{35, 0} } -type ResponseVerifyVoteExtension_Result int32 +type ResponseVerifyVoteExtension_VerifyStatus int32 const ( - ResponseVerifyVoteExtension_UNKNOWN ResponseVerifyVoteExtension_Result = 0 - ResponseVerifyVoteExtension_ACCEPT ResponseVerifyVoteExtension_Result = 1 - ResponseVerifyVoteExtension_SLASH ResponseVerifyVoteExtension_Result = 2 - ResponseVerifyVoteExtension_REJECT ResponseVerifyVoteExtension_Result = 3 + ResponseVerifyVoteExtension_UNKNOWN ResponseVerifyVoteExtension_VerifyStatus = 0 + ResponseVerifyVoteExtension_ACCEPT ResponseVerifyVoteExtension_VerifyStatus = 1 + ResponseVerifyVoteExtension_REJECT ResponseVerifyVoteExtension_VerifyStatus = 2 ) -var ResponseVerifyVoteExtension_Result_name = map[int32]string{ +var ResponseVerifyVoteExtension_VerifyStatus_name = map[int32]string{ 0: "UNKNOWN", 1: "ACCEPT", - 2: "SLASH", - 3: "REJECT", + 2: "REJECT", } -var ResponseVerifyVoteExtension_Result_value = map[string]int32{ +var ResponseVerifyVoteExtension_VerifyStatus_value = map[string]int32{ "UNKNOWN": 0, "ACCEPT": 1, - "SLASH": 2, - "REJECT": 3, + "REJECT": 2, } -func (x ResponseVerifyVoteExtension_Result) String() string { - return proto.EnumName(ResponseVerifyVoteExtension_Result_name, int32(x)) +func (x ResponseVerifyVoteExtension_VerifyStatus) String() string { + return proto.EnumName(ResponseVerifyVoteExtension_VerifyStatus_name, int32(x)) } -func (ResponseVerifyVoteExtension_Result) EnumDescriptor() ([]byte, []int) { +func (ResponseVerifyVoteExtension_VerifyStatus) EnumDescriptor() ([]byte, []int) { return fileDescriptor_252557cfdd89a31a, []int{37, 0} } +type ResponsePrepareProposal_ModifiedTxStatus int32 + +const ( + ResponsePrepareProposal_UNKNOWN ResponsePrepareProposal_ModifiedTxStatus = 0 + ResponsePrepareProposal_UNMODIFIED ResponsePrepareProposal_ModifiedTxStatus = 1 + ResponsePrepareProposal_MODIFIED ResponsePrepareProposal_ModifiedTxStatus = 2 +) + +var ResponsePrepareProposal_ModifiedTxStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "UNMODIFIED", + 2: "MODIFIED", +} + +var ResponsePrepareProposal_ModifiedTxStatus_value = map[string]int32{ + "UNKNOWN": 0, + "UNMODIFIED": 1, + "MODIFIED": 2, +} + +func (x ResponsePrepareProposal_ModifiedTxStatus) String() string { + return proto.EnumName(ResponsePrepareProposal_ModifiedTxStatus_name, int32(x)) +} + +func (ResponsePrepareProposal_ModifiedTxStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{38, 0} +} + +type ResponseProcessProposal_ProposalStatus int32 + +const ( + ResponseProcessProposal_UNKNOWN ResponseProcessProposal_ProposalStatus = 0 + ResponseProcessProposal_ACCEPT ResponseProcessProposal_ProposalStatus = 1 + ResponseProcessProposal_REJECT ResponseProcessProposal_ProposalStatus = 2 +) + +var ResponseProcessProposal_ProposalStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "ACCEPT", + 2: "REJECT", +} + +var ResponseProcessProposal_ProposalStatus_value = map[string]int32{ + "UNKNOWN": 0, + "ACCEPT": 1, + "REJECT": 2, +} + +func (x ResponseProcessProposal_ProposalStatus) String() string { + return proto.EnumName(ResponseProcessProposal_ProposalStatus_name, int32(x)) +} + +func (ResponseProcessProposal_ProposalStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor_252557cfdd89a31a, []int{39, 0} +} + // TxAction contains App-provided information on what to do with a transaction that is part of a raw proposal type TxRecord_TxAction int32 @@ -2929,7 +2982,7 @@ func (m *ResponseExtendVote) GetVoteExtension() *types1.VoteExtension { } type ResponseVerifyVoteExtension struct { - Result ResponseVerifyVoteExtension_Result `protobuf:"varint,1,opt,name=result,proto3,enum=tendermint.abci.ResponseVerifyVoteExtension_Result" json:"result,omitempty"` + Status ResponseVerifyVoteExtension_VerifyStatus `protobuf:"varint,1,opt,name=status,proto3,enum=tendermint.abci.ResponseVerifyVoteExtension_VerifyStatus" json:"status,omitempty"` } func (m *ResponseVerifyVoteExtension) Reset() { *m = ResponseVerifyVoteExtension{} } @@ -2965,20 +3018,20 @@ func (m *ResponseVerifyVoteExtension) XXX_DiscardUnknown() { var xxx_messageInfo_ResponseVerifyVoteExtension proto.InternalMessageInfo -func (m *ResponseVerifyVoteExtension) GetResult() ResponseVerifyVoteExtension_Result { +func (m *ResponseVerifyVoteExtension) GetStatus() ResponseVerifyVoteExtension_VerifyStatus { if m != nil { - return m.Result + return m.Status } return ResponseVerifyVoteExtension_UNKNOWN } type ResponsePrepareProposal struct { - ModifiedTx bool `protobuf:"varint,1,opt,name=modified_tx,json=modifiedTx,proto3" json:"modified_tx,omitempty"` - TxRecords []*TxRecord `protobuf:"bytes,2,rep,name=tx_records,json=txRecords,proto3" json:"tx_records,omitempty"` - AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` - ValidatorUpdates []*ValidatorUpdate `protobuf:"bytes,5,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates,omitempty"` - ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,6,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` + ModifiedTxStatus ResponsePrepareProposal_ModifiedTxStatus `protobuf:"varint,1,opt,name=modified_tx_status,json=modifiedTxStatus,proto3,enum=tendermint.abci.ResponsePrepareProposal_ModifiedTxStatus" json:"modified_tx_status,omitempty"` + TxRecords []*TxRecord `protobuf:"bytes,2,rep,name=tx_records,json=txRecords,proto3" json:"tx_records,omitempty"` + AppHash []byte `protobuf:"bytes,3,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + TxResults []*ExecTxResult `protobuf:"bytes,4,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` + ValidatorUpdates []*ValidatorUpdate `protobuf:"bytes,5,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates,omitempty"` + ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,6,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` } func (m *ResponsePrepareProposal) Reset() { *m = ResponsePrepareProposal{} } @@ -3014,11 +3067,11 @@ func (m *ResponsePrepareProposal) XXX_DiscardUnknown() { var xxx_messageInfo_ResponsePrepareProposal proto.InternalMessageInfo -func (m *ResponsePrepareProposal) GetModifiedTx() bool { +func (m *ResponsePrepareProposal) GetModifiedTxStatus() ResponsePrepareProposal_ModifiedTxStatus { if m != nil { - return m.ModifiedTx + return m.ModifiedTxStatus } - return false + return ResponsePrepareProposal_UNKNOWN } func (m *ResponsePrepareProposal) GetTxRecords() []*TxRecord { @@ -3057,11 +3110,11 @@ func (m *ResponsePrepareProposal) GetConsensusParamUpdates() *types1.ConsensusPa } type ResponseProcessProposal struct { - Accept bool `protobuf:"varint,1,opt,name=accept,proto3" json:"accept,omitempty"` - AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` - TxResults []*ExecTxResult `protobuf:"bytes,3,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` - ValidatorUpdates []*ValidatorUpdate `protobuf:"bytes,4,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates,omitempty"` - ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,5,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` + Status ResponseProcessProposal_ProposalStatus `protobuf:"varint,1,opt,name=status,proto3,enum=tendermint.abci.ResponseProcessProposal_ProposalStatus" json:"status,omitempty"` + AppHash []byte `protobuf:"bytes,2,opt,name=app_hash,json=appHash,proto3" json:"app_hash,omitempty"` + TxResults []*ExecTxResult `protobuf:"bytes,3,rep,name=tx_results,json=txResults,proto3" json:"tx_results,omitempty"` + ValidatorUpdates []*ValidatorUpdate `protobuf:"bytes,4,rep,name=validator_updates,json=validatorUpdates,proto3" json:"validator_updates,omitempty"` + ConsensusParamUpdates *types1.ConsensusParams `protobuf:"bytes,5,opt,name=consensus_param_updates,json=consensusParamUpdates,proto3" json:"consensus_param_updates,omitempty"` } func (m *ResponseProcessProposal) Reset() { *m = ResponseProcessProposal{} } @@ -3097,11 +3150,11 @@ func (m *ResponseProcessProposal) XXX_DiscardUnknown() { var xxx_messageInfo_ResponseProcessProposal proto.InternalMessageInfo -func (m *ResponseProcessProposal) GetAccept() bool { +func (m *ResponseProcessProposal) GetStatus() ResponseProcessProposal_ProposalStatus { if m != nil { - return m.Accept + return m.Status } - return false + return ResponseProcessProposal_UNKNOWN } func (m *ResponseProcessProposal) GetAppHash() []byte { @@ -4045,7 +4098,9 @@ func init() { proto.RegisterEnum("tendermint.abci.EvidenceType", EvidenceType_name, EvidenceType_value) proto.RegisterEnum("tendermint.abci.ResponseOfferSnapshot_Result", ResponseOfferSnapshot_Result_name, ResponseOfferSnapshot_Result_value) proto.RegisterEnum("tendermint.abci.ResponseApplySnapshotChunk_Result", ResponseApplySnapshotChunk_Result_name, ResponseApplySnapshotChunk_Result_value) - proto.RegisterEnum("tendermint.abci.ResponseVerifyVoteExtension_Result", ResponseVerifyVoteExtension_Result_name, ResponseVerifyVoteExtension_Result_value) + proto.RegisterEnum("tendermint.abci.ResponseVerifyVoteExtension_VerifyStatus", ResponseVerifyVoteExtension_VerifyStatus_name, ResponseVerifyVoteExtension_VerifyStatus_value) + proto.RegisterEnum("tendermint.abci.ResponsePrepareProposal_ModifiedTxStatus", ResponsePrepareProposal_ModifiedTxStatus_name, ResponsePrepareProposal_ModifiedTxStatus_value) + proto.RegisterEnum("tendermint.abci.ResponseProcessProposal_ProposalStatus", ResponseProcessProposal_ProposalStatus_name, ResponseProcessProposal_ProposalStatus_value) proto.RegisterEnum("tendermint.abci.TxRecord_TxAction", TxRecord_TxAction_name, TxRecord_TxAction_value) proto.RegisterType((*Request)(nil), "tendermint.abci.Request") proto.RegisterType((*RequestEcho)(nil), "tendermint.abci.RequestEcho") @@ -4106,220 +4161,223 @@ func init() { func init() { proto.RegisterFile("tendermint/abci/types.proto", fileDescriptor_252557cfdd89a31a) } var fileDescriptor_252557cfdd89a31a = []byte{ - // 3395 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x5b, 0x4b, 0x73, 0xdb, 0xd6, - 0xf5, 0xe7, 0xfb, 0x71, 0x28, 0x3e, 0x74, 0xa5, 0x38, 0x34, 0x63, 0x4b, 0x0e, 0x3c, 0x49, 0x1c, - 0x27, 0x91, 0xff, 0xb1, 0x27, 0xf9, 0x3b, 0x4d, 0xd2, 0x8c, 0x44, 0x51, 0xa1, 0x6c, 0x59, 0x52, - 0x20, 0xca, 0x99, 0xb4, 0xa9, 0x11, 0x10, 0xb8, 0x22, 0x11, 0x93, 0x00, 0x02, 0x80, 0x0a, 0x95, - 0x55, 0xa7, 0x33, 0xd9, 0x64, 0x3a, 0xd3, 0xec, 0xda, 0x99, 0x4e, 0xa6, 0x9b, 0x76, 0xa6, 0x1f, - 0xa0, 0x8b, 0xae, 0xba, 0x69, 0x17, 0x59, 0x74, 0x91, 0x5d, 0x3b, 0x5d, 0xa4, 0x9d, 0x64, 0xd7, - 0x2f, 0x90, 0x55, 0x1f, 0x73, 0x1f, 0x00, 0x01, 0x90, 0xe0, 0x23, 0xb6, 0xb3, 0xe9, 0x0e, 0xf7, - 0xf0, 0x9c, 0x83, 0x7b, 0x0f, 0xee, 0x3d, 0xe7, 0xfc,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0x55, 0x6c, 0xf1, 0x68, 0x5f, 0x1d, 0x37, - 0x75, 0x93, 0xfe, 0xce, 0x4d, 0xc3, 0xb9, 0xd1, 0x6d, 0xa8, 0xf4, 0x64, 0xdb, 0x91, 0x98, 0xf7, - 0x97, 0x7c, 0x91, 0xff, 0x89, 0x31, 0x23, 0xb3, 0x58, 0x41, 0x36, 0x34, 0x57, 0x52, 0x22, 0xa2, - 0x23, 0x2a, 0x12, 0x61, 0xb5, 0x7d, 0xf6, 0x91, 0xac, 0x3b, 0x9a, 0x8e, 0xa5, 0xb1, 0xaf, 0x76, - 0x7e, 0x4c, 0x61, 0xe3, 0x54, 0x53, 0xb1, 0xae, 0xb8, 0x9f, 0x6b, 0xc5, 0x13, 0xf6, 0x3e, 0xa7, - 0x2d, 0x88, 0x50, 0x0a, 0xc6, 0x5c, 0x54, 0x82, 0x84, 0x33, 0xe4, 0x8b, 0x4f, 0x38, 0x43, 0xf4, - 0x7f, 0x90, 0x22, 0x0b, 0xa4, 0x0b, 0x2f, 0x4d, 0x48, 0x58, 0xb8, 0x5c, 0xeb, 0xcc, 0xc4, 0x22, - 0xe5, 0x14, 0x04, 0xef, 0x28, 0x78, 0x71, 0x38, 0xac, 0x55, 0x78, 0x16, 0xca, 0xa1, 0x20, 0xeb, - 0xfb, 0x76, 0x71, 0xff, 0xb7, 0x13, 0xca, 0x50, 0x0c, 0x44, 0x53, 0xe1, 0x1c, 0xac, 0x4e, 0x0a, - 0x8e, 0x42, 0xd7, 0xa3, 0x07, 0x82, 0x1c, 0x7a, 0x09, 0x72, 0x5e, 0x74, 0x64, 0x47, 0x71, 0xdc, - 0x56, 0x2e, 0xb3, 0xe8, 0xb1, 0x92, 0x33, 0x48, 0xb6, 0x34, 0xdd, 0x0b, 0x09, 0x3a, 0xf1, 0xac, - 0x6c, 0x9a, 0x4d, 0xd9, 0xee, 0x0a, 0xef, 0x41, 0x35, 0x2a, 0xf2, 0x85, 0x96, 0x91, 0xf2, 0xb6, - 0xe0,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0x60, 0xbf, 0x3b, 0x19, 0x60, 0x47, 0x43, 0x60, 0x3e, 0xcd, 0xf9, 0x10, 0xb6, 0x14, 0x81, 0xb0, - 0xcb, 0x91, 0x68, 0x90, 0xa9, 0x9f, 0x1b, 0x62, 0x1f, 0x4f, 0x80, 0xd8, 0x0c, 0x0c, 0x5f, 0x89, - 0x54, 0x3e, 0x07, 0xc6, 0x3e, 0x9e, 0x80, 0xb1, 0x97, 0x67, 0xaa, 0x9d, 0x09, 0xb2, 0x77, 0x82, - 0x20, 0x1b, 0xcd, 0x38, 0x63, 0x91, 0x28, 0xbb, 0x1d, 0x85, 0xb2, 0x19, 0x12, 0x7e, 0x3e, 0x52, - 0xe3, 0x02, 0x30, 0xfb, 0x60, 0x0c, 0x66, 0xaf, 0xce, 0xd8, 0x69, 0xf3, 0xe2, 0xec, 0x67, 0x49, - 0xaa, 0x17, 0x72, 0xd5, 0x24, 0x5b, 0xc4, 0x96, 0x65, 0x58, 0x1c, 0x31, 0xb3, 0x81, 0x70, 0x85, - 0xe0, 0xae, 0x91, 0x5b, 0x9e, 0x82, 0xc9, 0x69, 0x56, 0xee, 0x73, 0xc5, 0xc2, 0xef, 0xe3, 0x23, - 0x59, 0x0a, 0x57, 0xfc, 0x98, 0x2d, 0xcf, 0x31, 0x9b, 0x0f, 0xa9, 0x27, 0x82, 0x48, 0x7d, 0x1d, - 0x0a, 0x24, 0xdb, 0x0e, 0x81, 0x70, 0xd9, 0xf4, 0x40, 0xf8, 0x55, 0x58, 0xa6, 0xe1, 0x93, 0xe1, - 0x79, 0x9e, 0x62, 0xa7, 0x68, 0x1a, 0x54, 0x26, 0x3f, 0x30, 0x2b, 0xb0, 0x5c, 0xfb, 0x05, 0x58, - 0xf1, 0xf1, 0x7a, 0x59, 0x3c, 0x43, 0xa4, 0x15, 0x8f, 0x7b, 0x93, 0xa7, 0xf3, 0x7f, 0x8a, 0x8f, - 0x2c, 0x34, 0x42, 0xef, 0x93, 0x80, 0x76, 0xfc, 0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29, 0xf3, 0x5d, 0x60, 0xad, 0xcd, 0xd9, 0x88, 0x23, 0xfa, 0x83, 0x75, 0x95, - 0xf9, 0x2e, 0xb4, 0xd6, 0xe6, 0xec, 0xcb, 0xa1, 0xf7, 0x61, 0x79, 0xbc, 0xee, 0x31, 0xff, 0xfd, - 0xd6, 0xda, 0x02, 0x9d, 0x3a, 0xd4, 0x07, 0x34, 0xa1, 0x5e, 0xb2, 0xc0, 0x75, 0xd7, 0xda, 0x22, - 0x8d, 0x3b, 0xa4, 0x42, 0x39, 0x0c, 0xbf, 0xe7, 0xbd, 0xfe, 0x5a, 0x9b, 0xbb, 0x89, 0xc7, 0xde, - 0x12, 0x84, 0x9a, 0xf3, 0x5e, 0x87, 0xad, 0xcd, 0xdd, 0xd3, 0x43, 0xc7, 0x00, 0xbe, 0x82, 0xca, - 0x1c, 0xd7, 0x63, 0x6b, 0xf3, 0x74, 0xf7, 0x90, 0x09, 0x2b, 0x93, 0x0a, 0x29, 0x8b, 0xdc, 0x96, - 0xad, 0x2d, 0xd4, 0xf4, 0x23, 0xfb, 0x39, 0x08, 0x31, 0xe7, 0xbb, 0x3d, 0x5b, 0x9b, 0xb3, 0xfb, - 0xb7, 0xd5, 0xf8, 0xfc, 0xab, 0xb5, 0xf8, 0x17, 0x5f, 0xad, 0xc5, 0xff, 0xf1, 0xd5, 0x5a, 0xfc, - 0xd3, 0xaf, 0xd7, 0x62, 0x5f, 0x7c, 0xbd, 0x16, 0xfb, 0xeb, 0xd7, 0x6b, 0xb1, 0x1f, 0x3c, 0xd7, - 0xd1, 0x9c, 0xee, 0xa0, 0xbd, 0xa1, 0x18, 0xfd, 0x6b, 0xfe, 0x3f, 0x52, 0x4c, 0xfa, 0x73, 0x47, - 0x3b, 0x43, 0xa3, 0xe9, 0x8d, 0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xf9, 0x85, 0x76, 0xba, 0xfc, - 0x31, 0x00, 0x00, + // 3443 bytes of a gzipped FileDescriptorProto + 0x1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1, 0x1f, 0xac, 0x27, 0xcd, 0xf7, + 0x90, 0xb7, 0x36, 0xe7, 0x7d, 0x24, 0xfa, 0x10, 0x96, 0xc6, 0xeb, 0x3d, 0xf3, 0xbf, 0xeb, 0xad, + 0x2d, 0x70, 0x43, 0x89, 0xfa, 0x80, 0x26, 0xd4, 0x89, 0x16, 0x78, 0xe6, 0x5b, 0x5b, 0xe4, 0xc2, + 0x12, 0xa9, 0x50, 0x09, 0x57, 0x1d, 0xe6, 0x7d, 0xf6, 0x5b, 0x9b, 0xfb, 0xf2, 0x92, 0x7d, 0x25, + 0x08, 0x6d, 0xe7, 0x7d, 0x06, 0x5c, 0x9b, 0xfb, 0x2e, 0x13, 0x1d, 0x01, 0xf8, 0x0a, 0x49, 0x73, + 0x3c, 0x0b, 0xae, 0xcd, 0x73, 0xab, 0x89, 0x0c, 0x58, 0x9e, 0x54, 0x40, 0x5a, 0xe4, 0x95, 0x70, + 0x6d, 0xa1, 0xcb, 0x4e, 0xb2, 0x9f, 0x83, 0x10, 0x73, 0xbe, 0x57, 0xc3, 0xb5, 0x39, 0x6f, 0x3d, + 0x37, 0x1b, 0x5f, 0x7e, 0xb3, 0x1a, 0xff, 0xea, 0x9b, 0xd5, 0xf8, 0xdf, 0xbe, 0x59, 0x8d, 0x7f, + 0xfe, 0xed, 0x6a, 0xec, 0xab, 0x6f, 0x57, 0x63, 0x7f, 0xfe, 0x76, 0x35, 0xf6, 0xbf, 0x2f, 0x74, + 0x34, 0xbb, 0x3b, 0x3c, 0x5e, 0x6f, 0xeb, 0xfd, 0x6b, 0xfe, 0x3f, 0x90, 0x4c, 0xfa, 0x53, 0xcb, + 0x71, 0x86, 0x46, 0xd3, 0x1b, 0xff, 0x0e, 0x00, 0x00, 0xff, 0xff, 0xb5, 0xc1, 0x14, 0x70, 0xf4, + 0x32, 0x00, 0x00, } // Reference imports to suppress errors if they are not otherwise used. @@ -7487,8 +7545,8 @@ func (m *ResponseVerifyVoteExtension) MarshalToSizedBuffer(dAtA []byte) (int, er _ = i var l int _ = l - if m.Result != 0 { - i = encodeVarintTypes(dAtA, i, uint64(m.Result)) + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } @@ -7576,13 +7634,8 @@ func (m *ResponsePrepareProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) dAtA[i] = 0x12 } } - if m.ModifiedTx { - i-- - if m.ModifiedTx { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.ModifiedTxStatus != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.ModifiedTxStatus)) i-- dAtA[i] = 0x8 } @@ -7656,13 +7709,8 @@ func (m *ResponseProcessProposal) MarshalToSizedBuffer(dAtA []byte) (int, error) i-- dAtA[i] = 0x12 } - if m.Accept { - i-- - if m.Accept { - dAtA[i] = 1 - } else { - dAtA[i] = 0 - } + if m.Status != 0 { + i = encodeVarintTypes(dAtA, i, uint64(m.Status)) i-- dAtA[i] = 0x8 } @@ -9586,8 +9634,8 @@ func (m *ResponseVerifyVoteExtension) Size() (n int) { } var l int _ = l - if m.Result != 0 { - n += 1 + sovTypes(uint64(m.Result)) + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) } return n } @@ -9598,8 +9646,8 @@ func (m *ResponsePrepareProposal) Size() (n int) { } var l int _ = l - if m.ModifiedTx { - n += 2 + if m.ModifiedTxStatus != 0 { + n += 1 + sovTypes(uint64(m.ModifiedTxStatus)) } if len(m.TxRecords) > 0 { for _, e := range m.TxRecords { @@ -9636,8 +9684,8 @@ func (m *ResponseProcessProposal) Size() (n int) { } var l int _ = l - if m.Accept { - n += 2 + if m.Status != 0 { + n += 1 + sovTypes(uint64(m.Status)) } l = len(m.AppHash) if l > 0 { @@ -16209,9 +16257,9 @@ func (m *ResponseVerifyVoteExtension) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Result", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - m.Result = 0 + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -16221,7 +16269,7 @@ func (m *ResponseVerifyVoteExtension) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - m.Result |= ResponseVerifyVoteExtension_Result(b&0x7F) << shift + m.Status |= ResponseVerifyVoteExtension_VerifyStatus(b&0x7F) << shift if b < 0x80 { break } @@ -16278,9 +16326,9 @@ func (m *ResponsePrepareProposal) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field ModifiedTx", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field ModifiedTxStatus", wireType) } - var v int + m.ModifiedTxStatus = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -16290,12 +16338,11 @@ func (m *ResponsePrepareProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.ModifiedTxStatus |= ResponsePrepareProposal_ModifiedTxStatus(b&0x7F) << shift if b < 0x80 { break } } - m.ModifiedTx = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field TxRecords", wireType) @@ -16520,9 +16567,9 @@ func (m *ResponseProcessProposal) Unmarshal(dAtA []byte) error { switch fieldNum { case 1: if wireType != 0 { - return fmt.Errorf("proto: wrong wireType = %d for field Accept", wireType) + return fmt.Errorf("proto: wrong wireType = %d for field Status", wireType) } - var v int + m.Status = 0 for shift := uint(0); ; shift += 7 { if shift >= 64 { return ErrIntOverflowTypes @@ -16532,12 +16579,11 @@ func (m *ResponseProcessProposal) Unmarshal(dAtA []byte) error { } b := dAtA[iNdEx] iNdEx++ - v |= int(b&0x7F) << shift + m.Status |= ResponseProcessProposal_ProposalStatus(b&0x7F) << shift if b < 0x80 { break } } - m.Accept = bool(v != 0) case 2: if wireType != 2 { return fmt.Errorf("proto: wrong wireType = %d for field AppHash", wireType) diff --git a/internal/consensus/mempool_test.go b/internal/consensus/mempool_test.go index 6d1d7e8e4..addf60556 100644 --- a/internal/consensus/mempool_test.go +++ b/internal/consensus/mempool_test.go @@ -310,10 +310,12 @@ func (app *CounterApplication) Commit() abci.ResponseCommit { func (app *CounterApplication) PrepareProposal( req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { - return abci.ResponsePrepareProposal{} + return abci.ResponsePrepareProposal{ + ModifiedTxStatus: abci.ResponsePrepareProposal_UNMODIFIED, + } } func (app *CounterApplication) ProcessProposal( req abci.RequestProcessProposal) abci.ResponseProcessProposal { - return abci.ResponseProcessProposal{Accept: true} + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} } diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index 58addd620..f03889c9e 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -11,7 +11,7 @@ import ( "github.com/stretchr/testify/require" "github.com/tendermint/tendermint/abci/example/kvstore" - abcitypes "github.com/tendermint/tendermint/abci/types" + abci "github.com/tendermint/tendermint/abci/types" abcimocks "github.com/tendermint/tendermint/abci/types/mocks" "github.com/tendermint/tendermint/crypto/tmhash" cstypes "github.com/tendermint/tendermint/internal/consensus/types" @@ -1913,7 +1913,11 @@ func TestProcessProposalAccept(t *testing.T) { defer cancel() m := abcimocks.NewBaseMock() - m.On("ProcessProposal", mock.Anything).Return(abcitypes.ResponseProcessProposal{Accept: testCase.accept}) + status := abci.ResponseProcessProposal_REJECT + if testCase.accept { + status = abci.ResponseProcessProposal_ACCEPT + } + m.On("ProcessProposal", mock.Anything).Return(abci.ResponseProcessProposal{Status: status}) cs1, _ := makeState(ctx, t, makeStateArgs{config: config, application: m}) height, round := cs1.Height, cs1.Round @@ -1961,11 +1965,11 @@ func TestFinalizeBlockCalled(t *testing.T) { defer cancel() m := abcimocks.NewBaseMock() - m.On("ProcessProposal", mock.Anything).Return(abcitypes.ResponseProcessProposal{Accept: true}) - m.On("VerifyVoteExtension", mock.Anything).Return(abcitypes.ResponseVerifyVoteExtension{ - Result: abcitypes.ResponseVerifyVoteExtension_ACCEPT, + m.On("ProcessProposal", mock.Anything).Return(abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}) + m.On("VerifyVoteExtension", mock.Anything).Return(abci.ResponseVerifyVoteExtension{ + Status: abci.ResponseVerifyVoteExtension_ACCEPT, }) - m.On("FinalizeBlock", mock.Anything).Return(abcitypes.ResponseFinalizeBlock{}).Maybe() + m.On("FinalizeBlock", mock.Anything).Return(abci.ResponseFinalizeBlock{}).Maybe() cs1, vss := makeState(ctx, t, makeStateArgs{config: config, application: m}) height, round := cs1.Height, cs1.Round diff --git a/internal/state/execution.go b/internal/state/execution.go index e8c8c0f58..7010010da 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -140,8 +140,11 @@ func (blockExec *BlockExecutor) CreateProposalBlock( // purpose for now. panic(err) } + if rpp.IsTxStatusUnknown() { + panic(fmt.Sprintf("PrepareProposal responded with ModifiedTxStatus %s", rpp.ModifiedTxStatus.String())) + } - if !rpp.ModifiedTx { + if !rpp.IsTxStatusModified() { return block, nil } txrSet := types.NewTxRecordSet(rpp.TxRecords) @@ -181,8 +184,11 @@ func (blockExec *BlockExecutor) ProcessProposal( if err != nil { return false, ErrInvalidBlock(err) } + if resp.IsStatusUnknown() { + panic(fmt.Sprintf("ProcessProposal responded with status %s", resp.Status.String())) + } - return resp.Accept, nil + return resp.IsAccepted(), nil } // ValidateBlock validates the given block against the given state. diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index b5c4e0975..6f2c7e87c 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -338,7 +338,7 @@ func TestProcessProposal(t *testing.T) { }, } - app.On("ProcessProposal", mock.Anything).Return(abci.ResponseProcessProposal{Accept: true}) + app.On("ProcessProposal", mock.Anything).Return(abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT}) acceptBlock, err := blockExec.ProcessProposal(ctx, block1, state) require.NoError(t, err) require.True(t, acceptBlock) @@ -615,6 +615,9 @@ func TestEmptyPrepareProposal(t *testing.T) { require.NoError(t, eventBus.Start(ctx)) app := abcimocks.NewBaseMock() + app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ + ModifiedTxStatus: abci.ResponsePrepareProposal_UNMODIFIED, + }, nil) cc := abciclient.NewLocalClient(logger, app) proxyApp := proxy.New(cc, logger, proxy.NopMetrics()) err := proxyApp.Start(ctx) @@ -674,7 +677,7 @@ func TestPrepareProposalPanicOnInvalid(t *testing.T) { // create an invalid ResponsePrepareProposal rpp := abci.ResponsePrepareProposal{ - ModifiedTx: true, + ModifiedTxStatus: abci.ResponsePrepareProposal_MODIFIED, TxRecords: []*abci.TxRecord{ { Action: abci.TxRecord_REMOVED, @@ -737,8 +740,8 @@ func TestPrepareProposalRemoveTxs(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: true, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_MODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) @@ -798,8 +801,8 @@ func TestPrepareProposalAddedTxsIncluded(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: true, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_MODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) @@ -856,8 +859,8 @@ func TestPrepareProposalReorderTxs(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: true, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_MODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) @@ -886,10 +889,10 @@ func TestPrepareProposalReorderTxs(t *testing.T) { } -// TestPrepareProposalModifiedTxFalse tests that CreateBlock correctly ignores +// TestPrepareProposalModifiedTxStatusFalse tests that CreateBlock correctly ignores // the ResponsePrepareProposal TxRecords if ResponsePrepareProposal does not -// set ModifiedTx to true. -func TestPrepareProposalModifiedTxFalse(t *testing.T) { +// set ModifiedTxStatus to true. +func TestPrepareProposalModifiedTxStatusFalse(t *testing.T) { const height = 2 ctx, cancel := context.WithCancel(context.Background()) defer cancel() @@ -919,8 +922,8 @@ func TestPrepareProposalModifiedTxFalse(t *testing.T) { app := abcimocks.NewBaseMock() app.On("PrepareProposal", mock.Anything).Return(abci.ResponsePrepareProposal{ - ModifiedTx: false, - TxRecords: trs, + ModifiedTxStatus: abci.ResponsePrepareProposal_UNMODIFIED, + TxRecords: trs, }, nil) cc := abciclient.NewLocalClient(logger, app) diff --git a/internal/state/helpers_test.go b/internal/state/helpers_test.go index dffb6f256..1e0187247 100644 --- a/internal/state/helpers_test.go +++ b/internal/state/helpers_test.go @@ -320,8 +320,8 @@ func (app *testApp) Query(reqQuery abci.RequestQuery) (resQuery abci.ResponseQue func (app *testApp) ProcessProposal(req abci.RequestProcessProposal) abci.ResponseProcessProposal { for _, tx := range req.Txs { if len(tx) == 0 { - return abci.ResponseProcessProposal{Accept: false} + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} } } - return abci.ResponseProcessProposal{Accept: true} + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} } diff --git a/proto/tendermint/abci/types.proto b/proto/tendermint/abci/types.proto index c65e13f3e..53742c41e 100644 --- a/proto/tendermint/abci/types.proto +++ b/proto/tendermint/abci/types.proto @@ -21,25 +21,25 @@ import "gogoproto/gogo.proto"; message Request { oneof value { - RequestEcho echo = 1; - RequestFlush flush = 2; - RequestInfo info = 3; - RequestInitChain init_chain = 4; - RequestQuery query = 5; - RequestBeginBlock begin_block = 6 [deprecated = true]; - RequestCheckTx check_tx = 7; - RequestDeliverTx deliver_tx = 8 [deprecated = true]; - RequestEndBlock end_block = 9 [deprecated = true]; - RequestCommit commit = 10; - RequestListSnapshots list_snapshots = 11; - RequestOfferSnapshot offer_snapshot = 12; - RequestLoadSnapshotChunk load_snapshot_chunk = 13; - RequestApplySnapshotChunk apply_snapshot_chunk = 14; - RequestPrepareProposal prepare_proposal = 15; - RequestProcessProposal process_proposal = 16; + RequestEcho echo = 1; + RequestFlush flush = 2; + RequestInfo info = 3; + RequestInitChain init_chain = 4; + RequestQuery query = 5; + RequestBeginBlock begin_block = 6 [deprecated = true]; + RequestCheckTx check_tx = 7; + RequestDeliverTx deliver_tx = 8 [deprecated = true]; + RequestEndBlock end_block = 9 [deprecated = true]; + RequestCommit commit = 10; + RequestListSnapshots list_snapshots = 11; + RequestOfferSnapshot offer_snapshot = 12; + RequestLoadSnapshotChunk load_snapshot_chunk = 13; + RequestApplySnapshotChunk apply_snapshot_chunk = 14; + RequestPrepareProposal prepare_proposal = 15; + RequestProcessProposal process_proposal = 16; RequestExtendVote extend_vote = 17; RequestVerifyVoteExtension verify_vote_extension = 18; - RequestFinalizeBlock finalize_block = 19; + RequestFinalizeBlock finalize_block = 19; } } @@ -169,26 +169,26 @@ message RequestFinalizeBlock { message Response { oneof value { - ResponseException exception = 1; - ResponseEcho echo = 2; - ResponseFlush flush = 3; - ResponseInfo info = 4; - ResponseInitChain init_chain = 5; - ResponseQuery query = 6; - ResponseBeginBlock begin_block = 7 [deprecated = true]; - ResponseCheckTx check_tx = 8; - ResponseDeliverTx deliver_tx = 9 [deprecated = true]; - ResponseEndBlock end_block = 10 [deprecated = true]; - ResponseCommit commit = 11; - ResponseListSnapshots list_snapshots = 12; - ResponseOfferSnapshot offer_snapshot = 13; - ResponseLoadSnapshotChunk load_snapshot_chunk = 14; - ResponseApplySnapshotChunk apply_snapshot_chunk = 15; - ResponsePrepareProposal prepare_proposal = 16; - ResponseProcessProposal process_proposal = 17; + ResponseException exception = 1; + ResponseEcho echo = 2; + ResponseFlush flush = 3; + ResponseInfo info = 4; + ResponseInitChain init_chain = 5; + ResponseQuery query = 6; + ResponseBeginBlock begin_block = 7 [deprecated = true]; + ResponseCheckTx check_tx = 8; + ResponseDeliverTx deliver_tx = 9 [deprecated = true]; + ResponseEndBlock end_block = 10 [deprecated = true]; + ResponseCommit commit = 11; + ResponseListSnapshots list_snapshots = 12; + ResponseOfferSnapshot offer_snapshot = 13; + ResponseLoadSnapshotChunk load_snapshot_chunk = 14; + ResponseApplySnapshotChunk apply_snapshot_chunk = 15; + ResponsePrepareProposal prepare_proposal = 16; + ResponseProcessProposal process_proposal = 17; ResponseExtendVote extend_vote = 18; ResponseVerifyVoteExtension verify_vote_extension = 19; - ResponseFinalizeBlock finalize_block = 20; + ResponseFinalizeBlock finalize_block = 20; } } @@ -316,20 +316,32 @@ message ResponseApplySnapshotChunk { } message ResponsePrepareProposal { - bool modified_tx = 1; + ModifiedTxStatus modified_tx_status = 1; repeated TxRecord tx_records = 2; bytes app_hash = 3; repeated ExecTxResult tx_results = 4; repeated ValidatorUpdate validator_updates = 5; tendermint.types.ConsensusParams consensus_param_updates = 6; + + enum ModifiedTxStatus { + UNKNOWN = 0; + UNMODIFIED = 1; + MODIFIED = 2; + } } message ResponseProcessProposal { - bool accept = 1; + ProposalStatus status = 1; bytes app_hash = 2; repeated ExecTxResult tx_results = 3; repeated ValidatorUpdate validator_updates = 4; tendermint.types.ConsensusParams consensus_param_updates = 5; + + enum ProposalStatus { + UNKNOWN = 0; + ACCEPT = 1; + REJECT = 2; + } } message ResponseExtendVote { @@ -337,7 +349,13 @@ message ResponseExtendVote { } message ResponseVerifyVoteExtension { - bool accept = 1; + VerifyStatus status = 1; + + enum VerifyStatus { + UNKNOWN = 0; + ACCEPT = 1; + REJECT = 2; + } } message ResponseFinalizeBlock { @@ -388,7 +406,7 @@ message ExecTxResult { string info = 4; // nondeterministic int64 gas_wanted = 5; int64 gas_used = 6; - repeated Event events = 7 + repeated Event events = 7 [(gogoproto.nullable) = false, (gogoproto.jsontag) = "events,omitempty"]; // nondeterministic string codespace = 8; } @@ -404,8 +422,8 @@ message TxResult { } message TxRecord { - TxAction action = 1; - bytes tx = 2; + TxAction action = 1; + bytes tx = 2; // TxAction contains App-provided information on what to do with a transaction that is part of a raw proposal enum TxAction { diff --git a/proto/tendermint/abci/types.proto.intermediate b/proto/tendermint/abci/types.proto.intermediate index d710ed06f..cf77d25ea 100644 --- a/proto/tendermint/abci/types.proto.intermediate +++ b/proto/tendermint/abci/types.proto.intermediate @@ -123,16 +123,6 @@ message RequestApplySnapshotChunk { string sender = 3; } -// Extends a vote with application-side injection -message RequestExtendVote { - types.Vote vote = 1; -} - -// Verify the vote extension -message RequestVerifyVoteExtension { - types.Vote vote = 1; -} - message RequestPrepareProposal { bytes hash = 1; tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; @@ -153,6 +143,16 @@ message RequestProcessProposal { repeated Evidence byzantine_validators = 5 [(gogoproto.nullable) = false]; } +// Extends a vote with application-side injection +message RequestExtendVote { + types.Vote vote = 1; +} + +// Verify the vote extension +message RequestVerifyVoteExtension { + types.Vote vote = 1; +} + message RequestFinalizeBlock { bytes hash = 1; tendermint.types.Header header = 2 [(gogoproto.nullable) = false]; @@ -312,36 +312,47 @@ message ResponseApplySnapshotChunk { } } -message ResponseExtendVote { - tendermint.types.VoteExtension vote_extension = 1; -} - -message ResponseVerifyVoteExtension { - Result result = 1; - - enum Result { - UNKNOWN = 0; // Unknown result, reject vote extension - ACCEPT = 1; // Vote extension verified, include the vote - SLASH = 2; // Vote extension verification aborted, continue but slash validator - REJECT = 3; // Vote extension invalidated - } -} - message ResponsePrepareProposal { - bool modified_tx = 1; + ModifiedTxStatus modified_tx_status = 1; repeated TxRecord tx_records = 2; bytes app_hash = 3; repeated ExecTxResult tx_results = 4; repeated ValidatorUpdate validator_updates = 5; tendermint.types.ConsensusParams consensus_param_updates = 6; + + enum ModifiedTxStatus { + UNKNOWN = 0; + UNMODIFIED = 1; + MODIFIED = 2; + } } message ResponseProcessProposal { - bool accept = 1; + ProposalStatus status = 1; bytes app_hash = 2; repeated ExecTxResult tx_results = 3; repeated ValidatorUpdate validator_updates = 4; tendermint.types.ConsensusParams consensus_param_updates = 5; + + enum ProposalStatus { + UNKNOWN = 0; + ACCEPT = 1; + REJECT = 2; + } +} + +message ResponseExtendVote { + tendermint.types.VoteExtension vote_extension = 1; +} + +message ResponseVerifyVoteExtension { + VerifyStatus status = 1; + + enum VerifyStatus { + UNKNOWN = 0; + ACCEPT = 1; + REJECT = 2; + } } message ResponseFinalizeBlock { diff --git a/scripts/abci-gen.sh b/scripts/abci-gen.sh index fe3728ad4..f4666dee9 100755 --- a/scripts/abci-gen.sh +++ b/scripts/abci-gen.sh @@ -18,8 +18,6 @@ sh ./scripts/protopackage.sh ./proto/tendermint/abci/types.proto $MODNAME "abci/ make proto-gen -mv ./proto/tendermint/abci/types.pb.go ./abci/types - echo "proto files have been compiled" echo "checking out copied files" diff --git a/spec/abci++/abci++_methods_002_draft.md b/spec/abci++/abci++_methods_002_draft.md index 4114bb9b8..cd7fb5961 100644 --- a/spec/abci++/abci++_methods_002_draft.md +++ b/spec/abci++/abci++_methods_002_draft.md @@ -298,7 +298,7 @@ title: Methods | Name | Type | Description | Field Number | |-------------------------|--------------------------------------------------|---------------------------------------------------------------------------------------------|--------------| - | modified_tx | bool | The Application sets it to true to denote it made changes to transactions | 1 | + | modified_tx_status | [TxModifiedStatus](#TxModifiedStatus) | `enum` signaling if the application has made changes to the list of transactions. | 1 | | tx_records | repeated [TxRecord](#txrecord) | Possibly modified list of transactions that have been picked as part of the proposed block. | 2 | | app_hash | bytes | The Merkle root hash of the application state. | 3 | | tx_results | repeated [ExecTxResult](#txresult) | List of structures containing the data resulting from executing the transactions | 4 | @@ -311,15 +311,15 @@ title: Methods * The header contains the height, timestamp, and more - it exactly matches the Tendermint block header. * `RequestPrepareProposal` contains a preliminary set of transactions `txs` that Tendermint considers to be a good block proposal, called _raw proposal_. The Application can modify this set via `ResponsePrepareProposal.tx_records` (see [TxRecord](#txrecord)). - * In this case, the Application should set `ResponsePrepareProposal.modified_tx` to true. + * In this case, the Application should set `ResponsePrepareProposal.modified_tx_status` to `MODIFIED`. * The Application _can_ reorder, remove or add transactions to the raw proposal. Let `tx` be a transaction in `txs`: * If the Application considers that `tx` should not be proposed in this block, e.g., there are other transactions with higher priority, then it should not include it in `tx_records`. In this case, Tendermint won't remove `tx` from the mempool. The Application should be extra-careful, as abusing this feature may cause transactions to stay forever in the mempool. - * If the Application considers that a `tx` should not be included in the proposal and removed from the mempool, then the Application should include it in `tx_records` and _mark_ it as "REMOVE". In this case, Tendermint will remove `tx` from the mempool. - * If the Application wants to add a new transaction, then the Application should include it in `tx_records` and _mark_ it as "ADD". In this case, Tendermint will add it to the mempool. + * If the Application considers that a `tx` should not be included in the proposal and removed from the mempool, then the Application should include it in `tx_records` and _mark_ it as `REMOVE`. In this case, Tendermint will remove `tx` from the mempool. + * If the Application wants to add a new transaction, then the Application should include it in `tx_records` and _mark_ it as `ADD`. In this case, Tendermint will add it to the mempool. * The Application should be aware that removing and adding transactions may compromise _traceability_. > Consider the following example: the Application transforms a client-submitted transaction `t1` into a second transaction `t2`, i.e., the Application asks Tendermint to remove `t1` and add `t2` to the mempool. If a client wants to eventually check what happened to `t1`, it will discover that `t_1` is not in the mempool or in a committed block, getting the wrong idea that `t_1` did not make it into a block. Note that `t_2` _will be_ in a committed block, but unless the Application tracks this information, no component will be aware of it. Thus, if the Application wants traceability, it is its responsability to support it. For instance, the Application could attach to a transformed transaction a list with the hashes of the transactions it derives from. * If the Application modifies the set of transactions, the modified transactions MUST NOT exceed the configured maximum size `RequestPrepareProposal.max_tx_bytes`. - * If the Application does not modify the preliminary set of transactions `txs`, then it sets `ResponsePrepareProposal.modified_tx` to false. In this case, Tendermint will ignore the contents of `ResponsePrepareProposal.tx_records`. + * If the Application does not modify the preliminary set of transactions `txs`, then it sets `ResponsePrepareProposal.modified_tx_status` to `UNMODIFIED`. In this case, Tendermint will ignore the contents of `ResponsePrepareProposal.tx_records`. * In same-block execution mode, the Application must provide values for `ResponsePrepareProposal.app_hash`, `ResponsePrepareProposal.tx_results`, `ResponsePrepareProposal.validator_updates`, and `ResponsePrepareProposal.consensus_param_updates`, as a result of fully executing the block. @@ -348,12 +348,10 @@ title: Methods * As a sanity check, Tendermint will check the returned parameters for validity if the Application modified them. In particular, `ResponsePrepareProposal.tx_records` will be deemed invalid if * There is a duplicate transaction in the list. - * A new or modified transaction is marked as "TXUNMODIFIED" or "TXREMOVED". - * An unmodified transaction is marked as "TXADDED". - * A transaction is marked as "TXUNKNOWN". - * If Tendermint's sanity checks on the parameters of `ResponsePrepareProposal` fails, then it will drop the proposal - and proceed to the next round (thus simulating a network loss/delay of the proposal). - * **TODO**: [From discussion with William] Another possibility here is to panic. What do folks think we should do here? + * A new or modified transaction is marked as `UNMODIFIED` or `REMOVED`. + * An unmodified transaction is marked as `ADDED`. + * A transaction is marked as `UNKNOWN`. + * If Tendermint fails to validate the `ResponsePrepareProposal`, Tendermint will assume the application is faulty and crash. * The implementation of `PrepareProposal` can be non-deterministic. #### When does Tendermint call it? @@ -411,7 +409,7 @@ Note that, if _p_ has a non-`nil` _validValue_, Tendermint will use it as propos | Name | Type | Description | Field Number | |-------------------------|--------------------------------------------------|-----------------------------------------------------------------------------------|--------------| - | accept | bool | If false, the received block failed verification. | 1 | + | status | [ProposalStatus](#ProposalStatus) | `enum` that signals if the application finds the proposal valid. | 1 | | app_hash | bytes | The Merkle root hash of the application state. | 2 | | tx_results | repeated [ExecTxResult](#txresult) | List of structures containing the data resulting from executing the transactions. | 3 | | validator_updates | repeated [ValidatorUpdate](#validatorupdate) | Changes to validator set (set voting power to 0 to remove). | 4 | @@ -432,25 +430,23 @@ Note that, if _p_ has a non-`nil` _validValue_, Tendermint will use it as propos and _ConsensusHash_ refer to the **same** block being passed in the `Request*` call to this method (data was provided by the call to `ResponsePrepareProposal` at the current height that resulted in the block being passed in the `Request*` call to this method) - * If `ResponseProcessProposal.accept` is _false_, Tendermint assumes the proposal received + * If `ResponseProcessProposal.status` is `REJECT`, Tendermint assumes the proposal received is not valid. * In same-block execution mode, the Application is required to fully execute the block and provide values for parameters `ResponseProcessProposal.app_hash`, `ResponseProcessProposal.tx_results`, `ResponseProcessProposal.validator_updates`, and `ResponseProcessProposal.consensus_param_updates`, so that Tendermint can then verify the hashes in the block's header are correct. - If the hashes mismatch, Tendermint will reject the block even if `ResponseProcessProposal.accept` - was set to _true_. + If the hashes mismatch, Tendermint will reject the block even if `ResponseProcessProposal.status` + was set to `ACCEPT`. * In next-block execution mode, the Application should *not* provide values for parameters `ResponseProcessProposal.app_hash`, `ResponseProcessProposal.tx_results`, `ResponseProcessProposal.validator_updates`, and `ResponseProcessProposal.consensus_param_updates`. * The implementation of `ProcessProposal` MUST be deterministic. Moreover, the value of - `ResponseProcessProposal.accept` MUST **exclusively** depend on the parameters passed in + `ResponseProcessProposal.status` MUST **exclusively** depend on the parameters passed in the call to `RequestProcessProposal`, and the last committed Application state (see [Requirements](abci++_app_requirements_002_draft.md) section). - * Moreover, application implementors SHOULD always set `ResponseProcessProposal.accept` to _true_, - unless they _really_ know what the potential liveness implications of returning _false_ are. - ->**TODO**: should `ResponseProcessProposal.accept` be of type `Result` rather than `bool`? (so we are able to extend the possible values in the future?) + * Moreover, application implementors SHOULD always set `ResponseProcessProposal.status` to `ACCEPT`, + unless they _really_ know what the potential liveness implications of returning `REJECT` are. #### When does Tendermint call it? @@ -537,20 +533,20 @@ a [CanonicalVoteExtension](#canonicalvoteextension) field in the `precommit nil` * **Response**: - | Name | Type | Description | Field Number | - |--------|------|-------------------------------------------------------|--------------| - | accept | bool | If false, Application is rejecting the vote extension | 1 | + | Name | Type | Description | Field Number | + |--------|-------------------------------|----------------------------------------------------------------|--------------| + | status | [VerifyStatus](#VerifyStatus) | `enum` signaling if the application accepts the vote extension | 1 | * **Usage**: - * If `ResponseVerifyVoteExtension.accept` is _false_, Tendermint will reject the whole received vote. + * If `ResponseVerifyVoteExtension.status` is `REJECT`, Tendermint will reject the whole received vote. See the [Requirements](abci++_app_requirements_002_draft.md) section to understand the potential liveness implications of this. * The implementation of `VerifyVoteExtension` MUST be deterministic. Moreover, the value of - `ResponseVerifyVoteExtension.accept` MUST **exclusively** depend on the parameters passed in + `ResponseVerifyVoteExtension.status` MUST **exclusively** depend on the parameters passed in the call to `RequestVerifyVoteExtension`, and the last committed Application state (see [Requirements](abci++_app_requirements_002_draft.md) section). - * Moreover, application implementors SHOULD always set `ResponseVerifyVoteExtension.accept` to _true_, - unless they _really_ know what the potential liveness implications of returning _false_ are. + * Moreover, application implementers SHOULD always set `ResponseVerifyVoteExtension.status` to `ACCEPT`, + unless they _really_ know what the potential liveness implications of returning `REJECT` are. #### When does Tendermint call it? @@ -558,7 +554,7 @@ When a validator _p_ is in Tendermint consensus round _r_, height _h_, state _pr from this condition, but not sure), and _p_ receives a Precommit message for round _r_, height _h_ from _q_: 1. _p_'s Tendermint calls `RequestVerifyVoteExtension`. -2. The Application returns _accept_ or _reject_ via `ResponseVerifyVoteExtension.accept`. +2. The Application returns _accept_ or _reject_ via `ResponseVerifyVoteExtension.status`. 3. If the Application returns * _accept_, _p_'s Tendermint will keep the received vote, together with its corresponding vote extension in its internal data structures. It will be used to populate the [ExtendedCommitInfo](#extendedcommitinfo) @@ -832,20 +828,20 @@ Most of the data structures used in ABCI are shared [common data structures](../ ### TxAction -```protobuf - enum TxAction { - TXUNKNOWN = 0; // Unknown action - TXUNMODIFIED = 1; // The Application did not modify this transaction. - TXADDED = 2; // The Application added this transaction. - TXREMOVED = 3; // The Application wants this transaction removed from the proposal and the mempool. - } +```proto +enum TxAction { + UNKNOWN = 0; // Unknown action + UNMODIFIED = 1; // The Application did not modify this transaction. + ADDED = 2; // The Application added this transaction. + REMOVED = 3; // The Application wants this transaction removed from the proposal and the mempool. +} ``` * **Usage**: - * If `Action` is TXUNKNOWN, a problem happened in the Application. Tendermint will ignore this transaction. **TODO** should we panic? - * If `Action` is TXUNMODIFIED, Tendermint includes the transaction in the proposal. Nothing to do on the mempool. - * If `Action` is TXADDED, Tendermint includes the transaction in the proposal. The transaction is also added to the mempool and gossipped. - * If `Action` is TXREMOVED, Tendermint excludes the transaction from the proposal. The transaction is also removed from the mempool if it exists, + * If `Action` is `UNKNOWN`, a problem happened in the Application. Tendermint will assume the application is faulty and crash. + * If `Action` is `UNMODIFIED`, Tendermint includes the transaction in the proposal. Nothing to do on the mempool. + * If `Action` is `ADDED`, Tendermint includes the transaction in the proposal. The transaction is also added to the mempool and gossipped. + * If `Action` is `REMOVED`, Tendermint excludes the transaction from the proposal. The transaction is also removed from the mempool if it exists, similar to `CheckTx` returning _false_. ### TxRecord @@ -856,6 +852,55 @@ Most of the data structures used in ABCI are shared [common data structures](../ | action | [TxAction](#txaction) | What should Tendermint do with this transaction? | 1 | | tx | bytes | Transaction contents | 2 | +### ProposalStatus + +```proto +enum ProposalStatus { + UNKNOWN = 0; // Unknown status. Returning this from the application is always an error. + ACCEPT = 1; // Status that signals that the application finds the proposal valid. + REJECT = 2; // Status that signals that the application finds the proposal invalid. +} +``` + +* **Usage**: + * Used within the [ProcessProposal](#ProcessProposal) response. + * If `Status` is `UNKNOWN`, a problem happened in the Application. Tendermint will assume the application is faulty and crash. + * If `Status` is `ACCEPT`, Tendermint accepts the proposal and will issue a Prevote message for it. + * If `Status` is `REJECT`, Tendermint rejects the proposal and will issue a Prevote for `nil` instead. + +### TxModifiedStatus + +```proto +enum ModifiedTxStatus { + UNKNOWN = 0; // Unknown status. Returning this from the application is always an error. + UNMODIFIED = 1; // Status that signals the application has modified the returned list of transactions. + MODIFIED = 2; // Status that signals that the application has not modified the list of transactions. +} +``` + +* **Usage**: + * Used within the [PrepareProposal](#PrepareProposal) response. + * If `TxModifiedStatus` is `UNKNOWN`, a problem happened in the Application. Tendermint will assume the application is faulty and crash. + * If `TxModifiedStatus` is `UNMODIFIED`, Tendermint will ignore the contents of the `PrepareProposal` response and use the transactions originally passed to the application during `PrepareProposal`. + * If `TxModifiedStatus` is `MODIFIED`, Tendermint will update the block proposal using the contents of the `PrepareProposal` response returned by the application. + +### VerifyStatus + +```proto +enum VerifyStatus { + UNKNOWN = 0; // Unknown status. Returning this from the application is always an error. + ACCEPT = 1; // Status that signals that the application finds the vote extension valid. + REJECT = 2; // Status that signals that the application finds the vote extension invalid. +} +``` + +* **Usage**: + * Used within the [VerifyVoteExtension](#VerifyVoteExtension) response. + * If `Status` is `UNKNOWN`, a problem happened in the Application. Tendermint will assume the application is faulty and crash. + * If `Status` is `ACCEPT`, Tendermint will accept the vote as valid. + * If `Status` is `REJECT`, Tendermint will reject the vote as invalid. + + ### CanonicalVoteExtension >**TODO**: This protobuf message definition is not part of the ABCI++ interface, but rather belongs to the diff --git a/test/e2e/app/app.go b/test/e2e/app/app.go index 5739f06e5..1ed1055ca 100644 --- a/test/e2e/app/app.go +++ b/test/e2e/app/app.go @@ -306,7 +306,7 @@ func (app *Application) ApplySnapshotChunk(req abci.RequestApplySnapshotChunk) a func (app *Application) PrepareProposal(req abci.RequestPrepareProposal) abci.ResponsePrepareProposal { // None of the transactions are modified by this application. - return abci.ResponsePrepareProposal{ModifiedTx: false} + return abci.ResponsePrepareProposal{ModifiedTxStatus: abci.ResponsePrepareProposal_UNMODIFIED} } // ProcessProposal implements part of the Application interface. @@ -315,10 +315,10 @@ func (app *Application) ProcessProposal(req abci.RequestProcessProposal) abci.Re for _, tx := range req.Txs { _, _, err := parseTx(tx) if err != nil { - return abci.ResponseProcessProposal{Accept: false} + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_REJECT} } } - return abci.ResponseProcessProposal{Accept: true} + return abci.ResponseProcessProposal{Status: abci.ResponseProcessProposal_ACCEPT} } func (app *Application) Rollback() error { From 43943d2dceb639d96ba677d2adce2ff37b6b1bd7 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Mon, 21 Mar 2022 16:13:43 -0400 Subject: [PATCH 06/13] rollback: cleanup second node during test (#8175) --- cmd/tendermint/commands/rollback_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/cmd/tendermint/commands/rollback_test.go b/cmd/tendermint/commands/rollback_test.go index 760dbf0ec..6d1ba818f 100644 --- a/cmd/tendermint/commands/rollback_test.go +++ b/cmd/tendermint/commands/rollback_test.go @@ -53,6 +53,7 @@ func TestRollbackIntegration(t *testing.T) { defer cancel() node2, _, err2 := rpctest.StartTendermint(ctx, cfg, app, rpctest.SuppressStdout) require.NoError(t, err2) + t.Cleanup(node2.Wait) logger := log.NewNopLogger() From e2365c1368c25bfbbd1404c49a9855a9677bb222 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 21 Mar 2022 22:31:49 +0000 Subject: [PATCH 07/13] build(deps): Bump github.com/golangci/golangci-lint from 1.44.2 to 1.45.0 (#8169) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.44.2 to 1.45.0.
Release notes

Sourced from github.com/golangci/golangci-lint's releases.

v1.45.0

Changelog

  • ea1df6f1 Default to YAML when config file has no extension (#2618)
  • 93a0015c build(deps): bump actions/checkout from 2 to 3 (#2643)
  • 176ef3f7 build(deps): bump actions/setup-node from 2 to 3 (#2628)
  • adc0d8ec build(deps): bump github.com/ashanbrown/makezero from 1.1.0 to 1.1.1 (#2621)
  • 8f9bc4a7 build(deps): bump github.com/daixiang0/gci from 0.3.1 to 0.3.2 (#2640)
  • 6fc688ae build(deps): bump github.com/securego/gosec/v2 from 2.9.6 to 2.10.0 (#2624)
  • da08d2bd build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.1 to 3.22.2 (#2641)
  • 873a27e7 build(deps): bump github.com/sivchari/containedctx from 1.0.1 to 1.0.2 (#2623)
  • ec952367 build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#2646)
  • 0e7233eb build(deps): bump github.com/tomarrell/wrapcheck/v2 from 2.4.0 to 2.5.0 (#2603)
  • 0bcc0a3b build(deps): bump golangci/golangci-lint-action from 2.5.2 to 3.1.0 (#2627)
  • 5ffadacb build(deps): bump mvdan.cc/gofumpt from 0.2.1 to 0.3.0 (#2622)
  • d5ebd7eb build(deps): bump node-fetch in /.github/contributors (#2616)
  • 5ddb5e7a bump github.com/daixiang0/gci to v0.3.1 (#2596)
  • 56d77e2b bump github.com/denis-tingaikin/go-header from 0.4.2 to 0.4.3 (#2614)
  • 2f689958 errcheck: add an option to remove default exclusions (#2607)
  • 1f4c1ed9 fix: completion for fish-shell
  • 0c0804c6 go1.18 support (#2438)
  • 42ca6449 gofumpt: add module-path setting (#2644)
  • 30c6166b revive: fix default values (#2611)
Changelog

Sourced from github.com/golangci/golangci-lint's changelog.

v1.45.0

  1. updated linters:
    • cobra: from 1.3.0 to 1.4.0
    • containedctx: from 1.0.1 to 1.0.2
    • errcheck: add an option to remove default exclusions
    • gci: from 0.3.1 to 0.3.2
    • go-header: from 0.4.2 to 0.4.3
    • gofumpt: add module-path setting
    • gofumpt: from 0.2.1 to 0.3.0
    • gopsutil: from 3.22.1 to 3.22.2
    • gosec: from 2.9.6 to 2.10.0
    • makezero: from 1.1.0 to 1.1.1
    • revive: fix default values
    • wrapcheck: from 2.4.0 to 2.5.0
  2. documentation:
    • docs: add "back to the top" button
    • docs: add forbidigo example that uses comments
    • docs: improve linters page
  3. misc:
    • go1.18 support 🎉
    • Add an option to manage the targeted version of Go
    • Default to YAML when config file has no extension
Commits
  • 1f4c1ed fix: completion for fish-shell
  • 0c0804c go1.18 support (#2438)
  • ec95236 build(deps): bump github.com/spf13/cobra from 1.3.0 to 1.4.0 (#2646)
  • 42ca644 gofumpt: add module-path setting (#2644)
  • 93a0015 build(deps): bump actions/checkout from 2 to 3 (#2643)
  • d7b28ca build(deps): bump normalize-url from 4.5.0 to 4.5.1 in /docs (#2642)
  • da08d2b build(deps): bump github.com/shirou/gopsutil/v3 from 3.22.1 to 3.22.2 (#2641)
  • 8f9bc4a build(deps): bump github.com/daixiang0/gci from 0.3.1 to 0.3.2 (#2640)
  • 41646f2 build(deps): bump gatsby-plugin-manifest from 4.7.0 to 4.9.0 in /docs (#2635)
  • fdd7218 build(deps): bump @​emotion/react from 11.7.1 to 11.8.1 in /docs (#2634)
  • Additional commits viewable in compare view

[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/golangci/golangci-lint&package-manager=go_modules&previous-version=1.44.2&new-version=1.45.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) ---
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
--- go.mod | 26 +++++++++++++------------- go.sum | 58 ++++++++++++++++++++++++++++++++-------------------------- 2 files changed, 45 insertions(+), 39 deletions(-) diff --git a/go.mod b/go.mod index a4a14cb3d..ae3936ba5 100644 --- a/go.mod +++ b/go.mod @@ -11,7 +11,7 @@ require ( github.com/go-kit/kit v0.12.0 github.com/gogo/protobuf v1.3.2 github.com/golang/protobuf v1.5.2 - github.com/golangci/golangci-lint v1.44.2 + github.com/golangci/golangci-lint v1.45.0 github.com/google/orderedcode v0.0.1 github.com/google/uuid v1.3.0 github.com/gorilla/websocket v1.5.0 @@ -31,7 +31,7 @@ require ( github.com/stretchr/testify v1.7.1 github.com/tendermint/tm-db v0.6.6 github.com/vektra/mockery/v2 v2.10.0 - golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce + golang.org/x/crypto v0.0.0-20220214200702-86341886e292 golang.org/x/net v0.0.0-20211208012354-db4efeb81f4b golang.org/x/sync v0.0.0-20210220032951-036812b2e83c google.golang.org/grpc v1.45.0 @@ -58,7 +58,7 @@ require ( github.com/OpenPeeDeeP/depguard v1.1.0 // indirect github.com/alexkohler/prealloc v1.0.0 // indirect github.com/ashanbrown/forbidigo v1.3.0 // indirect - github.com/ashanbrown/makezero v1.1.0 // indirect + github.com/ashanbrown/makezero v1.1.1 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bkielbasa/cyclop v1.2.0 // indirect github.com/blizzy78/varnamelen v0.6.0 // indirect @@ -72,9 +72,9 @@ require ( github.com/charithe/durationcheck v0.0.9 // indirect github.com/chavacava/garif v0.0.0-20210405164556-e8a0a408d6af // indirect github.com/containerd/continuity v0.2.1 // indirect - github.com/daixiang0/gci v0.3.1-0.20220208004058-76d765e3ab48 // indirect + github.com/daixiang0/gci v0.3.3 // indirect github.com/davecgh/go-spew v1.1.1 // indirect - github.com/denis-tingajkin/go-header v0.4.2 // indirect + github.com/denis-tingaikin/go-header v0.4.3 // indirect github.com/dgraph-io/badger/v2 v2.2007.2 // indirect github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de // indirect github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 // indirect @@ -119,6 +119,7 @@ require ( github.com/gostaticanalysis/nilerr v0.1.1 // indirect github.com/hashicorp/errwrap v1.0.0 // indirect github.com/hashicorp/go-multierror v1.1.1 // indirect + github.com/hashicorp/go-version v1.2.1 // indirect github.com/hashicorp/hcl v1.0.0 // indirect github.com/hexops/gotextdiff v1.0.3 // indirect github.com/inconshreveable/mousetrap v1.0.0 // indirect @@ -143,7 +144,6 @@ require ( github.com/mattn/go-runewidth v0.0.9 // indirect github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect github.com/mbilski/exhaustivestruct v1.2.0 // indirect - github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 // indirect github.com/mgechev/revive v1.1.4 // indirect github.com/mitchellh/go-homedir v1.1.0 // indirect github.com/mitchellh/mapstructure v1.4.3 // indirect @@ -170,10 +170,10 @@ require ( github.com/ryancurrah/gomodguard v1.2.3 // indirect github.com/ryanrolds/sqlclosecheck v0.3.0 // indirect github.com/sanposhiho/wastedassign/v2 v2.0.6 // indirect - github.com/securego/gosec/v2 v2.9.6 // indirect + github.com/securego/gosec/v2 v2.10.0 // indirect github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c // indirect github.com/sirupsen/logrus v1.8.1 // indirect - github.com/sivchari/containedctx v1.0.1 // indirect + github.com/sivchari/containedctx v1.0.2 // indirect github.com/sivchari/tenv v1.4.7 // indirect github.com/sonatard/noctx v0.0.1 // indirect github.com/sourcegraph/go-diff v0.6.1 // indirect @@ -190,7 +190,7 @@ require ( github.com/tecbot/gorocksdb v0.0.0-20191217155057-f0fad39f321c // indirect github.com/tetafro/godot v1.4.11 // indirect github.com/timakin/bodyclose v0.0.0-20210704033933-f49887972144 // indirect - github.com/tomarrell/wrapcheck/v2 v2.4.0 // indirect + github.com/tomarrell/wrapcheck/v2 v2.5.0 // indirect github.com/tommy-muehle/go-mnd/v2 v2.5.0 // indirect github.com/ultraware/funlen v0.0.3 // indirect github.com/ultraware/whitespace v0.0.5 // indirect @@ -199,11 +199,11 @@ require ( github.com/yeya24/promlinter v0.1.1-0.20210918184747-d757024714a1 // indirect gitlab.com/bosi/decorder v0.2.1 // indirect go.etcd.io/bbolt v1.3.6 // indirect - golang.org/x/mod v0.5.1 // indirect - golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 // indirect + golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 // indirect + golang.org/x/sys v0.0.0-20220209214540-3681064d5158 // indirect golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect golang.org/x/text v0.3.7 // indirect - golang.org/x/tools v0.1.9 // indirect + golang.org/x/tools v0.1.10 // indirect golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect google.golang.org/genproto v0.0.0-20211208223120-3a66f561d7aa // indirect google.golang.org/protobuf v1.27.1 // indirect @@ -211,7 +211,7 @@ require ( gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect honnef.co/go/tools v0.2.2 // indirect - mvdan.cc/gofumpt v0.2.1 // indirect + mvdan.cc/gofumpt v0.3.0 // indirect mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed // indirect mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b // indirect mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5 // indirect diff --git a/go.sum b/go.sum index cd5b6efc6..c3f0a36e9 100644 --- a/go.sum +++ b/go.sum @@ -122,8 +122,8 @@ github.com/armon/go-radix v0.0.0-20180808171621-7fddfc383310/go.mod h1:ufUuZ+zHj github.com/armon/go-radix v1.0.0/go.mod h1:ufUuZ+zHj4x4TnLV4JWEpy2hxWSpsRywHrMgIH9cCH8= github.com/ashanbrown/forbidigo v1.3.0 h1:VkYIwb/xxdireGAdJNZoo24O4lmnEWkactplBlWTShc= github.com/ashanbrown/forbidigo v1.3.0/go.mod h1:vVW7PEdqEFqapJe95xHkTfB1+XvZXBFg8t0sG2FIxmI= -github.com/ashanbrown/makezero v1.1.0 h1:b2FVq4dTlBpy9f6qxhbyWH+6zy56IETE9cFbBGtDqs8= -github.com/ashanbrown/makezero v1.1.0/go.mod h1:oG9Dnez7/ESBqc4EdrdNlryeo7d0KcW1ftXHm7nU/UU= +github.com/ashanbrown/makezero v1.1.1 h1:iCQ87C0V0vSyO+M9E/FZYbu65auqH0lnsOkf5FcB28s= +github.com/ashanbrown/makezero v1.1.1/go.mod h1:i1bJLCRSCHOcOa9Y6MyF2FTfMZMFdHvxKHxgO5Z1axI= github.com/aws/aws-sdk-go v1.23.20/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.25.37/go.mod h1:KmX6BPdI08NWTb3/sm4ZGu5ShLoqVDhKgpiN924inxo= github.com/aws/aws-sdk-go v1.36.30/go.mod h1:hcU610XS61/+aQV88ixoOzUoG7v3b31pl2zKMmprdro= @@ -222,16 +222,16 @@ github.com/creachadair/atomicfile v0.2.4/go.mod h1:BRq8Une6ckFneYXZQ+kO7p1ZZP3I2 github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY= github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/cyphar/filepath-securejoin v0.2.2/go.mod h1:FpkQEhXnPnOthhzymB7CGsFk2G9VLXONKD9G7QGMM+4= -github.com/daixiang0/gci v0.3.1-0.20220208004058-76d765e3ab48 h1:9rJGqaC5do9zkvKrtRdx0HJoxj7Jd6vDa0O2eBU0AbU= -github.com/daixiang0/gci v0.3.1-0.20220208004058-76d765e3ab48/go.mod h1:jaASoJmv/ykO9dAAPy31iJnreV19248qKDdVWf3QgC4= +github.com/daixiang0/gci v0.3.3 h1:55xJKH7Gl9Vk6oQ1cMkwrDWjAkT1D+D1G9kNmRcAIY4= +github.com/daixiang0/gci v0.3.3/go.mod h1:1Xr2bxnQbDxCqqulUOv8qpGqkgRw9RSCGGjEC2LjF8o= github.com/davecgh/go-spew v0.0.0-20161028175848-04cdfd42973b/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v0.0.0-20171005155431-ecdeabc65495/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= github.com/decred/dcrd/lru v1.0.0/go.mod h1:mxKOwFd7lFjN2GZYsiz/ecgqR6kkYAl+0pz0tEMk218= -github.com/denis-tingajkin/go-header v0.4.2 h1:jEeSF4sdv8/3cT/WY8AgDHUoItNSoEZ7qg9dX7pc218= -github.com/denis-tingajkin/go-header v0.4.2/go.mod h1:eLRHAVXzE5atsKAnNRDB90WHCFFnBUn4RN0nRcs1LJA= +github.com/denis-tingaikin/go-header v0.4.3 h1:tEaZKAlqql6SKCY++utLmkPLd6K8IBM20Ha7UVm+mtU= +github.com/denis-tingaikin/go-header v0.4.3/go.mod h1:0wOCWuN71D5qIgE2nz9KrKmuYBAC2Mra5RassOIQ2/c= github.com/dgraph-io/badger/v2 v2.2007.2 h1:EjjK0KqwaFMlPin1ajhP943VPENHJdEz1KLIegjaI3k= github.com/dgraph-io/badger/v2 v2.2007.2/go.mod h1:26P/7fbL4kUZVEVKLAKXkBXKOydDmM2p1e+NhhnBCAE= github.com/dgraph-io/ristretto v0.0.3-0.20200630154024-f66de99634de h1:t0UHb5vdojIDUqktM6+xJAfScFBsVpXZmqC9dsgJmeA= @@ -287,8 +287,8 @@ github.com/fortytw2/leaktest v1.3.0/go.mod h1:jDsjWgpAGjm2CA7WthBh/CdZYEPF31XHqu github.com/franela/goblin v0.0.0-20210519012713-85d372ac71e2/go.mod h1:VzmDKDJVZI3aJmnRI9VjAn9nJ8qPPsN1fqzr9dqInIo= github.com/franela/goreq v0.0.0-20171204163338-bcd34c9993f8/go.mod h1:ZhphrRTfi2rbfLwlschooIH4+wKKDR4Pdxhh+TRoA20= github.com/frankban/quicktest v1.11.3/go.mod h1:wRf/ReqHper53s+kmmSZizM8NamnL3IM0I9ntUbOk+k= -github.com/frankban/quicktest v1.14.0 h1:+cqqvzZV87b4adx/5ayVOaYZ2CrvM4ejQvUdBzPPUss= -github.com/frankban/quicktest v1.14.0/go.mod h1:NeW+ay9A/U67EYXNFA1nPE8e/tnQv/09mUdL/ijj8og= +github.com/frankban/quicktest v1.14.2 h1:SPb1KFFmM+ybpEjPUhCCkZOM5xlovT5UbrMvWnXyBns= +github.com/frankban/quicktest v1.14.2/go.mod h1:mgiwOwqx65TmIk1wJ6Q7wvnVMocbUorkibMOrVTHZps= github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo= github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ= github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI= @@ -400,8 +400,8 @@ github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613 h1:9kfjN3AdxcbsZB github.com/golangci/go-misc v0.0.0-20180628070357-927a3d87b613/go.mod h1:SyvUF2NxV+sN8upjjeVYr5W7tyxaT1JVtvhKhOn2ii8= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a h1:iR3fYXUjHCR97qWS8ch1y9zPNsgXThGwjKPrYfqMPks= github.com/golangci/gofmt v0.0.0-20190930125516-244bba706f1a/go.mod h1:9qCChq59u/eW8im404Q2WWTrnBUQKjpNYKMbU4M7EFU= -github.com/golangci/golangci-lint v1.44.2 h1:MzvkDt1j1OHkv42/feNJVNNXRFACPp7aAWBWDo5aYQw= -github.com/golangci/golangci-lint v1.44.2/go.mod h1:KjBgkLvsTWDkhfu12iCrv0gwL1kON5KNhbyjQ6qN7Jo= +github.com/golangci/golangci-lint v1.45.0 h1:T2oCVkYoeckBxcNS6DTYiSXN2QcTNuAWaHyLGfqzMlU= +github.com/golangci/golangci-lint v1.45.0/go.mod h1:Y6grRO3drH/7kGP88i9jSl9fGWwCrbA5u7i++jOXll4= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0 h1:MfyDlzVjl1hoaPzPD4Gpb/QgoRfSBR0jdhwGyAWwMSA= github.com/golangci/lint-1 v0.0.0-20191013205115-297bf364a8e0/go.mod h1:66R6K6P6VWk9I95jvqGxkqJxVWGFy9XlDwLwVz1RCFg= github.com/golangci/maligned v0.0.0-20180506175553-b1d89398deca h1:kNY3/svz5T29MYHubXix4aDDuE3RWHkPvopM/EDv/MA= @@ -687,7 +687,6 @@ github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0j github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0= github.com/mbilski/exhaustivestruct v1.2.0 h1:wCBmUnSYufAHO6J4AVWY6ff+oxWxsVFrwgOdMUQePUo= github.com/mbilski/exhaustivestruct v1.2.0/go.mod h1:OeTBVxQWoEmB2J2JCHmXWPJ0aksxSUOUy+nvtVEfzXc= -github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517 h1:zpIH83+oKzcpryru8ceC6BxnoG8TBrhgAvRg8obzup0= github.com/mgechev/dots v0.0.0-20210922191527-e955255bf517/go.mod h1:KQ7+USdGKfpPjXk4Ga+5XxQM4Lm4e3gAogrreFAYpOg= github.com/mgechev/revive v1.1.4 h1:sZOjY6GU35Kr9jKa/wsKSHgrFz8eASIB5i3tqWZMp0A= github.com/mgechev/revive v1.1.4/go.mod h1:ZZq2bmyssGh8MSPz3VVziqRNIMYTJXzP8MUKG90vZ9A= @@ -768,15 +767,17 @@ github.com/onsi/ginkgo v1.14.0/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9k github.com/onsi/ginkgo v1.16.2/go.mod h1:CObGmKUOKaSC0RjmoAK7tKyn4Azo5P2IWuoMnvwxz1E= github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc= github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0= -github.com/onsi/ginkgo/v2 v2.0.0 h1:CcuG/HvWNkkaqCUpJifQY8z7qEMBJya6aLPx6ftGyjQ= github.com/onsi/ginkgo/v2 v2.0.0/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= +github.com/onsi/ginkgo/v2 v2.1.3 h1:e/3Cwtogj0HA+25nMP1jCMDIf8RtRYbGwGGuBIFztkc= +github.com/onsi/ginkgo/v2 v2.1.3/go.mod h1:vw5CSIxN1JObi/U8gcbwft7ZxR2dgaR70JSE3/PpL4c= github.com/onsi/gomega v1.4.1/go.mod h1:C1qb7wdrVGGVU+Z6iS04AVkA3Q65CEZX59MT0QO5uiA= github.com/onsi/gomega v1.4.3/go.mod h1:ex+gbHU/CVuBBDIJjb2X0qEXbFg53c61hWP/1CpauHY= github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY= github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo= github.com/onsi/gomega v1.13.0/go.mod h1:lRk9szgn8TxENtWd0Tp4c3wjlRfMTMH27I+3Je41yGY= -github.com/onsi/gomega v1.17.0 h1:9Luw4uT5HTjHTN8+aNcSThgH1vdXnmdJ8xIfZ4wyTRE= github.com/onsi/gomega v1.17.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY= +github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE= +github.com/onsi/gomega v1.18.1/go.mod h1:0q+aL8jAiMXy9hbwj2mr5GziHiwhAIQpFmmtT5hitRs= github.com/op/go-logging v0.0.0-20160315200505-970db520ece7/go.mod h1:HzydrMdWErDVzsI23lYNej1Htcns9BCg93Dk0bBINWk= github.com/opencontainers/go-digest v1.0.0 h1:apOUWs51W5PlhuyGyz9FCeeBIOUDA/6nW8Oi/yOhh5U= github.com/opencontainers/go-digest v1.0.0/go.mod h1:0JzlMkj0TRzQZfJkVvzbP0HBR3IKzErnv2BNG4W4MAM= @@ -897,12 +898,12 @@ github.com/sanposhiho/wastedassign/v2 v2.0.6 h1:+6/hQIHKNJAUixEj6EmOngGIisyeI+T3 github.com/sanposhiho/wastedassign/v2 v2.0.6/go.mod h1:KyZ0MWTwxxBmfwn33zh3k1dmsbF2ud9pAAGfoLfjhtI= github.com/sean-/seed v0.0.0-20170313163322-e2103e2c3529/go.mod h1:DxrIzT+xaE7yg65j358z/aeFdxmN0P9QXhEzd20vsDc= github.com/seccomp/libseccomp-golang v0.9.1/go.mod h1:GbW5+tmTXfcxTToHLXlScSlAvWlF4P2Ca7zGrPiEpWo= -github.com/securego/gosec/v2 v2.9.6 h1:ysfvgQBp2zmTgXQl65UkqEkYlQGbnVSRUGpCrJiiR4c= -github.com/securego/gosec/v2 v2.9.6/go.mod h1:EESY9Ywxo/Zc5NyF/qIj6Cop+4PSWM0F0OfGD7FdIXc= +github.com/securego/gosec/v2 v2.10.0 h1:l6BET4EzWtyUXCpY2v7N92v0DDCas0L7ngg3bpqbr8g= +github.com/securego/gosec/v2 v2.10.0/go.mod h1:PVq8Ewh/nCN8l/kKC6zrGXSr7m2NmEK6ITIAWMtIaA0= github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c h1:W65qqJCIOVP4jpqPQ0YvHYKwcMEMVWIzWC5iNQQfBTU= github.com/shazow/go-diff v0.0.0-20160112020656-b6b7b6733b8c/go.mod h1:/PevMnwAxekIXwN8qQyfc5gl2NlkB3CQlkizAbOkeBs= -github.com/shirou/gopsutil/v3 v3.22.1/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= +github.com/shirou/gopsutil/v3 v3.22.2/go.mod h1:WapW1AOOPlHyXr+yOyw3uYx36enocrtSoSBy0L5vUHY= github.com/shurcooL/go v0.0.0-20180423040247-9e1955d9fb6e/go.mod h1:TDJrrUr11Vxrven61rcy3hJMUqaf/CLWYhHNPmT14Lk= github.com/shurcooL/go-goon v0.0.0-20170922171312-37c2f522c041/go.mod h1:N5mDOmsrJOB+vfqUK+7DmDyjhSLIIBnXo9lvZJj3MWQ= github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc= @@ -912,8 +913,8 @@ github.com/sirupsen/logrus v1.6.0/go.mod h1:7uNnSEd1DgxDLC74fIahvMZmmYsHGZGEOFrf github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE= github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= -github.com/sivchari/containedctx v1.0.1 h1:fJq44cX+tD+uT5xGrsg25GwiaY61NGybQk9WWKij3Uo= -github.com/sivchari/containedctx v1.0.1/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= +github.com/sivchari/containedctx v1.0.2 h1:0hLQKpgC53OVF1VT7CeoFHk9YKstur1XOgfYIc1yrHI= +github.com/sivchari/containedctx v1.0.2/go.mod h1:PwZOeqm4/DLoJOqMSIJs3aKqXRX4YO+uXww087KZ7Bw= github.com/sivchari/tenv v1.4.7 h1:FdTpgRlTue5eb5nXIYgS/lyVXSjugU8UUVDwhP1NLU8= github.com/sivchari/tenv v1.4.7/go.mod h1:5nF+bITvkebQVanjU6IuMbvIot/7ReNsUV7I5NbprB0= github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc= @@ -1000,8 +1001,8 @@ github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcy 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/tmc/grpc-websocket-proxy v0.0.0-20200427203606-3cfed13b9966/go.mod h1:ncp9v5uamzpCO7NfCPTXjqaC+bZgJeR0sMTm6dMHP7U= -github.com/tomarrell/wrapcheck/v2 v2.4.0 h1:mU4H9KsqqPZUALOUbVOpjy8qNQbWLoLI9fV68/1tq30= -github.com/tomarrell/wrapcheck/v2 v2.4.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= +github.com/tomarrell/wrapcheck/v2 v2.5.0 h1:g27SGGHNoQdvHz4KZA9o4v09RcWzylR+b1yueE5ECiw= +github.com/tomarrell/wrapcheck/v2 v2.5.0/go.mod h1:68bQ/eJg55BROaRTbMjC7vuhL2OgfoG8bLp9ZyoBfyY= github.com/tomasen/realip v0.0.0-20180522021738-f0c99a92ddce/go.mod h1:o8v6yHRoik09Xen7gje4m9ERNah1d1PPsVq1VEx9vE4= github.com/tommy-muehle/go-mnd/v2 v2.5.0 h1:iAj0a8e6+dXSL7Liq0aXPox36FiN1dBbjA6lt9fl65s= github.com/tommy-muehle/go-mnd/v2 v2.5.0/go.mod h1:WsUAkMJMYww6l/ufffCD3m+P7LEvr8TnZn9lwVDlgzw= @@ -1106,10 +1107,12 @@ golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5 golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210817164053-32db794688a5/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20210915214749-c084706c2272/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211108221036-ceb1ce70b4fa/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= golang.org/x/crypto v0.0.0-20211215165025-cf75a172585e/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8= -golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce h1:Roh6XWxHFKrPgC/EQhVubSAGQ6Ozk6IdxHSzt1mR0EI= golang.org/x/crypto v0.0.0-20220112180741-5e0467b6c7ce/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292 h1:f+lwQ+GtmgoY+A2YaQxlSOnDjXcQ7ZRLWOHbC6HtRqE= +golang.org/x/crypto v0.0.0-20220214200702-86341886e292/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/exp v0.0.0-20180321215751-8460e604b9de/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20180807140117-3d87b88a115f/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= @@ -1151,8 +1154,9 @@ golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.4.2/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.5.0/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= -golang.org/x/mod v0.5.1 h1:OJxoQ/rynoF0dcCdI7cLPktw/hR2cueqYfjm43oqK38= golang.org/x/mod v0.5.1/go.mod h1:5OXOZSfqPIIbmVBIIKWRFfZjPR0E5r58TLhUjH0a2Ro= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3 h1:kQgndtyPBW/JIYERgdxfwMYh3AVStj88WQTlNDi2a+o= +golang.org/x/mod v0.6.0-dev.0.20220106191415-9b9b3d81d5e3/go.mod h1:3p9vT2HGsQu2K1YbXdKPJLVgG5VJdoTa1poYQBtP1AY= 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-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -1347,8 +1351,9 @@ golang.org/x/sys v0.0.0-20211210111614-af8b64212486/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20211213223007-03aa0b5f6827/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220111092808-5a964db01320/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.0.0-20220114195835-da31bd327af9 h1:XfKQ4OlFl8okEOr5UvAqFRVj8pY/4yfcXrddB8qAbU0= golang.org/x/sys v0.0.0-20220114195835-da31bd327af9/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158 h1:rm+CHSpPEEW2IsXUib1ThaHIjuBVZjxNgSKmBLFfD4c= +golang.org/x/sys v0.0.0-20220209214540-3681064d5158/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/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 h1:JGgROgKl9N8DuW20oFS5gxc+lE67/N3FcwmBPMe7ArY= @@ -1468,8 +1473,9 @@ golang.org/x/tools v0.1.5/go.mod h1:o0xws9oXOQQZyjljx8fwUC0k7L1pTE6eaCbjGeHmOkk= golang.org/x/tools v0.1.7/go.mod h1:LGqMHiF4EqQNHR1JncWGqT5BVaXmza+X+BDGol+dOxo= golang.org/x/tools v0.1.8/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= golang.org/x/tools v0.1.9-0.20211228192929-ee1ca4ffc4da/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= -golang.org/x/tools v0.1.9 h1:j9KsMiaP1c3B0OTQGth0/k+miLGTgLsAFUCrF2vLcF8= golang.org/x/tools v0.1.9/go.mod h1:nABZi5QlRsZVlzPpHl034qft6wpY4eDcsTt5AaioBiU= +golang.org/x/tools v0.1.10 h1:QjFRCZxdOhBJ/UNgnBZLbNV13DlbnK0quyivTnXJM20= +golang.org/x/tools v0.1.10/go.mod h1:Uh6Zz+xoGYZom868N8YTex3t7RhtHDBrE8Gzo9bV56E= 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= @@ -1689,8 +1695,8 @@ honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9 honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= honnef.co/go/tools v0.2.2 h1:MNh1AVMyVX23VUHE2O27jm6lNj3vjO5DexS4A1xvnzk= honnef.co/go/tools v0.2.2/go.mod h1:lPVVZ2BS5TfnjLyizF7o7hv7j9/L+8cZY2hLyjP9cGY= -mvdan.cc/gofumpt v0.2.1 h1:7jakRGkQcLAJdT+C8Bwc9d0BANkVPSkHZkzNv07pJAs= -mvdan.cc/gofumpt v0.2.1/go.mod h1:a/rvZPhsNaedOJBzqRD9omnwVwHZsBdJirXHa9Gh9Ig= +mvdan.cc/gofumpt v0.3.0 h1:kTojdZo9AcEYbQYhGuLf/zszYthRdhDNDUi2JKTxas4= +mvdan.cc/gofumpt v0.3.0/go.mod h1:0+VyGZWleeIj5oostkOex+nDBA0eyavuDnDusAJ8ylo= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed h1:WX1yoOaKQfddO/mLzdV4wptyWgoH/6hwLs7QHTixo0I= mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed/go.mod h1:Xkxe497xwlCKkIaQYRfC7CSLworTXY9RMqwhhCm+8Nc= mvdan.cc/lint v0.0.0-20170908181259-adc824a0674b h1:DxJ5nJdkhDlLok9K6qO+5290kphDJbHOQO1DFFFTeBo= From 2361e0c65c10848bd032810473d1a8d894c10c8b Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Tue, 22 Mar 2022 10:03:35 -0400 Subject: [PATCH 08/13] abci++: remove CheckTx call from PrepareProposal flow (#8176) --- internal/state/execution.go | 5 ----- internal/state/execution_test.go | 6 +----- spec/abci++/abci++_methods_002_draft.md | 4 ++-- types/tx.go | 5 ----- 4 files changed, 3 insertions(+), 17 deletions(-) diff --git a/internal/state/execution.go b/internal/state/execution.go index 7010010da..4f02092d5 100644 --- a/internal/state/execution.go +++ b/internal/state/execution.go @@ -158,11 +158,6 @@ func (blockExec *BlockExecutor) CreateProposalBlock( blockExec.logger.Debug("error removing transaction from the mempool", "error", err, "tx hash", rtx.Hash()) } } - for _, atx := range txrSet.AddedTxs() { - if err := blockExec.mempool.CheckTx(ctx, atx, nil, mempool.TxInfo{}); err != nil { - blockExec.logger.Error("error adding tx to the mempool", "error", err, "tx hash", atx.Hash()) - } - } itxs := txrSet.IncludedTxs() return state.MakeBlock(height, itxs, commit, evidence, proposerAddr), nil } diff --git a/internal/state/execution_test.go b/internal/state/execution_test.go index 6f2c7e87c..58580e7be 100644 --- a/internal/state/execution_test.go +++ b/internal/state/execution_test.go @@ -773,8 +773,7 @@ func TestPrepareProposalRemoveTxs(t *testing.T) { } // TestPrepareProposalAddedTxsIncluded tests that any transactions marked as ADDED -// in the prepare proposal response are included in the block. The test also -// ensures that any transactions added are also checked into the mempool. +// in the prepare proposal response are included in the block. func TestPrepareProposalAddedTxsIncluded(t *testing.T) { const height = 2 ctx, cancel := context.WithCancel(context.Background()) @@ -793,7 +792,6 @@ func TestPrepareProposalAddedTxsIncluded(t *testing.T) { txs := factory.MakeTenTxs(height) mp := &mpmocks.Mempool{} mp.On("ReapMaxBytesMaxGas", mock.Anything, mock.Anything).Return(types.Txs(txs[2:])) - mp.On("CheckTx", mock.Anything, mock.Anything, mock.Anything, mock.Anything).Return(nil).Twice() trs := txsToTxRecords(types.Txs(txs)) trs[0].Action = abci.TxRecord_ADDED @@ -828,8 +826,6 @@ func TestPrepareProposalAddedTxsIncluded(t *testing.T) { require.Equal(t, txs[1], block.Data.Txs[1]) mp.AssertExpectations(t) - mp.AssertCalled(t, "CheckTx", mock.Anything, types.Tx(trs[0].Tx), mock.Anything, mock.Anything) - mp.AssertCalled(t, "CheckTx", mock.Anything, types.Tx(trs[1].Tx), mock.Anything, mock.Anything) } // TestPrepareProposalReorderTxs tests that CreateBlock produces a block with transactions diff --git a/spec/abci++/abci++_methods_002_draft.md b/spec/abci++/abci++_methods_002_draft.md index cd7fb5961..edc7ac717 100644 --- a/spec/abci++/abci++_methods_002_draft.md +++ b/spec/abci++/abci++_methods_002_draft.md @@ -378,7 +378,7 @@ and _p_'s _validValue_ is `nil`: `ResponsePrepareProposal.validator_updates`, and `ResponsePrepareProposal.consensus_param_updates`. * in both modes, the Application can manipulate transactions * leave transactions untouched - `TxAction = UNMODIFIED` - * add new transactions (not previously in the mempool) - `TxAction = ADDED` + * add new transactions directly to the proposal - `TxAction = ADDED` * remove transactions (invalid) from the proposal and from the mempool - `TxAction = REMOVED` * remove transactions from the proposal but not from the mempool (effectively _delaying_ them) - the Application removes the transaction from the list @@ -840,7 +840,7 @@ enum TxAction { * **Usage**: * If `Action` is `UNKNOWN`, a problem happened in the Application. Tendermint will assume the application is faulty and crash. * If `Action` is `UNMODIFIED`, Tendermint includes the transaction in the proposal. Nothing to do on the mempool. - * If `Action` is `ADDED`, Tendermint includes the transaction in the proposal. The transaction is also added to the mempool and gossipped. + * If `Action` is `ADDED`, Tendermint includes the transaction in the proposal. The transaction is _not_ added to the mempool. * If `Action` is `REMOVED`, Tendermint excludes the transaction from the proposal. The transaction is also removed from the mempool if it exists, similar to `CheckTx` returning _false_. ### TxRecord diff --git a/types/tx.go b/types/tx.go index 2dd7d3a51..b81114452 100644 --- a/types/tx.go +++ b/types/tx.go @@ -159,11 +159,6 @@ func (t TxRecordSet) IncludedTxs() []Tx { return t.included } -// AddedTxs returns the transactions added by the application. -func (t TxRecordSet) AddedTxs() []Tx { - return t.added -} - // RemovedTxs returns the transactions marked for removal by the application. func (t TxRecordSet) RemovedTxs() []Tx { return t.removed From e2fc50ec9f539140283811699a5ad3776152dea0 Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Tue, 22 Mar 2022 11:19:54 -0400 Subject: [PATCH 09/13] types: add TimeoutParams into ConsensusParams structs (#8177) --- config/toml.go | 8 + docs/architecture/adr-074-timeout-params.md | 4 +- proto/tendermint/types/params.pb.go | 726 ++++++++++++++++++-- proto/tendermint/types/params.proto | 8 +- spec/core/data_structures.md | 2 +- types/genesis_test.go | 8 + types/params.go | 92 +++ types/params_test.go | 58 +- 8 files changed, 839 insertions(+), 67 deletions(-) diff --git a/config/toml.go b/config/toml.go index 0508f9e74..08106efef 100644 --- a/config/toml.go +++ b/config/toml.go @@ -602,6 +602,14 @@ var testGenesisFmt = `{ "message_delay": "500000000", "precision": "10000000" }, + "timeout": { + "propose": "30000000000", + "propose_delta": "50000000", + "vote": "30000000000", + "vote_delta": "50000000", + "commit": "10000000000", + "bypass_commit_timeout": false + }, "evidence": { "max_age_num_blocks": "100000", "max_age_duration": "172800000000000", diff --git a/docs/architecture/adr-074-timeout-params.md b/docs/architecture/adr-074-timeout-params.md index c2869f5a3..22fd784bd 100644 --- a/docs/architecture/adr-074-timeout-params.md +++ b/docs/architecture/adr-074-timeout-params.md @@ -67,7 +67,7 @@ The 8 timeout parameters will be consolidated down to 6. These will be as follow parameters. * `TimeoutCommit` * Same as current `TimeoutCommit`. -* `EnableTimeoutCommitBypass` +* `BypassCommitTimeout` * Same as current `SkipTimeoutCommit`, renamed for clarity. A safe default will be provided by Tendermint for each of these parameters and @@ -149,7 +149,7 @@ message TimeoutParams { google.protobuf.Duration vote = 3; google.protobuf.Duration vote_delta = 4; google.protobuf.Duration commit = 5; - bool enable_commit_timeout_bypass = 6; + bool bypass_commit_timeout = 6; } ``` diff --git a/proto/tendermint/types/params.pb.go b/proto/tendermint/types/params.pb.go index ff55379df..c8b8594e1 100644 --- a/proto/tendermint/types/params.pb.go +++ b/proto/tendermint/types/params.pb.go @@ -35,6 +35,7 @@ type ConsensusParams struct { Validator *ValidatorParams `protobuf:"bytes,3,opt,name=validator,proto3" json:"validator,omitempty"` Version *VersionParams `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` Synchrony *SynchronyParams `protobuf:"bytes,5,opt,name=synchrony,proto3" json:"synchrony,omitempty"` + Timeout *TimeoutParams `protobuf:"bytes,6,opt,name=timeout,proto3" json:"timeout,omitempty"` } func (m *ConsensusParams) Reset() { *m = ConsensusParams{} } @@ -105,6 +106,13 @@ func (m *ConsensusParams) GetSynchrony() *SynchronyParams { return nil } +func (m *ConsensusParams) GetTimeout() *TimeoutParams { + if m != nil { + return m.Timeout + } + return nil +} + // BlockParams contains limits on the block size. type BlockParams struct { // Max block size, in bytes. @@ -441,6 +449,123 @@ func (m *SynchronyParams) GetPrecision() *time.Duration { return nil } +// TimeoutParams configure the timeouts for the steps of the Tendermint consensus algorithm. +type TimeoutParams struct { + // These fields configure the timeouts for the propose step of the Tendermint + // consensus algorithm: propose is the initial timeout and propose_delta + // determines how much the timeout grows in subsequent rounds. + // For the first round, this propose timeout is used and for every subsequent + // round, the timeout grows by propose_delta. + // + // For example: + // With propose = 10ms, propose_delta = 5ms, the first round's propose phase + // timeout would be 10ms, the second round's would be 15ms, the third 20ms and so on. + // + // If a node waiting for a proposal message does not receive one matching its + // current height and round before this timeout, the node will issue a + // nil prevote for the round and advance to the next step. + Propose *time.Duration `protobuf:"bytes,1,opt,name=propose,proto3,stdduration" json:"propose,omitempty"` + ProposeDelta *time.Duration `protobuf:"bytes,2,opt,name=propose_delta,json=proposeDelta,proto3,stdduration" json:"propose_delta,omitempty"` + // vote along with vote_delta configure the timeout for both of the prevote and + // precommit steps of the Tendermint consensus algorithm. + // + // These parameters influence the vote step timeouts in the the same way that + // the propose and propose_delta parameters do to the proposal step. + // + // The vote timeout does not begin until a quorum of votes has been received. Once + // a quorum of votes has been seen and this timeout elapses, Tendermint will + // procced to the next step of the consensus algorithm. If Tendermint receives + // all of the remaining votes before the end of the timeout, it will proceed + // to the next step immediately. + Vote *time.Duration `protobuf:"bytes,3,opt,name=vote,proto3,stdduration" json:"vote,omitempty"` + VoteDelta *time.Duration `protobuf:"bytes,4,opt,name=vote_delta,json=voteDelta,proto3,stdduration" json:"vote_delta,omitempty"` + // commit configures how long Tendermint will wait after receiving a quorum of + // precommits before beginning consensus for the next height. This can be + // used to allow slow precommits to arrive for inclusion in the next height before progressing. + Commit *time.Duration `protobuf:"bytes,5,opt,name=commit,proto3,stdduration" json:"commit,omitempty"` + // bypass_commit_timeout configures the node to proceed immediately to + // the next height once the node has received all precommits for a block, forgoing + // the remaining commit timeout. + // Setting bypass_commit_timeout false (the default) causes Tendermint to wait + // for the full commit timeout. + BypassCommitTimeout bool `protobuf:"varint,6,opt,name=bypass_commit_timeout,json=bypassCommitTimeout,proto3" json:"bypass_commit_timeout,omitempty"` +} + +func (m *TimeoutParams) Reset() { *m = TimeoutParams{} } +func (m *TimeoutParams) String() string { return proto.CompactTextString(m) } +func (*TimeoutParams) ProtoMessage() {} +func (*TimeoutParams) Descriptor() ([]byte, []int) { + return fileDescriptor_e12598271a686f57, []int{7} +} +func (m *TimeoutParams) XXX_Unmarshal(b []byte) error { + return m.Unmarshal(b) +} +func (m *TimeoutParams) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + if deterministic { + return xxx_messageInfo_TimeoutParams.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 *TimeoutParams) XXX_Merge(src proto.Message) { + xxx_messageInfo_TimeoutParams.Merge(m, src) +} +func (m *TimeoutParams) XXX_Size() int { + return m.Size() +} +func (m *TimeoutParams) XXX_DiscardUnknown() { + xxx_messageInfo_TimeoutParams.DiscardUnknown(m) +} + +var xxx_messageInfo_TimeoutParams proto.InternalMessageInfo + +func (m *TimeoutParams) GetPropose() *time.Duration { + if m != nil { + return m.Propose + } + return nil +} + +func (m *TimeoutParams) GetProposeDelta() *time.Duration { + if m != nil { + return m.ProposeDelta + } + return nil +} + +func (m *TimeoutParams) GetVote() *time.Duration { + if m != nil { + return m.Vote + } + return nil +} + +func (m *TimeoutParams) GetVoteDelta() *time.Duration { + if m != nil { + return m.VoteDelta + } + return nil +} + +func (m *TimeoutParams) GetCommit() *time.Duration { + if m != nil { + return m.Commit + } + return nil +} + +func (m *TimeoutParams) GetBypassCommitTimeout() bool { + if m != nil { + return m.BypassCommitTimeout + } + return false +} + func init() { proto.RegisterType((*ConsensusParams)(nil), "tendermint.types.ConsensusParams") proto.RegisterType((*BlockParams)(nil), "tendermint.types.BlockParams") @@ -449,48 +574,56 @@ func init() { proto.RegisterType((*VersionParams)(nil), "tendermint.types.VersionParams") proto.RegisterType((*HashedParams)(nil), "tendermint.types.HashedParams") proto.RegisterType((*SynchronyParams)(nil), "tendermint.types.SynchronyParams") + proto.RegisterType((*TimeoutParams)(nil), "tendermint.types.TimeoutParams") } func init() { proto.RegisterFile("tendermint/types/params.proto", fileDescriptor_e12598271a686f57) } var fileDescriptor_e12598271a686f57 = []byte{ - // 565 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0x4d, 0x8b, 0xd3, 0x40, - 0x18, 0xc7, 0x9b, 0xed, 0xbe, 0xb4, 0x4f, 0xb7, 0xdb, 0x65, 0x10, 0x8c, 0x2b, 0x9b, 0xd6, 0x1c, - 0x64, 0x41, 0x48, 0xc4, 0x45, 0x44, 0x50, 0xc4, 0x6e, 0x45, 0x41, 0x56, 0x24, 0xbe, 0x1c, 0xf6, - 0x12, 0x26, 0xed, 0x98, 0x86, 0x6d, 0x32, 0x43, 0x26, 0x29, 0xcd, 0xb7, 0xf0, 0x24, 0x7e, 0x04, - 0xfd, 0x18, 0xde, 0xf6, 0xb8, 0x47, 0x4f, 0x2a, 0xed, 0x17, 0x91, 0x99, 0xcc, 0x6c, 0xb6, 0x5d, - 0x15, 0x6f, 0xc9, 0x3c, 0xff, 0xdf, 0x3c, 0xcc, 0xef, 0x49, 0x06, 0xf6, 0x33, 0x92, 0x8c, 0x48, - 0x1a, 0x47, 0x49, 0xe6, 0x66, 0x05, 0x23, 0xdc, 0x65, 0x38, 0xc5, 0x31, 0x77, 0x58, 0x4a, 0x33, - 0x8a, 0x76, 0xab, 0xb2, 0x23, 0xcb, 0x7b, 0xd7, 0x42, 0x1a, 0x52, 0x59, 0x74, 0xc5, 0x53, 0x99, - 0xdb, 0xb3, 0x42, 0x4a, 0xc3, 0x09, 0x71, 0xe5, 0x5b, 0x90, 0x7f, 0x70, 0x47, 0x79, 0x8a, 0xb3, - 0x88, 0x26, 0x65, 0xdd, 0xfe, 0xb6, 0x06, 0x9d, 0x23, 0x9a, 0x70, 0x92, 0xf0, 0x9c, 0xbf, 0x96, - 0x1d, 0xd0, 0x21, 0x6c, 0x04, 0x13, 0x3a, 0x3c, 0x35, 0x8d, 0x9e, 0x71, 0xd0, 0xba, 0xb7, 0xef, - 0x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 0x96, 0x77, 0xc0, - 0xea, 0xf5, 0x11, 0x6c, 0xca, 0xf5, 0xc3, 0xdf, 0x01, 0x00, 0x00, 0xff, 0xff, 0x57, 0x89, 0x7c, - 0xd9, 0x59, 0x04, 0x00, 0x00, + // 680 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x94, 0xcf, 0x6e, 0xd3, 0x4a, + 0x14, 0xc6, 0xe3, 0x26, 0x4d, 0x93, 0x93, 0xa6, 0xa9, 0xe6, 0xde, 0xab, 0xeb, 0xdb, 0xab, 0x3a, + 0xc5, 0x0b, 0x54, 0x09, 0xc9, 0x41, 0xad, 0x50, 0x85, 0xc4, 0x1f, 0x91, 0x06, 0x81, 0x84, 0x8a, + 0x90, 0x29, 0x2c, 0xba, 0xb1, 0xc6, 0xc9, 0xe0, 0x5a, 0x8d, 0x3d, 0x96, 0xc7, 0x8e, 0xe2, 0xb7, + 0x60, 0x85, 0x78, 0x04, 0x78, 0x93, 0x2e, 0xbb, 0x64, 0x05, 0x28, 0x7d, 0x03, 0xd6, 0x2c, 0xd0, + 0xfc, 0x6b, 0x9a, 0x94, 0xd2, 0xac, 0xe2, 0xcc, 0xf9, 0x7e, 0xfe, 0x3c, 0xdf, 0x39, 0x33, 0xb0, + 0x99, 0x91, 0x78, 0x40, 0xd2, 0x28, 0x8c, 0xb3, 0x4e, 0x56, 0x24, 0x84, 0x75, 0x12, 0x9c, 0xe2, + 0x88, 0x39, 0x49, 0x4a, 0x33, 0x8a, 0xd6, 0xa7, 0x65, 0x47, 0x94, 0x37, 0xfe, 0x0e, 0x68, 0x40, + 0x45, 0xb1, 0xc3, 0x9f, 0xa4, 0x6e, 0xc3, 0x0a, 0x28, 0x0d, 0x86, 0xa4, 0x23, 0xfe, 0xf9, 0xf9, + 0xbb, 0xce, 0x20, 0x4f, 0x71, 0x16, 0xd2, 0x58, 0xd6, 0xed, 0x9f, 0x4b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0x90, 0x6f, 0x98, 0x12, 0xf6, 0x8f, 0x25, 0x68, 0xce, + 0x4c, 0x1a, 0x9f, 0xcd, 0x24, 0xa5, 0x09, 0x65, 0x64, 0xd1, 0x0f, 0xd2, 0x7a, 0xbe, 0x23, 0xf5, + 0xc8, 0x77, 0x94, 0xe1, 0x45, 0xbf, 0x67, 0x55, 0x51, 0x3d, 0x0e, 0xa1, 0x5d, 0xa8, 0x8c, 0x68, + 0x46, 0xd4, 0xa1, 0xbe, 0x11, 0x16, 0x62, 0xf4, 0x08, 0x80, 0xff, 0x2a, 0xdf, 0xca, 0x82, 0x39, + 0x70, 0x44, 0x9a, 0xee, 0x41, 0xb5, 0x4f, 0xa3, 0x28, 0xcc, 0xd4, 0x79, 0xbe, 0x91, 0x55, 0x72, + 0xb4, 0x03, 0xff, 0xf8, 0x45, 0x82, 0x19, 0xf3, 0xe4, 0x82, 0x77, 0xf9, 0x60, 0xd7, 0xdc, 0xbf, + 0x64, 0x71, 0x5f, 0xd4, 0x54, 0xd0, 0xdd, 0x37, 0x9f, 0x26, 0x96, 0x71, 0x3a, 0xb1, 0x8c, 0xb3, + 0x89, 0x65, 0x7c, 0x9f, 0x58, 0xc6, 0xfb, 0x73, 0xab, 0x74, 0x76, 0x6e, 0x95, 0xbe, 0x9c, 0x5b, + 0xa5, 0xa3, 0xbd, 0x20, 0xcc, 0x8e, 0x73, 0xdf, 0xe9, 0xd3, 0xa8, 0x73, 0xf9, 0x4a, 0x9f, 0x3e, + 0xca, 0x3b, 0x7b, 0xfe, 0xba, 0xf7, 0xab, 0x62, 0x7d, 0xf7, 0x57, 0x00, 0x00, 0x00, 0xff, 0xff, + 0xfc, 0x06, 0xae, 0x9f, 0x09, 0x06, 0x00, 0x00, } func (this *ConsensusParams) Equal(that interface{}) bool { @@ -527,6 +660,9 @@ func (this *ConsensusParams) Equal(that interface{}) bool { if !this.Synchrony.Equal(that1.Synchrony) { return false } + if !this.Timeout.Equal(that1.Timeout) { + return false + } return true } func (this *BlockParams) Equal(that interface{}) bool { @@ -705,6 +841,75 @@ func (this *SynchronyParams) Equal(that interface{}) bool { } return true } +func (this *TimeoutParams) Equal(that interface{}) bool { + if that == nil { + return this == nil + } + + that1, ok := that.(*TimeoutParams) + if !ok { + that2, ok := that.(TimeoutParams) + if ok { + that1 = &that2 + } else { + return false + } + } + if that1 == nil { + return this == nil + } else if this == nil { + return false + } + if this.Propose != nil && that1.Propose != nil { + if *this.Propose != *that1.Propose { + return false + } + } else if this.Propose != nil { + return false + } else if that1.Propose != nil { + return false + } + if this.ProposeDelta != nil && that1.ProposeDelta != nil { + if *this.ProposeDelta != *that1.ProposeDelta { + return false + } + } else if this.ProposeDelta != nil { + return false + } else if that1.ProposeDelta != nil { + return false + } + if this.Vote != nil && that1.Vote != nil { + if *this.Vote != *that1.Vote { + return false + } + } else if this.Vote != nil { + return false + } else if that1.Vote != nil { + return false + } + if this.VoteDelta != nil && that1.VoteDelta != nil { + if *this.VoteDelta != *that1.VoteDelta { + return false + } + } else if this.VoteDelta != nil { + return false + } else if that1.VoteDelta != nil { + return false + } + if this.Commit != nil && that1.Commit != nil { + if *this.Commit != *that1.Commit { + return false + } + } else if this.Commit != nil { + return false + } else if that1.Commit != nil { + return false + } + if this.BypassCommitTimeout != that1.BypassCommitTimeout { + return false + } + return true +} func (m *ConsensusParams) Marshal() (dAtA []byte, err error) { size := m.Size() dAtA = make([]byte, size) @@ -725,6 +930,18 @@ func (m *ConsensusParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { _ = i var l int _ = l + if m.Timeout != nil { + { + size, err := m.Timeout.MarshalToSizedBuffer(dAtA[:i]) + if err != nil { + return 0, err + } + i -= size + i = encodeVarintParams(dAtA, i, uint64(size)) + } + i-- + dAtA[i] = 0x32 + } if m.Synchrony != nil { { size, err := m.Synchrony.MarshalToSizedBuffer(dAtA[:i]) @@ -846,12 +1063,12 @@ func (m *EvidenceParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { i-- dAtA[i] = 0x18 } - n6, err6 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):]) - if err6 != nil { - return 0, err6 + n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(m.MaxAgeDuration, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(m.MaxAgeDuration):]) + if err7 != nil { + return 0, err7 } - i -= n6 - i = encodeVarintParams(dAtA, i, uint64(n6)) + i -= n7 + i = encodeVarintParams(dAtA, i, uint64(n7)) i-- dAtA[i] = 0x12 if m.MaxAgeNumBlocks != 0 { @@ -976,22 +1193,105 @@ func (m *SynchronyParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { var l int _ = l if m.Precision != nil { - n7, err7 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Precision, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision):]) - if err7 != nil { - return 0, err7 + n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Precision, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Precision):]) + if err8 != nil { + return 0, err8 } - i -= n7 - i = encodeVarintParams(dAtA, i, uint64(n7)) + i -= n8 + i = encodeVarintParams(dAtA, i, uint64(n8)) i-- dAtA[i] = 0x12 } if m.MessageDelay != nil { - n8, err8 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MessageDelay, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay):]) - if err8 != nil { - return 0, err8 + n9, err9 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.MessageDelay, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.MessageDelay):]) + if err9 != nil { + return 0, err9 } - i -= n8 - i = encodeVarintParams(dAtA, i, uint64(n8)) + i -= n9 + i = encodeVarintParams(dAtA, i, uint64(n9)) + i-- + dAtA[i] = 0xa + } + return len(dAtA) - i, nil +} + +func (m *TimeoutParams) 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 *TimeoutParams) MarshalTo(dAtA []byte) (int, error) { + size := m.Size() + return m.MarshalToSizedBuffer(dAtA[:size]) +} + +func (m *TimeoutParams) MarshalToSizedBuffer(dAtA []byte) (int, error) { + i := len(dAtA) + _ = i + var l int + _ = l + if m.BypassCommitTimeout { + i-- + if m.BypassCommitTimeout { + dAtA[i] = 1 + } else { + dAtA[i] = 0 + } + i-- + dAtA[i] = 0x30 + } + if m.Commit != nil { + n10, err10 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Commit, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit):]) + if err10 != nil { + return 0, err10 + } + i -= n10 + i = encodeVarintParams(dAtA, i, uint64(n10)) + i-- + dAtA[i] = 0x2a + } + if m.VoteDelta != nil { + n11, err11 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.VoteDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta):]) + if err11 != nil { + return 0, err11 + } + i -= n11 + i = encodeVarintParams(dAtA, i, uint64(n11)) + i-- + dAtA[i] = 0x22 + } + if m.Vote != nil { + n12, err12 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Vote, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote):]) + if err12 != nil { + return 0, err12 + } + i -= n12 + i = encodeVarintParams(dAtA, i, uint64(n12)) + i-- + dAtA[i] = 0x1a + } + if m.ProposeDelta != nil { + n13, err13 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.ProposeDelta, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta):]) + if err13 != nil { + return 0, err13 + } + i -= n13 + i = encodeVarintParams(dAtA, i, uint64(n13)) + i-- + dAtA[i] = 0x12 + } + if m.Propose != nil { + n14, err14 := github_com_gogo_protobuf_types.StdDurationMarshalTo(*m.Propose, dAtA[i-github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose):]) + if err14 != nil { + return 0, err14 + } + i -= n14 + i = encodeVarintParams(dAtA, i, uint64(n14)) i-- dAtA[i] = 0xa } @@ -1035,6 +1335,10 @@ func (m *ConsensusParams) Size() (n int) { l = m.Synchrony.Size() n += 1 + l + sovParams(uint64(l)) } + if m.Timeout != nil { + l = m.Timeout.Size() + n += 1 + l + sovParams(uint64(l)) + } return n } @@ -1129,6 +1433,38 @@ func (m *SynchronyParams) Size() (n int) { return n } +func (m *TimeoutParams) Size() (n int) { + if m == nil { + return 0 + } + var l int + _ = l + if m.Propose != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Propose) + n += 1 + l + sovParams(uint64(l)) + } + if m.ProposeDelta != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.ProposeDelta) + n += 1 + l + sovParams(uint64(l)) + } + if m.Vote != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Vote) + n += 1 + l + sovParams(uint64(l)) + } + if m.VoteDelta != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.VoteDelta) + n += 1 + l + sovParams(uint64(l)) + } + if m.Commit != nil { + l = github_com_gogo_protobuf_types.SizeOfStdDuration(*m.Commit) + n += 1 + l + sovParams(uint64(l)) + } + if m.BypassCommitTimeout { + n += 2 + } + return n +} + func sovParams(x uint64) (n int) { return (math_bits.Len64(x|1) + 6) / 7 } @@ -1344,6 +1680,42 @@ func (m *ConsensusParams) Unmarshal(dAtA []byte) error { return err } iNdEx = postIndex + case 6: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Timeout", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Timeout == nil { + m.Timeout = &TimeoutParams{} + } + if err := m.Timeout.Unmarshal(dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex default: iNdEx = preIndex skippy, err := skipParams(dAtA[iNdEx:]) @@ -1935,6 +2307,256 @@ func (m *SynchronyParams) Unmarshal(dAtA []byte) error { } return nil } +func (m *TimeoutParams) 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 ErrIntOverflowParams + } + 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: TimeoutParams: wiretype end group for non-group") + } + if fieldNum <= 0 { + return fmt.Errorf("proto: TimeoutParams: illegal tag %d (wire type %d)", fieldNum, wire) + } + switch fieldNum { + case 1: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Propose", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Propose == nil { + m.Propose = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Propose, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 2: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field ProposeDelta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.ProposeDelta == nil { + m.ProposeDelta = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.ProposeDelta, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 3: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Vote", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Vote == nil { + m.Vote = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Vote, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 4: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field VoteDelta", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.VoteDelta == nil { + m.VoteDelta = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.VoteDelta, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 5: + if wireType != 2 { + return fmt.Errorf("proto: wrong wireType = %d for field Commit", wireType) + } + var msglen int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + msglen |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + if msglen < 0 { + return ErrInvalidLengthParams + } + postIndex := iNdEx + msglen + if postIndex < 0 { + return ErrInvalidLengthParams + } + if postIndex > l { + return io.ErrUnexpectedEOF + } + if m.Commit == nil { + m.Commit = new(time.Duration) + } + if err := github_com_gogo_protobuf_types.StdDurationUnmarshal(m.Commit, dAtA[iNdEx:postIndex]); err != nil { + return err + } + iNdEx = postIndex + case 6: + if wireType != 0 { + return fmt.Errorf("proto: wrong wireType = %d for field BypassCommitTimeout", wireType) + } + var v int + for shift := uint(0); ; shift += 7 { + if shift >= 64 { + return ErrIntOverflowParams + } + if iNdEx >= l { + return io.ErrUnexpectedEOF + } + b := dAtA[iNdEx] + iNdEx++ + v |= int(b&0x7F) << shift + if b < 0x80 { + break + } + } + m.BypassCommitTimeout = bool(v != 0) + default: + iNdEx = preIndex + skippy, err := skipParams(dAtA[iNdEx:]) + if err != nil { + return err + } + if (skippy < 0) || (iNdEx+skippy) < 0 { + return ErrInvalidLengthParams + } + if (iNdEx + skippy) > l { + return io.ErrUnexpectedEOF + } + iNdEx += skippy + } + } + + if iNdEx > l { + return io.ErrUnexpectedEOF + } + return nil +} func skipParams(dAtA []byte) (n int, err error) { l := len(dAtA) iNdEx := 0 diff --git a/proto/tendermint/types/params.proto b/proto/tendermint/types/params.proto index c5a9e048f..dcb4d11ba 100644 --- a/proto/tendermint/types/params.proto +++ b/proto/tendermint/types/params.proto @@ -120,10 +120,10 @@ message TimeoutParams { // used to allow slow precommits to arrive for inclusion in the next height before progressing. google.protobuf.Duration commit = 5 [(gogoproto.stdduration) = true]; - // enable_commit_timeout_bypass configures the node to proceed immediately to + // bypass_commit_timeout configures the node to proceed immediately to // the next height once the node has received all precommits for a block, forgoing // the remaining commit timeout. - // Setting enable_commit_timeout_bypass false (the default) causes Tendermint to wait - // for the full commit. - bool enable_commit_timeout_bypass = 6; + // Setting bypass_commit_timeout false (the default) causes Tendermint to wait + // for the full commit timeout. + bool bypass_commit_timeout = 6; } diff --git a/spec/core/data_structures.md b/spec/core/data_structures.md index 0aca40519..dde3ec354 100644 --- a/spec/core/data_structures.md +++ b/spec/core/data_structures.md @@ -466,7 +466,7 @@ func SumTruncated(bz []byte) []byte { | vote | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)| Parameter that, along with vote_delta, configures the timeout for the prevote and precommit step of the consensus algorithm. | 3 | | vote_delta | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration)| Parameter that, along with vote, configures the timeout for the prevote and precommit step of the consensus algorithm. | 4 | | commit | [google.protobuf.Duration](https://developers.google.com/protocol-buffers/docs/reference/google.protobuf#google.protobuf.Duration) | Parameter that configures how long Tendermint will wait after receiving a quorum of precommits before beginning consensus for the next height.| 5 | -| enable_commit_timeout_bypass | bool | Parameter that, if enabled, configures the node to proceed immediately to the next height once the node has received all precommits for a block, forgoing the commit timeout. | 6 | +| bypass_commit_timeout | bool | Parameter that, if enabled, configures the node to proceed immediately to the next height once the node has received all precommits for a block, forgoing the commit timeout. | 6 | ## Proof diff --git a/types/genesis_test.go b/types/genesis_test.go index 99227ad3b..722358111 100644 --- a/types/genesis_test.go +++ b/types/genesis_test.go @@ -72,6 +72,14 @@ func TestBasicGenesisDoc(t *testing.T) { "app_state":{"account_owner": "Bob"}, "consensus_params": { "synchrony": {"precision": "1", "message_delay": "10"}, + "timeout": { + "propose": "30000000000", + "propose_delta": "50000000", + "vote": "30000000000", + "vote_delta": "50000000", + "commit": "10000000000", + "bypass_commit_timeout": false + }, "validator": {"pub_key_types":["ed25519"]}, "block": {"max_bytes": "100"}, "evidence": {"max_age_num_blocks": "100", "max_age_duration": "10"} diff --git a/types/params.go b/types/params.go index a74ae3762..6a2920590 100644 --- a/types/params.go +++ b/types/params.go @@ -42,6 +42,7 @@ type ConsensusParams struct { Validator ValidatorParams `json:"validator"` Version VersionParams `json:"version"` Synchrony SynchronyParams `json:"synchrony"` + Timeout TimeoutParams `json:"timeout"` } // HashedParams is a subset of ConsensusParams. @@ -85,6 +86,16 @@ type SynchronyParams struct { MessageDelay time.Duration `json:"message_delay,string"` } +// TimeoutParams configure the timings of the steps of the Tendermint consensus algorithm. +type TimeoutParams struct { + Propose time.Duration `json:"propose,string"` + ProposeDelta time.Duration `json:"propose_delta,string"` + Vote time.Duration `json:"vote,string"` + VoteDelta time.Duration `json:"vote_delta,string"` + Commit time.Duration `json:"commit,string"` + BypassCommitTimeout bool `json:"bypass_commit_timeout"` +} + // DefaultConsensusParams returns a default ConsensusParams. func DefaultConsensusParams() *ConsensusParams { return &ConsensusParams{ @@ -93,6 +104,7 @@ func DefaultConsensusParams() *ConsensusParams { Validator: DefaultValidatorParams(), Version: DefaultVersionParams(), Synchrony: DefaultSynchronyParams(), + Timeout: DefaultTimeoutParams(), } } @@ -135,6 +147,18 @@ func DefaultSynchronyParams() SynchronyParams { Precision: 505 * time.Millisecond, MessageDelay: 12 * time.Second, } + +} + +func DefaultTimeoutParams() TimeoutParams { + return TimeoutParams{ + Propose: 3000 * time.Millisecond, + ProposeDelta: 500 * time.Millisecond, + Vote: 1000 * time.Millisecond, + VoteDelta: 500 * time.Millisecond, + Commit: 1000 * time.Millisecond, + BypassCommitTimeout: false, + } } func (val *ValidatorParams) IsValidPubkeyType(pubkeyType string) bool { @@ -150,6 +174,9 @@ func (params *ConsensusParams) Complete() { if params.Synchrony == (SynchronyParams{}) { params.Synchrony = DefaultSynchronyParams() } + if params.Timeout == (TimeoutParams{}) { + params.Timeout = DefaultTimeoutParams() + } } // Validate validates the ConsensusParams to ensure all values are within their @@ -199,6 +226,26 @@ func (params ConsensusParams) ValidateConsensusParams() error { params.Synchrony.Precision) } + if params.Timeout.Propose < 0 { + return fmt.Errorf("timeout.ProposeDelta must not be negative. Got: %d", params.Timeout.Propose) + } + + if params.Timeout.ProposeDelta < 0 { + return fmt.Errorf("timeout.ProposeDelta must not be negative. Got: %d", params.Timeout.ProposeDelta) + } + + if params.Timeout.Vote < 0 { + return fmt.Errorf("timeout.Vote must not be negative. Got: %d", params.Timeout.Vote) + } + + if params.Timeout.VoteDelta < 0 { + return fmt.Errorf("timeout.VoteDelta must not be negative. Got: %d", params.Timeout.VoteDelta) + } + + if params.Timeout.Commit < 0 { + return fmt.Errorf("timeout.Commit must not be negative. Got: %d", params.Timeout.Commit) + } + if len(params.Validator.PubKeyTypes) == 0 { return errors.New("len(Validator.PubKeyTypes) must be greater than 0") } @@ -244,6 +291,7 @@ func (params *ConsensusParams) Equals(params2 *ConsensusParams) bool { params.Evidence == params2.Evidence && params.Version == params2.Version && params.Synchrony == params2.Synchrony && + params.Timeout == params2.Timeout && tmstrings.StringSliceEqual(params.Validator.PubKeyTypes, params2.Validator.PubKeyTypes) } @@ -282,6 +330,24 @@ func (params ConsensusParams) UpdateConsensusParams(params2 *tmproto.ConsensusPa res.Synchrony.Precision = *params2.Synchrony.GetPrecision() } } + if params2.Timeout != nil { + if params2.Timeout.Propose != nil { + res.Timeout.Propose = *params2.Timeout.GetPropose() + } + if params2.Timeout.ProposeDelta != nil { + res.Timeout.ProposeDelta = *params2.Timeout.GetProposeDelta() + } + if params2.Timeout.Vote != nil { + res.Timeout.Vote = *params2.Timeout.GetVote() + } + if params2.Timeout.VoteDelta != nil { + res.Timeout.VoteDelta = *params2.Timeout.GetVoteDelta() + } + if params2.Timeout.Commit != nil { + res.Timeout.Commit = *params2.Timeout.GetCommit() + } + res.Timeout.BypassCommitTimeout = params2.Timeout.GetBypassCommitTimeout() + } return res } @@ -306,6 +372,14 @@ func (params *ConsensusParams) ToProto() tmproto.ConsensusParams { MessageDelay: ¶ms.Synchrony.MessageDelay, Precision: ¶ms.Synchrony.Precision, }, + Timeout: &tmproto.TimeoutParams{ + Propose: ¶ms.Timeout.Propose, + ProposeDelta: ¶ms.Timeout.ProposeDelta, + Vote: ¶ms.Timeout.Vote, + VoteDelta: ¶ms.Timeout.VoteDelta, + Commit: ¶ms.Timeout.Commit, + BypassCommitTimeout: params.Timeout.BypassCommitTimeout, + }, } } @@ -335,5 +409,23 @@ func ConsensusParamsFromProto(pbParams tmproto.ConsensusParams) ConsensusParams c.Synchrony.Precision = *pbParams.Synchrony.GetPrecision() } } + if pbParams.Timeout != nil { + if pbParams.Timeout.Propose != nil { + c.Timeout.Propose = *pbParams.Timeout.GetPropose() + } + if pbParams.Timeout.ProposeDelta != nil { + c.Timeout.ProposeDelta = *pbParams.Timeout.GetProposeDelta() + } + if pbParams.Timeout.Vote != nil { + c.Timeout.Vote = *pbParams.Timeout.GetVote() + } + if pbParams.Timeout.VoteDelta != nil { + c.Timeout.VoteDelta = *pbParams.Timeout.GetVoteDelta() + } + if pbParams.Timeout.Commit != nil { + c.Timeout.Commit = *pbParams.Timeout.GetCommit() + } + c.Timeout.BypassCommitTimeout = pbParams.Timeout.BypassCommitTimeout + } return c } diff --git a/types/params_test.go b/types/params_test.go index 41b5afc04..dd21d1d1b 100644 --- a/types/params_test.go +++ b/types/params_test.go @@ -168,13 +168,19 @@ func TestConsensusParamsValidation(t *testing.T) { } type makeParamsArgs struct { - blockBytes int64 - blockGas int64 - evidenceAge int64 - maxEvidenceBytes int64 - pubkeyTypes []string - precision time.Duration - messageDelay time.Duration + blockBytes int64 + blockGas int64 + evidenceAge int64 + maxEvidenceBytes int64 + pubkeyTypes []string + precision time.Duration + messageDelay time.Duration + propose time.Duration + proposeDelta time.Duration + vote time.Duration + voteDelta time.Duration + commit time.Duration + bypassCommitTimeout bool } func makeParams(args makeParamsArgs) ConsensusParams { @@ -198,8 +204,15 @@ func makeParams(args makeParamsArgs) ConsensusParams { Precision: args.precision, MessageDelay: args.messageDelay, }, + Timeout: TimeoutParams{ + Propose: args.propose, + ProposeDelta: args.proposeDelta, + Vote: args.vote, + VoteDelta: args.voteDelta, + Commit: args.commit, + BypassCommitTimeout: args.bypassCommitTimeout, + }, } - } func TestConsensusParamsHash(t *testing.T) { @@ -252,6 +265,35 @@ func TestConsensusParamsUpdate(t *testing.T) { }, updatedParams: makeParams(makeParamsArgs{evidenceAge: 3, precision: 2 * time.Second, messageDelay: 4 * time.Second}), }, + { + // update timeout params + intialParams: makeParams(makeParamsArgs{ + propose: 3 * time.Second, + proposeDelta: 500 * time.Millisecond, + vote: time.Second, + voteDelta: 500 * time.Millisecond, + commit: time.Second, + bypassCommitTimeout: false, + }), + updates: &tmproto.ConsensusParams{ + Timeout: &tmproto.TimeoutParams{ + Propose: durationPtr(2 * time.Second), + ProposeDelta: durationPtr(400 * time.Millisecond), + Vote: durationPtr(5 * time.Second), + VoteDelta: durationPtr(400 * time.Millisecond), + Commit: durationPtr(time.Minute), + BypassCommitTimeout: true, + }, + }, + updatedParams: makeParams(makeParamsArgs{ + propose: 2 * time.Second, + proposeDelta: 400 * time.Millisecond, + vote: 5 * time.Second, + voteDelta: 400 * time.Millisecond, + commit: time.Minute, + bypassCommitTimeout: true, + }), + }, // fine updates { intialParams: makeParams(makeParamsArgs{blockBytes: 1, blockGas: 2, evidenceAge: 3}), From 0c9558a7428c258e7055db56d2a87823027852df Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 22 Mar 2022 15:28:33 -0400 Subject: [PATCH 10/13] consensus: avoid panic during shutdown (#8170) --- internal/consensus/state.go | 38 ++++++++++++++++++++++++++----------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/internal/consensus/state.go b/internal/consensus/state.go index bd79f4f83..fa5c7f575 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -861,19 +861,35 @@ func (cs *State) receiveRoutine(ctx context.Context, maxSteps int) { // complicate diagnosing and recovering from the failure. onExit(cs) + // There are a couple of cases where the we + // panic with an error from deeper within the + // state machine and in these cases, typically + // during a normal shutdown, we can continue + // with normal shutdown with safety. These + // cases are: + if err, ok := r.(error); ok { + // TODO(creachadair): In ordinary operation, the WAL autofile should + // never be closed. This only happens during shutdown and production + // nodes usually halt by panicking. Many existing tests, however, + // assume a clean shutdown is possible. Prior to #8111, we were + // swallowing the panic in receiveRoutine, making that appear to + // work. Filtering this specific error is slightly risky, but should + // affect only unit tests. In any case, not re-panicking here only + // preserves the pre-existing behavior for this one error type. + if errors.Is(err, autofile.ErrAutoFileClosed) { + return + } + + // don't re-panic if the panic is just an + // error and we're already trying to shut down + if ctx.Err() != nil { + return + + } + } + // Re-panic to ensure the node terminates. // - // TODO(creachadair): In ordinary operation, the WAL autofile should - // never be closed. This only happens during shutdown and production - // nodes usually halt by panicking. Many existing tests, however, - // assume a clean shutdown is possible. Prior to #8111, we were - // swallowing the panic in receiveRoutine, making that appear to - // work. Filtering this specific error is slightly risky, but should - // affect only unit tests. In any case, not re-panicking here only - // preserves the pre-existing behavior for this one error type. - if err, ok := r.(error); ok && errors.Is(err, autofile.ErrAutoFileClosed) { - return - } panic(r) } }() From b29cc95920a936e43606bcdc785c1f401bf8ea4c Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 22 Mar 2022 17:41:00 -0400 Subject: [PATCH 11/13] consensus: cleanup tempfile explictly (#8184) --- internal/consensus/replay_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index bb3123af2..860824892 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -652,12 +652,12 @@ func tempWALWithData(t *testing.T, data []byte) string { walFile, err := os.CreateTemp(t.TempDir(), "wal") require.NoError(t, err, "failed to create temp WAL file") + t.Cleanup(func() { _ = os.RemoveAll(walFile.Name()) }) _, err = walFile.Write(data) require.NoError(t, err, "failed to write to temp WAL file") require.NoError(t, walFile.Close(), "failed to close temp WAL file") - return walFile.Name() } From cbce877480da2a59f9edd441c6cf51fa90368568 Mon Sep 17 00:00:00 2001 From: Sam Kleinman Date: Tue, 22 Mar 2022 20:00:08 -0400 Subject: [PATCH 12/13] consensus: add leaktest check to replay tests (#8185) --- internal/consensus/replay_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/internal/consensus/replay_test.go b/internal/consensus/replay_test.go index 860824892..d24e55d67 100644 --- a/internal/consensus/replay_test.go +++ b/internal/consensus/replay_test.go @@ -12,6 +12,7 @@ import ( "testing" "time" + "github.com/fortytw2/leaktest" "github.com/gogo/protobuf/proto" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -594,6 +595,8 @@ func TestHandshakeReplayAll(t *testing.T) { sim := setupSimulator(ctx, t) + t.Cleanup(leaktest.Check(t)) + for _, m := range modes { testHandshakeReplay(ctx, t, sim, 0, m, false) } @@ -609,6 +612,8 @@ func TestHandshakeReplaySome(t *testing.T) { sim := setupSimulator(ctx, t) + t.Cleanup(leaktest.Check(t)) + for _, m := range modes { testHandshakeReplay(ctx, t, sim, 2, m, false) } @@ -639,6 +644,8 @@ func TestHandshakeReplayNone(t *testing.T) { sim := setupSimulator(ctx, t) + t.Cleanup(leaktest.Check(t)) + for _, m := range modes { testHandshakeReplay(ctx, t, sim, numBlocks, m, false) } From e4ae922c333f89629e1a4e31bf408aa67008b223 Mon Sep 17 00:00:00 2001 From: William Banfield <4561443+williambanfield@users.noreply.github.com> Date: Wed, 23 Mar 2022 11:26:42 -0400 Subject: [PATCH 13/13] consensus: update state machine to use the new consensus params (#8181) --- config/config.go | 27 ---------- config/toml.go | 12 ++--- internal/blocksync/reactor_test.go | 10 ++-- internal/consensus/byzantine_test.go | 2 +- internal/consensus/common_test.go | 5 +- internal/consensus/mempool_test.go | 19 ++++--- internal/consensus/pbts_test.go | 5 +- internal/consensus/reactor_test.go | 2 +- internal/consensus/state.go | 32 +++++------- internal/consensus/state_test.go | 78 ++++++++++++++-------------- internal/test/factory/params.go | 22 ++++++++ node/node_test.go | 2 +- types/params.go | 21 ++++++++ 13 files changed, 127 insertions(+), 110 deletions(-) create mode 100644 internal/test/factory/params.go diff --git a/config/config.go b/config/config.go index 959e37912..e33b8dd7e 100644 --- a/config/config.go +++ b/config/config.go @@ -1030,33 +1030,6 @@ func (cfg *ConsensusConfig) WaitForTxs() bool { return !cfg.CreateEmptyBlocks || cfg.CreateEmptyBlocksInterval > 0 } -// Propose returns the amount of time to wait for a proposal -func (cfg *ConsensusConfig) Propose(round int32) time.Duration { - return time.Duration( - cfg.TimeoutPropose.Nanoseconds()+cfg.TimeoutProposeDelta.Nanoseconds()*int64(round), - ) * time.Nanosecond -} - -// Prevote returns the amount of time to wait for straggler votes after receiving any +2/3 prevotes -func (cfg *ConsensusConfig) Prevote(round int32) time.Duration { - return time.Duration( - cfg.TimeoutPrevote.Nanoseconds()+cfg.TimeoutPrevoteDelta.Nanoseconds()*int64(round), - ) * time.Nanosecond -} - -// Precommit returns the amount of time to wait for straggler votes after receiving any +2/3 precommits -func (cfg *ConsensusConfig) Precommit(round int32) time.Duration { - return time.Duration( - cfg.TimeoutPrecommit.Nanoseconds()+cfg.TimeoutPrecommitDelta.Nanoseconds()*int64(round), - ) * time.Nanosecond -} - -// Commit returns the amount of time to wait for straggler votes after receiving +2/3 precommits -// for a single block (ie. a commit). -func (cfg *ConsensusConfig) Commit(t time.Time) time.Time { - return t.Add(cfg.TimeoutCommit) -} - // WalFile returns the full path to the write-ahead log file func (cfg *ConsensusConfig) WalFile() string { if cfg.walFile != "" { diff --git a/config/toml.go b/config/toml.go index 08106efef..a82e7f59d 100644 --- a/config/toml.go +++ b/config/toml.go @@ -603,12 +603,12 @@ var testGenesisFmt = `{ "precision": "10000000" }, "timeout": { - "propose": "30000000000", - "propose_delta": "50000000", - "vote": "30000000000", - "vote_delta": "50000000", - "commit": "10000000000", - "bypass_commit_timeout": false + "propose": "30000000", + "propose_delta": "50000", + "vote": "30000000", + "vote_delta": "50000", + "commit": "10000000", + "bypass_timeout_commit": true }, "evidence": { "max_age_num_blocks": "100000", diff --git a/internal/blocksync/reactor_test.go b/internal/blocksync/reactor_test.go index 5c3c797ce..5d70c27ca 100644 --- a/internal/blocksync/reactor_test.go +++ b/internal/blocksync/reactor_test.go @@ -226,7 +226,7 @@ func TestReactor_AbruptDisconnect(t *testing.T) { defer os.RemoveAll(cfg.RootDir) valSet, privVals := factory.ValidatorSet(ctx, t, 1, 30) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) maxBlockHeight := int64(64) rts := setup(ctx, t, genDoc, privVals[0], []int64{maxBlockHeight, 0}, 0) @@ -266,7 +266,7 @@ func TestReactor_SyncTime(t *testing.T) { defer os.RemoveAll(cfg.RootDir) valSet, privVals := factory.ValidatorSet(ctx, t, 1, 30) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) maxBlockHeight := int64(101) rts := setup(ctx, t, genDoc, privVals[0], []int64{maxBlockHeight, 0}, 0) @@ -294,7 +294,7 @@ func TestReactor_NoBlockResponse(t *testing.T) { defer os.RemoveAll(cfg.RootDir) valSet, privVals := factory.ValidatorSet(ctx, t, 1, 30) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) maxBlockHeight := int64(65) rts := setup(ctx, t, genDoc, privVals[0], []int64{maxBlockHeight, 0}, 0) @@ -347,7 +347,7 @@ func TestReactor_BadBlockStopsPeer(t *testing.T) { maxBlockHeight := int64(48) valSet, privVals := factory.ValidatorSet(ctx, t, 1, 30) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) rts := setup(ctx, t, genDoc, privVals[0], []int64{maxBlockHeight, 0, 0, 0, 0}, 1000) @@ -382,7 +382,7 @@ func TestReactor_BadBlockStopsPeer(t *testing.T) { // XXX: This causes a potential race condition. // See: https://github.com/tendermint/tendermint/issues/6005 valSet, otherPrivVals := factory.ValidatorSet(ctx, t, 1, 30) - otherGenDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + otherGenDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) newNode := rts.network.MakeNode(ctx, t, p2ptest.NodeOptions{ MaxPeers: uint16(len(rts.nodes) + 1), MaxConnected: uint16(len(rts.nodes) + 1), diff --git a/internal/consensus/byzantine_test.go b/internal/consensus/byzantine_test.go index dfeb556fe..40a37b812 100644 --- a/internal/consensus/byzantine_test.go +++ b/internal/consensus/byzantine_test.go @@ -48,7 +48,7 @@ func TestByzantinePrevoteEquivocation(t *testing.T) { tickerFunc := newMockTickerFunc(true) valSet, privVals := factory.ValidatorSet(ctx, t, nValidators, 30) - genDoc := factory.GenesisDoc(config, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(config, time.Now(), valSet.Validators, factory.ConsensusParams()) states := make([]*State, nValidators) for i := 0; i < nValidators; i++ { diff --git a/internal/consensus/common_test.go b/internal/consensus/common_test.go index 161594021..6abe14f60 100644 --- a/internal/consensus/common_test.go +++ b/internal/consensus/common_test.go @@ -548,6 +548,7 @@ func makeState(ctx context.Context, t *testing.T, args makeStateArgs) (*State, [ } state, privVals := makeGenesisState(ctx, t, args.config, genesisStateArgs{ + Params: factory.ConsensusParams(), Validators: validators, }) @@ -793,7 +794,7 @@ func makeConsensusState( tempDir := t.TempDir() valSet, privVals := factory.ValidatorSet(ctx, t, nValidators, 30) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) css := make([]*State, nValidators) logger := consensusLogger() @@ -852,7 +853,7 @@ func randConsensusNetWithPeers( t.Helper() valSet, privVals := factory.ValidatorSet(ctx, t, nValidators, testMinPower) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) css := make([]*State, nPeers) t.Helper() logger := consensusLogger() diff --git a/internal/consensus/mempool_test.go b/internal/consensus/mempool_test.go index addf60556..f218a5cf1 100644 --- a/internal/consensus/mempool_test.go +++ b/internal/consensus/mempool_test.go @@ -17,6 +17,7 @@ import ( "github.com/tendermint/tendermint/internal/mempool" sm "github.com/tendermint/tendermint/internal/state" "github.com/tendermint/tendermint/internal/store" + "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" "github.com/tendermint/tendermint/types" ) @@ -42,7 +43,8 @@ func TestMempoolNoProgressUntilTxsAvailable(t *testing.T) { config.Consensus.CreateEmptyBlocks = false state, privVals := makeGenesisState(ctx, t, baseConfig, genesisStateArgs{ Validators: 1, - Power: 10}) + Power: 10, + Params: factory.ConsensusParams()}) cs := newStateWithConfig(ctx, t, log.NewNopLogger(), config, state, privVals[0], NewCounterApplication()) assertMempool(t, cs.txNotifier).EnableTxsAvailable() height, round := cs.Height, cs.Round @@ -69,7 +71,8 @@ func TestMempoolProgressAfterCreateEmptyBlocksInterval(t *testing.T) { config.Consensus.CreateEmptyBlocksInterval = ensureTimeout state, privVals := makeGenesisState(ctx, t, baseConfig, genesisStateArgs{ Validators: 1, - Power: 10}) + Power: 10, + Params: factory.ConsensusParams()}) cs := newStateWithConfig(ctx, t, log.NewNopLogger(), config, state, privVals[0], NewCounterApplication()) assertMempool(t, cs.txNotifier).EnableTxsAvailable() @@ -94,7 +97,8 @@ func TestMempoolProgressInHigherRound(t *testing.T) { config.Consensus.CreateEmptyBlocks = false state, privVals := makeGenesisState(ctx, t, baseConfig, genesisStateArgs{ Validators: 1, - Power: 10}) + Power: 10, + Params: factory.ConsensusParams()}) cs := newStateWithConfig(ctx, t, log.NewNopLogger(), config, state, privVals[0], NewCounterApplication()) assertMempool(t, cs.txNotifier).EnableTxsAvailable() height, round := cs.Height, cs.Round @@ -119,7 +123,7 @@ func TestMempoolProgressInHigherRound(t *testing.T) { ensureNewRound(t, newRoundCh, height, round) // first round at next height checkTxsRange(ctx, t, cs, 0, 1) // we deliver txs, but don't set a proposal so we get the next round - ensureNewTimeout(t, timeoutCh, height, round, cs.config.TimeoutPropose.Nanoseconds()) + ensureNewTimeout(t, timeoutCh, height, round, cs.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) round++ // moving to the next round ensureNewRound(t, newRoundCh, height, round) // wait for the next round @@ -145,7 +149,9 @@ func TestMempoolTxConcurrentWithCommit(t *testing.T) { logger := log.NewNopLogger() state, privVals := makeGenesisState(ctx, t, config, genesisStateArgs{ Validators: 1, - Power: 10}) + Power: 10, + Params: factory.ConsensusParams(), + }) stateStore := sm.NewStore(dbm.NewMemDB()) blockStore := store.NewBlockStore(dbm.NewMemDB()) @@ -180,7 +186,8 @@ func TestMempoolRmBadTx(t *testing.T) { state, privVals := makeGenesisState(ctx, t, config, genesisStateArgs{ Validators: 1, - Power: 10}) + Power: 10, + Params: factory.ConsensusParams()}) app := NewCounterApplication() stateStore := sm.NewStore(dbm.NewMemDB()) blockStore := store.NewBlockStore(dbm.NewMemDB()) diff --git a/internal/consensus/pbts_test.go b/internal/consensus/pbts_test.go index c5a5ac535..a34870c9f 100644 --- a/internal/consensus/pbts_test.go +++ b/internal/consensus/pbts_test.go @@ -12,6 +12,7 @@ import ( "github.com/tendermint/tendermint/abci/example/kvstore" "github.com/tendermint/tendermint/internal/eventbus" tmpubsub "github.com/tendermint/tendermint/internal/pubsub" + "github.com/tendermint/tendermint/internal/test/factory" "github.com/tendermint/tendermint/libs/log" tmtimemocks "github.com/tendermint/tendermint/libs/time/mocks" tmproto "github.com/tendermint/tendermint/proto/tendermint/types" @@ -105,8 +106,8 @@ func newPBTSTestHarness(ctx context.Context, t *testing.T, tc pbtsTestConfigurat // height 4 therefore occurs 2*blockTimeIota after height 2. tc.height4ProposedBlockOffset = tc.height2ProposalTimeDeliveryOffset + 2*blockTimeIota } - cfg.Consensus.TimeoutPropose = tc.timeoutPropose - consensusParams := types.DefaultConsensusParams() + consensusParams := factory.ConsensusParams() + consensusParams.Timeout.Propose = tc.timeoutPropose consensusParams.Synchrony = tc.synchronyParams state, privVals := makeGenesisState(ctx, t, cfg, genesisStateArgs{ diff --git a/internal/consensus/reactor_test.go b/internal/consensus/reactor_test.go index c284b4345..a84aa8bde 100644 --- a/internal/consensus/reactor_test.go +++ b/internal/consensus/reactor_test.go @@ -450,7 +450,7 @@ func TestReactorWithEvidence(t *testing.T) { tickerFunc := newMockTickerFunc(true) valSet, privVals := factory.ValidatorSet(ctx, t, n, 30) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) states := make([]*State, n) logger := consensusLogger() diff --git a/internal/consensus/state.go b/internal/consensus/state.go index fa5c7f575..e27d971ca 100644 --- a/internal/consensus/state.go +++ b/internal/consensus/state.go @@ -506,8 +506,8 @@ func (cs *State) OnStop() { if cs.GetRoundState().Step == cstypes.RoundStepCommit { select { case <-cs.getOnStopCh(): - case <-time.After(cs.config.TimeoutCommit): - cs.logger.Error("OnStop: timeout waiting for commit to finish", "time", cs.config.TimeoutCommit) + case <-time.After(cs.state.ConsensusParams.Timeout.Commit): + cs.logger.Error("OnStop: timeout waiting for commit to finish", "time", cs.state.ConsensusParams.Timeout.Commit) } } @@ -787,9 +787,9 @@ func (cs *State) updateToState(ctx context.Context, state sm.State) { // to be gathered for the first block. // And alternative solution that relies on clocks: // cs.StartTime = state.LastBlockTime.Add(timeoutCommit) - cs.StartTime = cs.config.Commit(tmtime.Now()) + cs.StartTime = cs.state.ConsensusParams.Timeout.CommitTime(tmtime.Now()) } else { - cs.StartTime = cs.config.Commit(cs.CommitTime) + cs.StartTime = cs.state.ConsensusParams.Timeout.CommitTime(cs.CommitTime) } cs.Validators = validators @@ -1262,7 +1262,7 @@ func (cs *State) enterPropose(ctx context.Context, height int64, round int32) { }() // If we don't get the proposal and all block parts quick enough, enterPrevote - cs.scheduleTimeout(cs.config.Propose(round), height, round, cstypes.RoundStepPropose) + cs.scheduleTimeout(cs.state.ConsensusParams.Timeout.ProposeTimeout(round), height, round, cstypes.RoundStepPropose) // Nothing more to do if we're not a validator if cs.privValidator == nil { @@ -1343,7 +1343,7 @@ func (cs *State) defaultDecideProposal(ctx context.Context, height int64, round p := proposal.ToProto() // wait the max amount we would wait for a proposal - ctxto, cancel := context.WithTimeout(ctx, cs.config.TimeoutPropose) + ctxto, cancel := context.WithTimeout(ctx, cs.state.ConsensusParams.Timeout.Propose) defer cancel() if err := cs.privValidator.SignProposal(ctxto, cs.state.ChainID, p); err == nil { proposal.Signature = p.Signature @@ -1620,7 +1620,7 @@ func (cs *State) enterPrevoteWait(ctx context.Context, height int64, round int32 }() // Wait for some more prevotes; enterPrecommit - cs.scheduleTimeout(cs.config.Prevote(round), height, round, cstypes.RoundStepPrevoteWait) + cs.scheduleTimeout(cs.state.ConsensusParams.Timeout.VoteTimeout(round), height, round, cstypes.RoundStepPrevoteWait) } // Enter: `timeoutPrevote` after any +2/3 prevotes. @@ -1773,7 +1773,7 @@ func (cs *State) enterPrecommitWait(ctx context.Context, height int64, round int }() // wait for some more precommits; enterNewRound - cs.scheduleTimeout(cs.config.Precommit(round), height, round, cstypes.RoundStepPrecommitWait) + cs.scheduleTimeout(cs.state.ConsensusParams.Timeout.VoteTimeout(round), height, round, cstypes.RoundStepPrecommitWait) } // Enter: +2/3 precommits for block @@ -2309,7 +2309,7 @@ func (cs *State) addVote( cs.evsw.FireEvent(ctx, types.EventVoteValue, vote) // if we can skip timeoutCommit and have all the votes now, - if cs.config.SkipTimeoutCommit && cs.LastCommit.HasAll() { + if cs.state.ConsensusParams.Timeout.BypassCommitTimeout && cs.LastCommit.HasAll() { // go straight to new round (skip timeout commit) // cs.scheduleTimeout(time.Duration(0), cs.Height, 0, cstypes.RoundStepNewHeight) cs.enterNewRound(ctx, cs.Height, 0) @@ -2422,7 +2422,7 @@ func (cs *State) addVote( if !blockID.IsNil() { cs.enterCommit(ctx, height, vote.Round) - if cs.config.SkipTimeoutCommit && precommits.HasAll() { + if cs.state.ConsensusParams.Timeout.BypassCommitTimeout && precommits.HasAll() { cs.enterNewRound(ctx, cs.Height, 0) } } else { @@ -2472,19 +2472,16 @@ func (cs *State) signVote( // If the signedMessageType is for precommit, // use our local precommit Timeout as the max wait time for getting a singed commit. The same goes for prevote. - var timeout time.Duration + timeout := cs.state.ConsensusParams.Timeout.VoteTimeout(cs.Round) switch msgType { case tmproto.PrecommitType: - timeout = cs.config.TimeoutPrecommit // if the signedMessage type is for a precommit, add VoteExtension ext, err := cs.blockExec.ExtendVote(ctx, vote) if err != nil { return nil, err } vote.VoteExtension = ext - case tmproto.PrevoteType: - timeout = cs.config.TimeoutPrevote default: timeout = time.Second } @@ -2543,12 +2540,7 @@ func (cs *State) updatePrivValidatorPubKey(rctx context.Context) error { return nil } - var timeout time.Duration - if cs.config.TimeoutPrecommit > cs.config.TimeoutPrevote { - timeout = cs.config.TimeoutPrecommit - } else { - timeout = cs.config.TimeoutPrevote - } + timeout := cs.state.ConsensusParams.Timeout.VoteTimeout(cs.Round) // no GetPubKey retry beyond the proposal/voting in RetrySignerClient if cs.Step >= cstypes.RoundStepPrecommit && cs.privValidatorType == types.RetrySignerClient { diff --git a/internal/consensus/state_test.go b/internal/consensus/state_test.go index f03889c9e..fa614beb3 100644 --- a/internal/consensus/state_test.go +++ b/internal/consensus/state_test.go @@ -163,7 +163,7 @@ func TestStateEnterProposeNoPrivValidator(t *testing.T) { startTestRound(ctx, cs, height, round) // if we're not a validator, EnterPropose should timeout - ensureNewTimeout(t, timeoutCh, height, round, cs.config.TimeoutPropose.Nanoseconds()) + ensureNewTimeout(t, timeoutCh, height, round, cs.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) if cs.GetRoundState().Proposal != nil { t.Error("Expected to make no proposal, since no privValidator") @@ -202,7 +202,7 @@ func TestStateEnterProposeYesPrivValidator(t *testing.T) { } // if we're a validator, enterPropose should not timeout - ensureNoNewTimeout(t, timeoutCh, cs.config.TimeoutPropose.Nanoseconds()) + ensureNoNewTimeout(t, timeoutCh, cs.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) } func TestStateBadProposal(t *testing.T) { @@ -313,7 +313,7 @@ func TestStateOversizedBlock(t *testing.T) { // c1 should log an error with the block part message as it exceeds the consensus params. The // block is not added to cs.ProposalBlock so the node timeouts. - ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) // and then should send nil prevote and precommit regardless of whether other validators prevote and // precommit on it @@ -481,7 +481,7 @@ func TestStateLock_NoPOL(t *testing.T) { // (note we're entering precommit for a second time this round) // but with invalid args. then we enterPrecommitWait, and the timeout to new round - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /// @@ -494,7 +494,7 @@ func TestStateLock_NoPOL(t *testing.T) { incrementRound(vs2) // now we're on a new round and not the proposer, so wait for timeout - ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) rs := cs1.GetRoundState() @@ -513,7 +513,7 @@ func TestStateLock_NoPOL(t *testing.T) { // now we're going to enter prevote again, but with invalid args // and then prevote wait, which should timeout. then wait for precommit - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Prevote(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) // the proposed block should still be locked block. // we should precommit nil and be locked on the proposal. ensurePrecommit(t, voteCh, height, round) @@ -525,7 +525,7 @@ func TestStateLock_NoPOL(t *testing.T) { // (note we're entering precommit for a second time this round, but with invalid args // then we enterPrecommitWait and timeout into NewRound - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) round++ // entering new round ensureNewRound(t, newRoundCh, height, round) @@ -552,7 +552,7 @@ func TestStateLock_NoPOL(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrevoteType, config.ChainID(), newBlockID, vs2) ensurePrevote(t, voteCh, height, round) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Prevote(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) ensurePrecommit(t, voteCh, height, round) // precommit validatePrecommit(ctx, t, cs1, round, 0, vss[0], nil, initialBlockID.Hash) // precommit nil but be locked on proposal @@ -567,7 +567,7 @@ func TestStateLock_NoPOL(t *testing.T) { vs2) // NOTE: conflicting precommits at same height ensurePrecommit(t, voteCh, height, round) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) // cs1 is locked on a block at this point, so we must generate a new consensus // state to force a new proposal block to be generated. @@ -606,7 +606,7 @@ func TestStateLock_NoPOL(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrevoteType, config.ChainID(), propBlockID, vs2) ensurePrevote(t, voteCh, height, round) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Prevote(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) ensurePrecommit(t, voteCh, height, round) validatePrecommit(ctx, t, cs1, round, 0, vss[0], nil, initialBlockID.Hash) // precommit nil but locked on proposal @@ -683,7 +683,7 @@ func TestStateLock_POLUpdateLock(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) // timeout to new round. - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -789,7 +789,7 @@ func TestStateLock_POLRelock(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) // timeout to new round. - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -884,7 +884,7 @@ func TestStateLock_PrevoteNilWhenLockedAndMissProposal(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) // timeout to new round. - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -970,7 +970,7 @@ func TestStateLock_PrevoteNilWhenLockedAndDifferentProposal(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) // timeout to new round. - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -1078,7 +1078,7 @@ func TestStateLock_POLDoesNotUnlock(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), blockID, vs3) // timeout to new round - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -1112,7 +1112,7 @@ func TestStateLock_POLDoesNotUnlock(t *testing.T) { validatePrecommit(ctx, t, cs1, round, 0, vss[0], nil, blockID.Hash) signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 2: @@ -1198,7 +1198,7 @@ func TestStateLock_MissingProposalWhenPOLSeenDoesNotUpdateLock(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) // timeout to new round - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -1285,7 +1285,7 @@ func TestStateLock_DoesNotLockOnOldProposal(t *testing.T) { incrementRound(vs2, vs3, vs4) // timeout to new round - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -1356,7 +1356,7 @@ func TestStateLock_POLSafety1(t *testing.T) { // cs1 precommit nil ensurePrecommit(t, voteCh, height, round) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) incrementRound(vs2, vs3, vs4) round++ // moving to the next round @@ -1397,7 +1397,7 @@ func TestStateLock_POLSafety1(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) incrementRound(vs2, vs3, vs4) round++ // moving to the next round @@ -1409,7 +1409,7 @@ func TestStateLock_POLSafety1(t *testing.T) { */ // timeout of propose - ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) // finish prevote ensurePrevoteMatch(t, voteCh, height, round, nil) @@ -1493,7 +1493,7 @@ func TestStateLock_POLSafety2(t *testing.T) { incrementRound(vs2, vs3, vs4) // timeout of precommit wait to new round - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) round++ // moving to the next round // in round 2 we see the polkad block from round 0 @@ -1580,7 +1580,7 @@ func TestState_PrevotePOLFromPreviousRound(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) // timeout to new round. - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Round 1: @@ -1621,7 +1621,7 @@ func TestState_PrevotePOLFromPreviousRound(t *testing.T) { ensurePrecommit(t, voteCh, height, round) // timeout to new round. - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) /* Create a new proposal for D, the same block from Round 1. @@ -1714,7 +1714,7 @@ func TestProposeValidBlock(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) incrementRound(vs2, vs3, vs4) round++ // moving to the next round @@ -1722,7 +1722,7 @@ func TestProposeValidBlock(t *testing.T) { ensureNewRound(t, newRoundCh, height, round) // timeout of propose - ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) // We did not see a valid proposal within this round, so prevote nil. ensurePrevoteMatch(t, voteCh, height, round, nil) @@ -1743,7 +1743,7 @@ func TestProposeValidBlock(t *testing.T) { ensureNewRound(t, newRoundCh, height, round) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) round++ // moving to the next round @@ -1802,7 +1802,7 @@ func TestSetValidBlockOnDelayedPrevote(t *testing.T) { // vs3 send prevote nil signAddVotes(ctx, t, cs1, tmproto.PrevoteType, config.ChainID(), types.BlockID{}, vs3) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Prevote(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) ensurePrecommit(t, voteCh, height, round) // we should have precommitted @@ -1856,7 +1856,7 @@ func TestSetValidBlockOnDelayedProposal(t *testing.T) { startTestRound(ctx, cs1, cs1.Height, round) ensureNewRound(t, newRoundCh, height, round) - ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) ensurePrevoteMatch(t, voteCh, height, round, nil) @@ -1872,7 +1872,7 @@ func TestSetValidBlockOnDelayedProposal(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrevoteType, config.ChainID(), blockID, vs2, vs3, vs4) ensureNewValidBlock(t, validBlockCh, height, round) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Prevote(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) ensurePrecommit(t, voteCh, height, round) validatePrecommit(ctx, t, cs1, round, -1, vss[0], nil, nil) @@ -2036,7 +2036,7 @@ func TestWaitingTimeoutOnNilPolka(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) ensureNewRound(t, newRoundCh, height, round+1) } @@ -2074,7 +2074,7 @@ func TestWaitingTimeoutProposeOnNewRound(t *testing.T) { rs := cs1.GetRoundState() assert.True(t, rs.Step == cstypes.RoundStepPropose) // P0 does not prevote before timeoutPropose expires - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) ensurePrevoteMatch(t, voteCh, height, round, nil) } @@ -2113,7 +2113,7 @@ func TestRoundSkipOnNilPolkaFromHigherRound(t *testing.T) { ensurePrecommit(t, voteCh, height, round) validatePrecommit(ctx, t, cs1, round, -1, vss[0], nil, nil) - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) round++ // moving to the next round ensureNewRound(t, newRoundCh, height, round) @@ -2145,7 +2145,7 @@ func TestWaitTimeoutProposeOnNilPolkaForTheCurrentRound(t *testing.T) { incrementRound(vss[1:]...) signAddVotes(ctx, t, cs1, tmproto.PrevoteType, config.ChainID(), types.BlockID{}, vs2, vs3, vs4) - ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutProposeCh, height, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) ensurePrevoteMatch(t, voteCh, height, round, nil) } @@ -2260,8 +2260,8 @@ func TestStartNextHeightCorrectlyAfterTimeout(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - config.Consensus.SkipTimeoutCommit = false cs1, vss := makeState(ctx, t, makeStateArgs{config: config}) + cs1.state.ConsensusParams.Timeout.BypassCommitTimeout = false cs1.txNotifier = &fakeTxNotifier{ch: make(chan struct{})} vs2, vs3, vs4 := vss[1], vss[2], vss[3] @@ -2302,7 +2302,7 @@ func TestStartNextHeightCorrectlyAfterTimeout(t *testing.T) { signAddVotes(ctx, t, cs1, tmproto.PrecommitType, config.ChainID(), blockID, vs3) // wait till timeout occurs - ensureNewTimeout(t, precommitTimeoutCh, height, round, cs1.config.TimeoutPrecommit.Nanoseconds()) + ensureNewTimeout(t, precommitTimeoutCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) ensureNewRound(t, newRoundCh, height, round+1) @@ -2313,7 +2313,7 @@ func TestStartNextHeightCorrectlyAfterTimeout(t *testing.T) { cs1.txNotifier.(*fakeTxNotifier).Notify() - ensureNewTimeout(t, timeoutProposeCh, height+1, round, cs1.config.Propose(round).Nanoseconds()) + ensureNewTimeout(t, timeoutProposeCh, height+1, round, cs1.state.ConsensusParams.Timeout.ProposeTimeout(round).Nanoseconds()) rs = cs1.GetRoundState() assert.False( t, @@ -2326,8 +2326,8 @@ func TestResetTimeoutPrecommitUponNewHeight(t *testing.T) { ctx, cancel := context.WithCancel(context.Background()) defer cancel() - config.Consensus.SkipTimeoutCommit = false cs1, vss := makeState(ctx, t, makeStateArgs{config: config}) + cs1.state.ConsensusParams.Timeout.BypassCommitTimeout = false vs2, vs3, vs4 := vss[1], vss[2], vss[3] height, round := cs1.Height, cs1.Round @@ -2441,7 +2441,7 @@ func TestStateHalt1(t *testing.T) { incrementRound(vs2, vs3, vs4) // timeout to new round - ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.config.Precommit(round).Nanoseconds()) + ensureNewTimeout(t, timeoutWaitCh, height, round, cs1.state.ConsensusParams.Timeout.VoteTimeout(round).Nanoseconds()) round++ // moving to the next round diff --git a/internal/test/factory/params.go b/internal/test/factory/params.go new file mode 100644 index 000000000..dda8e2b3c --- /dev/null +++ b/internal/test/factory/params.go @@ -0,0 +1,22 @@ +package factory + +import ( + "time" + + "github.com/tendermint/tendermint/types" +) + +// ConsensusParams returns a default set of ConsensusParams that are suitable +// for use in testing +func ConsensusParams() *types.ConsensusParams { + c := types.DefaultConsensusParams() + c.Timeout = types.TimeoutParams{ + Commit: 10 * time.Millisecond, + Propose: 40 * time.Millisecond, + ProposeDelta: 1 * time.Millisecond, + Vote: 10 * time.Millisecond, + VoteDelta: 1 * time.Millisecond, + BypassCommitTimeout: true, + } + return c +} diff --git a/node/node_test.go b/node/node_test.go index fcd633d71..e70be984f 100644 --- a/node/node_test.go +++ b/node/node_test.go @@ -751,7 +751,7 @@ func loadStatefromGenesis(ctx context.Context, t *testing.T) sm.State { require.True(t, loadedState.IsEmpty()) valSet, _ := factory.ValidatorSet(ctx, t, 0, 10) - genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, nil) + genDoc := factory.GenesisDoc(cfg, time.Now(), valSet.Validators, factory.ConsensusParams()) state, err := loadStateFromDBOrGenesisDocProvider( stateStore, diff --git a/types/params.go b/types/params.go index 6a2920590..b8cf7f2d8 100644 --- a/types/params.go +++ b/types/params.go @@ -161,6 +161,27 @@ func DefaultTimeoutParams() TimeoutParams { } } +// ProposeTimeout returns the amount of time to wait for a proposal. +func (t TimeoutParams) ProposeTimeout(round int32) time.Duration { + return time.Duration( + t.Propose.Nanoseconds()+t.ProposeDelta.Nanoseconds()*int64(round), + ) * time.Nanosecond +} + +// VoteTimeout returns the amount of time to wait for remaining votes after receiving any +2/3 votes. +func (t TimeoutParams) VoteTimeout(round int32) time.Duration { + return time.Duration( + t.Vote.Nanoseconds()+t.VoteDelta.Nanoseconds()*int64(round), + ) * time.Nanosecond +} + +// CommitTime accepts ti, the time at which the consensus engine received +2/3 +// precommits for a block and returns the point in time at which the consensus +// engine should begin consensus on the next block. +func (t TimeoutParams) CommitTime(ti time.Time) time.Time { + return ti.Add(t.Commit) +} + func (val *ValidatorParams) IsValidPubkeyType(pubkeyType string) bool { for i := 0; i < len(val.PubKeyTypes); i++ { if val.PubKeyTypes[i] == pubkeyType {