Thane Thomson
d53d11d8be
Improve legibility
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-09 19:15:23 -04:00
Thane Thomson
7b1f36d4a2
make format
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-09 19:15:22 -04:00
Thane Thomson
ecb523cb17
state: Ensure no of commit sigs equals validator set length
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-09 19:15:22 -04:00
Thane Thomson
d688cf0e47
state: Remove unnecessary comment
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-09 19:15:21 -04:00
Thane Thomson
db91461030
Merge branch 'master' into thane/8272-propagate-vote-extensions
2022-05-09 19:15:09 -04:00
William Banfield
4b36feaa2b
scripts/metricsgen: add the initial version of metricsgen ( #8479 )
...
This pull requests adds a new tool, metricsgen, for generating Tendermint metrics constructors from `Metrics` struct definitions. This tool aims to reduce the amount of boilerplate required to add additional metrics to Tendermint.
Its working is fairly simple, it parses the go ast, extracts field information, and uses this field information to execute a go template.
This pull request also adds a proof-of-concept of the tool's output and working by using it to generate the [indexer metrics](https://github.com/tendermint/tendermint/pull/8479/files#diff-4b0c597b6fa05332a2f9a8e0ce079e360602942fae99dc5485f1edfe71c0a29e ) using `//go:generate` directives and a simple `make` target.
The next steps for this tool are documented in https://github.com/tendermint/tendermint/issues/8485 and https://github.com/tendermint/tendermint/issues/8486 , which detail using the tool to generate the `metrics.md` documentation file and using the tool to migrate away from `go-kit`.
2022-05-09 22:52:10 +00:00
Thane Thomson
b1896ebca6
Apply suggestions from code review
...
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
2022-05-09 06:32:53 -04:00
Thane Thomson
9483b42f0b
blocksync: Panic if we peek a block without an extended commit
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 13:08:40 -04:00
Thane Thomson
6389f2ff0c
Embed CommitSig into ExtendedCommitSig instead of duplicating fields
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 12:30:42 -04:00
Thane Thomson
739e60e309
Fix comment grammar
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 10:40:07 -04:00
Thane Thomson
521734934d
There are no extended commits below the initial height
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 10:35:14 -04:00
Thane Thomson
08bf156462
Remove CommigSig.Absent helper
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 10:13:57 -04:00
Thane Thomson
accba4774d
Remove CommigSig.ForBlock helper
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 10:11:01 -04:00
Thane Thomson
630ec2591d
Remove debug log
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 09:59:45 -04:00
Thane Thomson
0dd7ce3aa4
Rename local var for clarity
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 09:44:06 -04:00
Thane Thomson
408cc4c5b5
Rename local var for clarity
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-07 09:44:05 -04:00
Thane Thomson
a20a485dbe
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 >
2022-05-07 09:44:05 -04:00
Thane Thomson
6a69e88b48
store/state: Add TODO to move prefixes to common package
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-05 08:34:01 -04:00
Thane Thomson
0a31afe4c6
types: Convert ExtendedCommit.Copy to a deep clone
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 17:38:34 -04:00
Thane Thomson
59434d8513
types: Remove NewCommit constructor
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 17:33:31 -04:00
Thane Thomson
b5a94bba16
types: Remove NewExtendedCommit constructor
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 17:18:41 -04:00
Thane Thomson
9fcab6000a
state: Rename LoadBlockExtCommit to LoadBlockExtendedCommit
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 14:05:01 -04:00
Thane Thomson
0e8fc8e0b0
evidence/pool_test: Inline slice construction
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 13:59:25 -04:00
Thane Thomson
1667ed25ea
consensus: Allocate TODO to Sergio
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 13:58:20 -04:00
Thane Thomson
fce052d710
consensus: Rename short-lived local variable
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 13:50:07 -04:00
Thane Thomson
86f942ac0f
blocksync: Return error without also logging it
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 13:46:22 -04:00
Thane Thomson
a8adf63287
blocksync: Expand on extended commit requirement in AddBlock description
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 13:45:08 -04:00
Thane Thomson
dd5c23de7d
blocksync: Change pool AddBlock function signature to return errors
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 11:36:03 -04:00
Thane Thomson
421a12bfce
make format
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 10:30:05 -04:00
Thane Thomson
1378900e86
blocksync: Just return error
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-04 10:29:54 -04:00
Thane Thomson
51f87b6074
Apply suggestions from code review
...
Co-authored-by: M. J. Fromberger <fromberger@interchain.io >
Co-authored-by: Sergio Mena <sergio@informal.systems >
2022-05-04 08:31:27 -04:00
Thane Thomson
6396abd49f
Remove global state from store tests
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-03 17:26:18 -04:00
Thane Thomson
e503d746a8
Fix TestBlockFetchAtHeight
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-03 16:54:08 -04:00
Thane Thomson
ce70167add
Fix store prefix collision
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-03 11:52:48 -04:00
Thane Thomson
656d2d01be
Fix most tests except TestHandshake*
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-03 10:59:37 -04:00
Thane Thomson
5c81f7a568
Make panic output from BlockStore.SaveBlock more readable
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-03 10:50:39 -04:00
Thane Thomson
583d5fc3ce
make mockery
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-05-03 07:39:15 -04:00
Thane Thomson
61d5837ba2
Merge branch 'master' into thane/8272-propagate-vote-extensions
2022-05-03 07:38:53 -04:00
Sam Kleinman
37287ead94
p2p: remove message type from channel implementation ( #8452 )
2022-05-02 10:52:57 -04:00
Thane Thomson
91d076a6cc
Merge changes from master and resolve conflicts
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-04-30 14:37:13 -04:00
Thane Thomson
e7451a43e7
blocksync: Honor contexts supplied to BlockPool ( #8447 )
...
* Lift condition into for loop
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Honor contexts in BlockPool
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Only stop timers when necessary
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Optimize timers
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Simplify request interval definition
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Remove extraneous timer stop
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Convert switch into if
Signed-off-by: Thane Thomson <connect@thanethomson.com >
* Eliminate timers
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-04-30 14:34:59 -04:00
Thane Thomson
fba6848f6c
Isolate TODO more clearly
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-04-29 17:51:01 -04:00
Thane Thomson
dc6a208f1d
Expand on comment for PeekTwoBlocks for posterity
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-04-29 17:49:35 -04:00
Sam Kleinman
cf2a00b398
p2p: avoid using p2p.Channel internals ( #8444 )
2022-04-29 17:21:36 -04:00
Thane Thomson
82dd779e93
Lift termination condition into for loop
...
Signed-off-by: Thane Thomson <connect@thanethomson.com >
2022-04-29 14:43:49 -04:00
Thane Thomson
bb4a1c7645
Merge branch 'master' into thane/8272-propagate-vote-extensions
2022-04-29 14:43:42 -04:00
Sam Kleinman
eee19e42db
consensus: reduce size of validator set changes test ( #8442 )
2022-04-29 10:29:26 -04:00
Thane Thomson
49a6b2f88f
Merge branch 'master' into thane/8272-propagate-vote-extensions
2022-04-29 08:08:14 -04:00
Sam Kleinman
3d448e1ef8
crypto: cleanup tmhash package ( #8434 )
2022-04-28 22:21:43 -04:00
Sergio Mena
9cd356db8d
Fix exit condition in blocksync
2022-04-28 17:54:52 -04:00