Commit Graph

10279 Commits

Author SHA1 Message Date
William Banfield
8355d827e0 fix abci json name 2022-05-20 17:24:41 -04:00
William Banfield
02608f664e skip extensions until param exists 2022-05-20 17:23:00 -04:00
William Banfield
8b03ce3b0a Merge branch 'master' into wb/add-consensus-param-internal 2022-05-20 16:21:49 -04:00
William Banfield
f2d4beb862 start using vote extensions after initial height 2022-05-20 15:40:02 -04:00
William Banfield
0808043fdd if/else fiddling 2022-05-20 15:35:40 -04:00
William Banfield
7021acc6c5 fix lint 2022-05-20 15:35:28 -04:00
William Banfield
d33d8fbc82 fix evidence e2e test 2022-05-20 15:18:35 -04:00
William Banfield
af2d148f3a factor out make block function 2022-05-20 12:43:30 -04:00
William Banfield
c30e4add10 factor out makeReactor helper in blocksync tests 2022-05-20 12:02:48 -04:00
William Banfield
17aabc2d03 add reactor helper in test 2022-05-20 11:54:16 -04:00
William Banfield
a53d7a3f0c fix additional nil pointer 2022-05-20 11:37:04 -04:00
William Banfield
01ca403e0e use first.Height to avoid nil panic 2022-05-20 11:26:05 -04:00
William Banfield
bf05d09428 basic logic to make extneded commit optional 2022-05-20 11:14:58 -04:00
William Banfield
00a1e9c5b5 use second block commit instead of ext commit in persistence logic 2022-05-20 10:44:35 -04:00
William Banfield
06e70e4d7d update conditional logic in blocksync reactor for extCommit peek 2022-05-20 10:35:55 -04:00
William Banfield
4be4e96ceb use empty extended commit when not enabled 2022-05-20 10:23:25 -04:00
William Banfield
6889f77807 fix additional use of extended commit 2022-05-19 21:55:51 -04:00
William Banfield
d69cf82e3f delete redundant test 2022-05-19 21:37:28 -04:00
William Banfield
551d493c42 do not save seen commit as canonical 2022-05-19 21:37:28 -04:00
William Banfield
fd2a7df517 basic unit tests for saving blocks with extended comit 2022-05-19 19:30:44 -04:00
M. J. Fromberger
4786a5ffde Remove the periodically-scheduled Markdown link check. (#8580)
The state of links in our documentation is now sufficiently good that we are
running link checks during PRs. There is no longer any practical benefit to
running the scheduled "global" check. Most of the errors it reports are rate
limitations anyway (429).
2022-05-19 15:23:14 -07:00
William Banfield
1744ed2741 Merge branch 'master' into wb/add-consensus-param-internal 2022-05-19 17:55:34 -04:00
William Banfield
8233d5e176 fix lint 2022-05-19 17:29:48 -04:00
William Banfield
ad73e6da2f consensus: update state from store before use in reactor (#8576)
Closes: #8575

This PR aims to fix the `LastCommitRound can only be negative for initial height 0` issue we see in the e2e tests by initializing the `state` object before starting the receive routines in the consensus reactor. This is somewhat inelegant, but it should fix the issue.
2022-05-19 19:35:30 +00:00
William Banfield
a437ebd6f3 Merge branch 'master' into wb/add-consensus-param-internal 2022-05-19 15:24:02 -04:00
M. J. Fromberger
4a9bbe047f Fix lock sequencing in socket client request tracking. (#8581)
* Fix lock sequencing in socket client request tracking.

It is not safe to check base service state (IsRunning) while holding the lock
for the client state. If we do, then during shutdown we may deadlock with the
invocation of the OnStop handler, which the base service executes while holding
the service lock.

* Enqueue pending requests before sending them to the server.

If we don't do this, the server can reply before the request lands in the
queue.  That will cause the receiver to terminate early for an unsolicited
response. So enqueue first: This is safe because we're doing it in the same
routine as services the channel, so we won't take another message till we are
safely past that point.

* Document what we did.
* Fix socket paths in tests.
2022-05-19 12:11:57 -07:00
William Banfield
8953a65664 Merge branch 'master' into wb/add-consensus-param-internal 2022-05-19 13:44:45 -04:00
William Banfield
fa8f2ee0aa improve log statements 2022-05-19 13:43:26 -04:00
William Banfield
8d9b227566 fix consensus reactor tests for absent extension data 2022-05-19 13:43:14 -04:00
William Banfield
8c26a452b7 add test for panic on save with no extensions 2022-05-19 13:42:07 -04:00
William Banfield
8a37e2584d fix test by adding extension data 2022-05-19 13:31:49 -04:00
William Banfield
e2989f9442 remove print statement 2022-05-19 13:31:35 -04:00
William Banfield
65c4150c3d fix evidence test by adding extension sig 2022-05-19 13:30:11 -04:00
William Banfield
5031c82150 log on stripped extensions 2022-05-19 12:53:17 -04:00
William Banfield
be9b4a7fc0 use errorf instead of sprintf in panic 2022-05-19 12:43:19 -04:00
William Banfield
4e05b5f108 ensure extensions on extended commit save 2022-05-19 12:31:50 -04:00
Sam Kleinman
b4bf74ba9c abci: serialize semantics of abci client (#8578)
Prior to this change, it was possible that two client calls could enqueue their
requests in the response queue in a different order than they were processed
by the sender goroutine. This violates the requirement that responses must be
delivered in the same order they were enqueued.

To avert this, make the sender goroutine responsible for enqueuing.

Also, remove an unnecessary channel buffer.
2022-05-19 09:16:34 -07:00
William Banfield
05d930f40a Update internal/blocksync/reactor.go
Co-authored-by: Sergio Mena <sergio@informal.systems>
2022-05-19 10:07:46 -04:00
Sergio Mena
850ae93a90 Adapted client-server.md from ABCI directory (#8510)
* Copied over 'client server' section from ABCI spec

* Adapted the ABCI text in 'Client and Server' section

* Minor changes to README

* Removed TODO from Readme

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Update spec/abci++/abci++_client_server_002_draft.md

Co-authored-by: Daniel <daniel.cason@usi.ch>

* Addressed comments

* Moved GRPC link out of the Tendermint-specific occurrence

* Fixed merge

Co-authored-by: Daniel <daniel.cason@usi.ch>
2022-05-19 10:35:36 +02:00
Sergio Mena
2e20b820ab Adapted apps.md from ABCI directory (#8506)
* Copied over the 'Apps' section from ABCI. Need to adapt it

* Adapted the ABCI text in requirements section

* 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>

* 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>

* 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>

* 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>

* 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>

* 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>

* 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>

* 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: M. J. Fromberger <fromberger@interchain.io>

* Adressed @cason's comments

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Update spec/abci++/abci++_app_requirements_002_draft.md

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* Addressed remaining comments

* Addressed some of @cmwaters comments

* Addressed more comments

* Addressed @JayT106's comments

Co-authored-by: Daniel <daniel.cason@usi.ch>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-05-19 08:53:28 +02:00
William Banfield
10078f39d6 add nil check for block load 2022-05-18 16:53:55 -04:00
William Banfield
4194d4da46 comment proposal extensions validation 2022-05-18 14:46:00 -04:00
William Banfield
f50ac0e8ea add state check on peer response 2022-05-18 14:37:03 -04:00
William Banfield
4da32ea146 update and document new logic for bailing out of blocksync 2022-05-18 14:07:39 -04:00
William Banfield
dd98caa5f7 Update types/vote_set.go
Co-authored-by: Sergio Mena <sergio@informal.systems>
2022-05-18 13:29:28 -04:00
William Banfield
beb6c47e29 lint fix 2022-05-17 23:10:25 -04:00
William Banfield
cbd211a173 fix broken block store test 2022-05-17 22:37:04 -04:00
William Banfield
0c4a49600b remove unused store code 2022-05-17 22:36:13 -04:00
William Banfield
98f614a614 use current block height as parameter in blocksync 2022-05-17 21:49:58 -04:00
William Banfield
6f577fa389 try commit and extcommit in blocksync response 2022-05-17 21:38:44 -04:00