William Banfield
e5121a3055
update comment on reconstruct method
2022-05-15 23:15:22 -04:00
William Banfield
cb0a2ec704
use simpler check in blocksync reactor
2022-05-15 23:10:32 -04:00
William Banfield
5f40251796
verify vote and extension comment
2022-05-15 22:59:26 -04:00
William Banfield
c70a6503d7
tweaks to ExtendedCommitSig method
2022-05-15 22:58:59 -04:00
William Banfield
a3ec142a84
cosmetic fixup for ensure extensions
2022-05-15 22:52:35 -04:00
William Banfield
4d33880dee
change vote extension verification method name
2022-05-15 22:43:33 -04:00
William Banfield
0784bac4df
fix nil pointer error for non-validator
2022-05-15 22:39:07 -04:00
William Banfield
c92f3d2f33
test for nil problem in e2e
2022-05-15 22:21:53 -04:00
William Banfield
2f96769c2f
flip order of error returns
2022-05-15 22:19:32 -04:00
William Banfield
b75a831cf0
fix extended commit test
2022-05-15 22:08:12 -04:00
William Banfield
2055171cca
add test for vote set
2022-05-13 17:53:12 -04:00
William Banfield
e79b471fae
lint fix
2022-05-13 17:34:58 -04:00
William Banfield
ecaf84368b
use helper methods in prepareproposal
2022-05-13 17:30:45 -04:00
William Banfield
bc00c60b28
make extensions required in reactor test
2022-05-13 17:18:50 -04:00
William Banfield
f941b33c30
fix require check
2022-05-13 17:18:37 -04:00
William Banfield
3fcf0c0140
blocksync checks for vote extensions
2022-05-13 17:10:12 -04:00
William Banfield
c0bf3307c9
use new require extensions in all places
2022-05-13 17:09:47 -04:00
William Banfield
504bffce4d
add a method for requiring extensions
2022-05-13 17:06:52 -04:00
William Banfield
b77af9b438
remove erroneous comment
2022-05-13 16:40:19 -04:00
William Banfield
1463a0e352
update comments on ensureextensions methods
2022-05-13 16:37:12 -04:00
William Banfield
badd430a04
make extended commit sig optional in type
2022-05-13 16:32:19 -04:00
William Banfield
cb22882964
move logic for ensuring vote extension well formed into basic
2022-05-13 16:18:18 -04:00
William Banfield
4a3e47decc
split ensure extension out of reactor validation
2022-05-13 15:43:40 -04:00
William Banfield
c627a1d762
Revert "rename loadblockextendedcommit -> loadextendedcommit"
...
This reverts commit 8935da8872 .
2022-05-13 15:31:23 -04:00
William Banfield
5dbb706e2c
add boolean parameter to vote set
2022-05-13 15:12:06 -04:00
William Banfield
56b5a234bf
fix state tests to not check for own extension
2022-05-13 15:11:54 -04:00
William Banfield
c3f64df354
reconstruct last commit works with legacy chains
2022-05-13 14:05:01 -04:00
William Banfield
ec46cc4006
fix buildExtendedCommitInfo logic to allow default
2022-05-13 13:49:00 -04:00
William Banfield
8935da8872
rename loadblockextendedcommit -> loadextendedcommit
2022-05-13 12:53:12 -04:00
William Banfield
ab83d3307d
validation shimmed into place for switch to consensus
2022-05-12 18:00:53 -04:00
William Banfield
636cd97712
consolidate and comment vote set tests
2022-05-12 15:52:41 -04:00
William Banfield
a8b85c1999
add internal bool param to internal vote set
2022-05-12 15:02:36 -04:00
William Banfield
eec438ac97
fix require condition to be correct
2022-05-12 14:48:23 -04:00
William Banfield
5e4575695d
test comple: still needs comment
2022-05-11 23:04:59 -04:00
William Banfield
b4da26555b
remove duplicate logging
2022-05-11 23:00:26 -04:00
William Banfield
d9820182e6
update test to ensure consensus proceeds as expected
2022-05-11 22:52:31 -04:00
William Banfield
667c53dcbc
use 3 validators for verify test
2022-05-11 22:22:32 -04:00
William Banfield
c35bcbe320
use 4 validators and only expect 3 verifiy calls
2022-05-11 22:19:46 -04:00
William Banfield
b075117d83
don't validate when constructing extendedcommitsig
2022-05-11 22:17:52 -04:00
William Banfield
3e71e81938
fix test to bypass own verify vote extension
2022-05-11 22:15:57 -04:00
William Banfield
5caea6e01e
add logging for verification failed
2022-05-11 22:15:30 -04:00
William Banfield
146c996ec7
fix typo
2022-05-11 22:01:27 -04:00
William Banfield
101d357224
wip: compiles but test fails
2022-05-11 19:27:13 -04:00
William Banfield
5aeee88443
add param to params.go
2022-05-11 16:38:46 -04:00
dependabot[bot]
b0fe38c245
build(deps): Bump github.com/creachadair/tomledit from 0.0.19 to 0.0.22 ( #8504 )
...
Bumps [github.com/creachadair/tomledit](https://github.com/creachadair/tomledit ) from 0.0.19 to 0.0.22.
<details>
<summary>Commits</summary>
<ul>
<li><a href="f7ad71d86c "><code>f7ad71d</code></a> cli: accept @ prefixed value arguments for strings</li>
<li><a href="2cb36fdb81 "><code>2cb36fd</code></a> Release v0.0.21</li>
<li><a href="f56c9925a3 "><code>f56c992</code></a> cli: move subcommands to a separate file</li>
<li><a href="0271385b7a "><code>0271385</code></a> cli: allow list arguments as prefix filters</li>
<li><a href="6e4454ec9d "><code>6e4454e</code></a> cli: add subcommand "add"</li>
<li><a href="d59f49c18b "><code>d59f49c</code></a> Add a basic command-line tool to read and set keys.</li>
<li><a href="9f9039fa9b "><code>9f9039f</code></a> Add a test for top-level comment blocking.</li>
<li>See full diff in <a href="https://github.com/creachadair/tomledit/compare/v0.0.19...v0.0.22 ">compare view</a></li>
</ul>
</details>
<br />
[](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)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
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)
</details>
2022-05-11 13:23:47 +00:00
Thane Thomson
06b1812094
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 >
2022-05-11 07:10:32 -04:00
Sergio Mena
735a1a537b
Fixed math notation in ABCI++ app requirements ( #8499 )
...
* Fixed math notation in ABCI++ app requirements
* Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
* Update spec/abci++/abci++_app_requirements_002_draft.md
Co-authored-by: Daniel <daniel.cason@usi.ch >
Co-authored-by: Daniel <daniel.cason@usi.ch >
2022-05-10 21:50:28 +02:00
William Banfield
c052181e32
consensus: add additional metrics for abci++ data ( #8480 )
...
This pull request adds an additional set of metrics targeted at providing more visibility into `abci++`.
The following set of metrics are added and exposed through the `metrics` endpoint:
```
tendermint_consensus_proposal_receive_count{chain_id="test-chain-IrF74Y",status="accepted"} 34
tendermint_consensus_proposal_create_count{chain_id="test-chain-IrF74Y"} 34
tendermint_consensus_vote_extension_receive_count{chain_id="test-chain-IrF74Y",status="accepted"} 34
tendermint_consensus_round_voting_power_percent{chain_id="test-chain-IrF74Y",vote_type="precommit"} 1
tendermint_consensus_round_voting_power_percent{chain_id="test-chain-IrF74Y",vote_type="prevote"} 1
tendermint_state_consensus_param_updates{chain_id="test-chain-IrF74Y"} 0
tendermint_state_validator_set_updates{chain_id="test-chain-IrF74Y"} 0
tendermint_consensus_late_votes{chain_id="test-chain-IrF74Y",vote_type="precommit"} 16
```
This pull request also updates the `metrics.md` file to include some metrics that were previously missed. My hope is to generate the `metrics.md` file with a future version of the tool being architected in #8479
2022-05-10 16:48:13 +00:00
Callum Waters
a4c3b5cab4
validate block before we persist it ( #8493 )
2022-05-10 17:34:53 +02:00
Callum Waters
9dae97d845
RFC 016: Node Architecture ( #8285 )
2022-05-10 15:42:22 +02:00