Sergio Mena
12f7e31610
Improved checks for vote extension signing in the unit tests ( #9895 )
...
* Added checks to vote signing. Need to refactor makevote and signaddvote
* Merged a number of similar versions of `makeVote`
* refactor `signAddVote` so `MakeVote` can reuse the checks
2022-12-20 11:53:45 +01:00
Sergio Mena
0bc5399249
Vote extensions: add proto fields for enabling extensions ( #9865 )
...
* [cherry-picked] abci++: add proto fields for enabling vote extensions (#8587 )
This pull requests adds the protocol buffer field for the `ABCI.VoteExtensionsEnableHeight` parameter. This proto field is threaded throughout all of the relevant places where consensus params are used and referenced.
This PR also adds validation of the consensus param updates. Previous consensus param changes didn't depend on _previous_ versions of the params, so this change adds a method for validating against the old params as well.
closes : #8453
* Re-sync some things with original patch
* fixes
* Remove 'Skip' from TestApp_VoteExtensions
* Fix all unit tests
* Appease linter
* Update types/params.go
Co-authored-by: Thane Thomson <connect@thanethomson.com >
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
Co-authored-by: Thane Thomson <connect@thanethomson.com >
2022-12-13 12:05:15 +01:00
Sergio Mena
03bdcad31e
Vote extensions: Add consensus param for extension activation logic ( #9862 )
...
* [cherry-picked] abci++: add consensus parameter logic to control vote extension require height (#8547 )
This PR makes vote extensions optional within Tendermint. A new ConsensusParams field, called ABCIParams.VoteExtensionsEnableHeight, has been added to toggle whether or not extensions should be enabled or disabled depending on the current height of the consensus engine. Related to: #8453
* Fix UTs
* fix blocksync reactor import of state store
* fixes1
* fixed_more_UTs
* Fix TestHandshakeReplaySome
* Fix all unit tests
* Added hunk in original commit
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com >
Co-authored-by: Callum Waters <cmwaters19@gmail.com >
2022-12-09 22:30:37 +01:00
Sergio Mena
aeec999151
Vote extension propagation (RFC017) ( #9853 )
...
* [cherry-picked] abci++: Propagate vote extensions (RFC 017) (#8433 )
* Add protos for ExtendedCommit
Cherry-pick from e73f0178b72a16ee81f8e856aadf651f2c62ec6e just the
changes to the .proto files, since we have deleted the .intermediate
files.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make proto-gen
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* BlockStore holds extended commit
Cherry-pick 8d504d4b50ec6afbdffe2df7ababbef30e15053d and fix conflicts.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Reshuffle ExtendedCommit and ExtendedCommitSig
Separate the data structures and functions from their Commit-oriented
counterparts to adhere to the current coding style.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix exit condition in blocksync
* Add note to remove TxResult proto
As Sergio pointed out in 3e31aa6f583cdc71e208ed03a82f1d804ec0de49, this
proto message can probably be removed. We should do this in a separate
PR.
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Lift termination condition into for loop
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Enforce vote extension signature requirement
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Expand on comment for PeekTwoBlocks for posterity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Isolate TODO more clearly
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make mockery
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Make panic output from BlockStore.SaveBlock more readable
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Add helper methods to ExtendedCommitSig and ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix most tests except TestHandshake*
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix store prefix collision
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix TestBlockFetchAtHeight
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove global state from store tests
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
Co-authored-by: Sergio Mena <sergio@informal.systems >
* blocksync: Just return error
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove unused/commented-out code
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Change pool AddBlock function signature to return errors
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Improve legibility of switch statements
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Expand on extended commit requirement in AddBlock description
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Return error without also logging it
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* consensus: Rename short-lived local variable
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* consensus: Allocate TODO to Sergio
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* evidence/pool_test: Inline slice construction
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Rename LoadBlockExtCommit to LoadBlockExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* proto: Remove TODO on TxResult
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Minor format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Reformat ExtendedCommitSig.BlockID
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove NewExtendedCommit constructor
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove NewCommit constructor
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Shorten receiver names for ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Convert ExtendedCommit.Copy to a deep clone
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Assign TODO to Sergio
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Fix legibility nits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Improve legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* store/state: Add TODO to move prefixes to common package
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Propagate validator info to PrepareProposal
In order to propagate validator voting power through to PrepareProposal,
we need to load the validator set info from the height corresponding to
the extended commit that we're passing through to PrepareProposal as the
"LocalLastCommit".
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename local var for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix TestMaxProposalBlockSize
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename local var for clarity
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove debug log
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove CommigSig.ForBlock helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove CommigSig.Absent helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove ExtendedCommitSig.ForBlock helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove ExtendedCommitSig.Absent helper
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* There are no extended commits below the initial height
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix comment grammar
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove JSON encoding from ExtendedCommit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Embed CommitSig into ExtendedCommitSig instead of duplicating fields
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Rename ExtendedCommit vote_extension field to extension for consistency with domain types
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* blocksync: Panic if we peek a block without an extended commit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* Remove Sergio from TODO
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Increase hard-coded vote extension max size to 1MB
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Remove unnecessary comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* state: Ensure no of commit sigs equals validator set length
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Minor legibility improvements
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Improve legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Remove unused GetVotes function on VoteSet
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor TestMaxProposalBlockSize to construct more realistic extended commit
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor buildExtendedCommitInfo to resemble buildLastCommitInfo
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Apply suggestions from code review
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* abci++: Disable VerifyVoteExtension call on nil precommits (#8491 )
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* types: Require vote extensions on non-nil precommits and not otherwise
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Disable lint
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Increase timeout for TestReactorVotingPowerChange to counter flakiness
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Only sign and verify vote extensions in non-nil precommits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Revert "Disable lint"
This reverts commit 6fffbf9402 .
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Add missing non-nil check uncovered non-deterministically in TestHandshakeReplayAll
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Expand error message for accuracy
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Only call ExtendVote when we make non-nil precommits
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Revert "Increase timeout for TestReactorVotingPowerChange to counter flakiness"
This reverts commit af514939db .
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Refactor ValidateBasic for ExtendedCommitSig for legibility
Signed-off-by: Thane Thomson <connect@thanethomson.com >
Co-authored-by: Sergio Mena <sergio@informal.systems >
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
* make proto-gen
* cp-fix
* monkey-see-monkey-do-fixes
* Fix tests (build)
* Fix forgotten tests
* fix_ut
* Fix units tests
* Fixed TestReactorInvalidPrecommit
* Fix TestFinalizeBlockCalled
* Fix all UTs
* Add missing comment
Co-authored-by: Thane Thomson <connect@thanethomson.com >
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
2022-12-09 00:25:44 +01:00
Sergio Mena
70813a80cf
Merge branch 'main' into feature/abci++vef
2022-11-30 21:15:03 +01:00
William Banfield
21b2801c60
e2e: test runner generates loadtime formatted transactions. ( #9779 )
2022-11-30 13:36:19 -05:00
Callum Waters
c5c2aafad2
abci: implement finalize block ( #9468 )
...
Adds the `FinalizeBlock` method which replaces `BeginBlock`, `DeliverTx`, and `EndBlock` in a single call.
2022-11-28 23:12:28 +01:00
Callum Waters
a7c6233d66
Merge branch 'main' into feature/abci++vef
2022-11-14 10:00:18 +01:00
Callum Waters
f8e453a245
e2e: add contexts and e2e generator tests ( #9426 )
2022-11-10 12:29:59 +01:00
Thane Thomson
45071d1f23
abci: Add unsynchronized local client ( #9660 )
...
* Remove extra interface cast
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove irrelevant comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* abci: Add unsynchronized local client
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* proxy: Add unsync local client creator
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* e2e: Add sync app for use with unsync local client
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* abci: Elaborate on mutex param in unsync local client
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* proxy: Remove unnecessary comment
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* abcicli: Remove unnecessary mutex param from unsync client
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* ci/e2e: Explicitly use sync app for validator04
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* e2e: Ensure app is definitely the E2E app
Signed-off-by: Thane Thomson <connect@thanethomson.com >
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-11-07 06:46:55 -05:00
William Banfield
f6709208b0
e2e: configurable IP addresses for e2e testnet generator ( #9592 )
...
* add the infrastructure types
* add infra data to testnetload
* extract infrastructure generation from manifest creation
* add infrastructure type and data flags
* rename docker ifd constructor
* implement read ifd from file
* add 'provider' field to the infrastructure data file to disable ip range check
* return error from infrastructure from data file function
* remove ifd from Setup
* implement a basic infra provider with a simple setup command
* remove misbehavior remnants
* use manifest instead of file in all places
* include cidr block range in the infrastructure data
* nolint gosec
* gosec
* lint
2022-10-25 10:19:10 -04:00
Thane Thomson
cceea4de22
chore: Format and fix lints ( #9336 )
...
* make format
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Fix linting directives
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* make mockery
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Appease CI linter
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Appease CI linter
Signed-off-by: Thane Thomson <connect@thanethomson.com >
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-08-30 12:28:46 -04:00
Sergio Mena
50b5c23d88
Merge branch 'feature/abci++ppp'
2022-08-22 17:16:17 +02:00
Callum Waters
b37f062619
e2e: add evidence tests ( #9292 )
2022-08-22 13:33:47 +02:00
Callum Waters
2d8df1bd4e
proto: deduplicate consensus params ( #9287 )
2022-08-22 10:50:21 +02:00
Callum Waters
0ca3a89c90
e2e: add abci delays ( #9254 )
2022-08-19 12:00:58 +02:00
William Banfield
1069ffc6aa
config: backport the rename of fastsync to blocksync ( #9259 )
...
This is largely a cherry pick of #6755 with some additional fixups added where detected.
This change moves the blockchain package to a package called blocksync. Additionally, it renames the relevant uses of the term `fastsync` to `blocksync`.
closes : #9227
#### PR checklist
- [ ] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
documentation updates needed
2022-08-17 15:19:20 +00:00
Jacob Gadikian
a6dde14ec4
do not use ioutil ( #9206 )
2022-08-10 14:35:14 -04:00
Callum Waters
4206a0e9b7
remove v1 and v2 blocksync protocol impementations ( #9146 )
2022-08-02 11:30:28 +02:00
Callum Waters
07d242c461
e2e: remove maverick ( #9148 )
2022-08-01 17:15:03 +02:00
Aleksandr Bezobchuk
6b7d30cf37
feat: v0.34.x Prioritized Mempool ( #8695 )
...
* Updated mocks
* add reactor tests
* add v1 reactor tests
* Fix fuzz test for priority mempool
* e2e adapted to mempool v1; prio pool is default now
* Reverted default mempool to be fifo
* Changed buf version
* Added priority mempool to ci testnet
* Fixed linter
* Updated makefile
* Aligned makefile changes to v0.34.x
* Added go install for proto
* Add log message to warn about prioritized mempool bug
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Changelog message
Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com >
Co-authored-by: Callum Waters <cmwaters19@gmail.com >
Co-authored-by: Sam Kleinman <garen@tychoish.com >
Co-authored-by: Thane Thomson <connect@thanethomson.com >
2022-06-27 11:34:28 +02:00
Joe Abbey
4a1df4911d
fix: "Lazy" Stringers to defer Sprintf and Hash until logs print ( #8845 )
2022-06-23 14:56:34 -04:00
mergify[bot]
db60bbad54
statesync: assert app version matches (backport #7856 ) ( #7885 )
2022-02-23 12:17:12 +01:00
mergify[bot]
4023580a25
e2e: cleanup node start function ( #6842 ) ( #6848 )
...
I realized after my last commit that my change made a following line of code a bit redundant.
(alternatively my last change was redunadnt to the existing code.)
I took this oppertunity to make some minor cleanups and logging changes to the node changes which I hope will make tests a bit more clear.
(cherry picked from commit a374f74f7c )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2021-08-20 16:12:13 -04:00
mergify[bot]
2db1e422d8
e2e: avoid starting nodes from the future ( #6835 ) ( #6838 )
...
(cherry picked from commit a4cc8317da )
Co-authored-by: Sam Kleinman <garen@tychoish.com >
2021-08-18 14:42:27 -04:00
Callum Waters
d515bbcf1d
statesync: increase chunk priority and robustness ( #6582 )
2021-06-18 09:59:52 +02:00
Callum Waters
b878326396
e2e: relax timeouts ( #6356 )
...
* remove duplicate light error
* quieten handling of txs that already exist in the mempool
* notch back e2e timeouts
2021-04-14 19:53:54 +02:00
mergify[bot]
693e11c6c6
e2e: tx load to use broadcast sync instead of commit (backport #6347 ) ( #6352 )
2021-04-14 10:09:49 +02:00
mergify[bot]
b2f01448be
e2e: integrate light clients (bp #6196 )
...
integrate light clients (#6196 )
fix e2e app test (#6223 )
fix light client generator (#6236 )
2021-03-18 13:02:05 +01:00
mergify[bot]
8bb85856d0
e2e: add benchmarking functionality (bp #6210 ) ( #6216 )
2021-03-05 15:30:18 +01:00
mergify[bot]
1b5697a41d
mempool/rpc: log grooming (bp #6201 ) ( #6203 )
2021-03-04 09:04:13 -05:00
Anton Kaliaev
33fb03fcc8
test/e2e: enable pprof server to help debugging failures ( #6003 )
2021-02-11 11:43:19 +01:00
Marko
26493bbbd8
test/e2e: fix secp failures ( #5649 )
2020-11-18 15:21:52 +01:00
Erik Grinaker
59f3f63d33
test: fix various E2E test issues ( #5576 )
...
* Don't use state sync for nodes starting at initial height.
* Also remove stopped containers when cleaning up.
* Start nodes in order of startAt, mode, name to avoid full nodes starting before their seeds.
* Tweak network waiting to avoid halts caused by validator changes and perturbations.
* Disable most tests for seed nodes, which aren't always able to join consensus.
* Disable `blockchain/v2` due to known bugs.
2020-11-05 11:26:30 +01:00
Erik Grinaker
ceea64ec28
test: fix handling of start height in generated E2E testnets ( #5563 )
...
In #5488 the E2E testnet generator changed to setting explicit `StartAt` heights for initial nodes. This broke the runner, which expected all initial nodes to have `StartAt: 0`, as well as validator set scheduling in the generator. Testnet loading now normalizes initial nodes to have `StartAt: 0`.
This also tweaks waiting for misbehavior heights to only use an additional wait if there actually is any misbehavior in the testnet, and to output information when waiting.
2020-10-26 20:56:47 +01:00
Callum Waters
dacbfbe1fe
test: add evidence e2e tests ( #5488 )
2020-10-23 16:04:23 +02:00
Erik Grinaker
75879ab1d7
test: tag E2E Docker resources and autoremove them ( #5558 )
...
Fixes #5555 .
2020-10-23 16:04:23 +02:00
Erik Grinaker
6473f0178c
test: tweak E2E tests for nightly runs ( #5512 )
2020-10-22 13:36:08 +02:00
Erik Grinaker
4e2e487c7a
test: clean up E2E test volumes using a container ( #5509 )
2020-10-22 13:36:08 +02:00
Erik Grinaker
5e6e6315ad
github: add nightly E2E testnet action ( #5480 )
2020-10-22 13:36:08 +02:00
Erik Grinaker
f9bfb40d53
test/e2e: add random testnet generator ( #5479 )
...
Closes #5291 . Adds a randomized testnet generator. Nightly CI job will be submitted separately. A few of the testnets can be a bit flaky, even after disabling known-faulty behavior and making minor tweaks, and the larger networks may be too resource-intensive to run in CI - this will be optimized separately.
2020-10-22 13:36:08 +02:00
Erik Grinaker
3a4a6ae9ac
test: add E2E test for node peering ( #5465 )
...
This was a missing test case from the old P2P tests removed in #5453 , which makes sure that all nodes are able to peer with each other regardless of how they discover peers.
Fixes #2795 , since the default CI testnet uses a combination of (partially meshed) persistent peers and PEX-based seed nodes.
2020-10-22 13:36:08 +02:00
Erik Grinaker
4b3565fcaa
test: add GitHub action for end-to-end tests ( #5452 )
...
Partial fix for #5291 .
2020-10-22 13:36:08 +02:00
Erik Grinaker
a58454e788
test: add end-to-end testing framework ( #5435 )
...
Partial fix for #5291 . For details, see [README.md](https://github.com/tendermint/tendermint/blob/erik/e2e-tests/test/e2e/README.md ) and [RFC-001](https://github.com/tendermint/tendermint/blob/master/docs/rfc/rfc-001-end-to-end-testing.md ).
This only includes a single test case under `test/e2e/tests/`, as a proof of concept - additional test cases will be submitted separately. A randomized testnet generator will also be submitted separately, there a currently just a handful of static testnets under `test/e2e/networks/`. This will eventually replace the current P2P tests and run in CI.
2020-10-22 13:36:08 +02:00