Commit Graph

69 Commits

Author SHA1 Message Date
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 656d2d01be Fix most tests except TestHandshake*
Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-05-03 10:59:37 -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
Sergio Mena 9cd356db8d Fix exit condition in blocksync 2022-04-28 17:54:52 -04:00
Sergio Mena f18f1cb3db BlockStore holds extended commit
Cherry-pick 8d504d4b50ec6afbdffe2df7ababbef30e15053d and fix conflicts.

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-04-28 17:12:20 -04:00
Sam Kleinman efd4f4a40b cleanup: unused parameters (#8372) 2022-04-18 16:45:21 -04:00
Sam Kleinman c372390fea eventbus: publish without contexts (#8369) 2022-04-18 16:28:31 -04:00
Sam Kleinman 9d20e06900 statesync+blocksync: move event publications into the sync operations (#8274) 2022-04-07 16:23:36 -04:00
Sam Kleinman 9d1e8eaad4 node: remove channel and peer update initialization from construction (#8238) 2022-04-05 13:26:53 +00:00
Sam Kleinman 97f7021712 statesync: merge channel processing (#8240) 2022-04-04 12:31:15 -04:00
Sam Kleinman 6af23ff757 state: avoid premature genericism (#8224) 2022-03-31 13:10:09 +00:00
William Banfield e4ae922c33 consensus: update state machine to use the new consensus params (#8181) 2022-03-23 11:26:42 -04:00
Sam Kleinman 0bded371c5 testing: logger cleanup (#8153)
This contains two major changes:

- Remove the legacy test logging method, and just explicitly call the
  noop logger. This is just to make the test logging behavior more
  coherent and clear. 
  
- Move the logging in the light package from the testing.T logger to
  the noop logger. It's really the case that we very rarely need/want
  to consider test logs unless we're doing reproductions and running a
  narrow set of tests.
  
In most cases, I (for one) prefer to run in verbose mode so I can
watch progress of tests, but I basically never need to consider
logs. If I do want to see logs, then I can edit in the testing.T
logger locally (which is what you have to do today, anyway.)
2022-03-18 17:39:38 +00:00
Sam Kleinman 13f7501950 blocksync: remove intermediate channel (#8140)
Based on local testing, I'm now convinced that this is ok, and also I think the fact that the new p2p layer has more caching and queue.
2022-03-17 22:20:59 +00:00
Sam Kleinman 07b46d5a05 blocksync: drop redundant shutdown mechanisms (#8136) 2022-03-17 13:30:13 -04:00
William Banfield 68c624f5de abci++: synchronize PrepareProposal with the newest version of the spec (#8094)
This change implements the logic for the PrepareProposal ABCI++ method call. The main logic for creating and issuing the PrepareProposal request lives in execution.go and is tested in a set of new tests in execution_test.go. This change also updates the mempool mock to use a mockery generated version and removes much of the plumbing for the no longer used ABCIResponses.
2022-03-15 15:37:30 -04:00
JayT106 d9c9675e2a p2p+flowrate: rate control refactor (#7828)
Adding `CurrentTransferRate ` in the flowrate package because only the status of the transfer rate has been used.
2022-03-10 13:48:23 +00:00
Sam Kleinman c35d6d6e2c node: pass eventbus at construction time (#8084)
* node: pass eventbus at construction time

* remove cruft
2022-03-08 13:04:59 +00:00
Sam Kleinman 8df7b6103f proxy: collapse triforcated abci.Client (#8067) 2022-03-06 18:25:50 -05:00
Sam Kleinman 0167f0d527 node: nodes should fetch state on startup (#8062) 2022-03-04 12:23:57 -05:00
Sam Kleinman be83ec6664 p2p: pass start time to flowrate and cleanup constructors (#7838)
After poking around #7828, I saw the oppertunity for this cleanup,
which I think is both reasonable on its own, and quite low impact, and
removes the math around process start time.
2022-02-18 13:30:19 +00:00
Sam Kleinman d187962ec0 blocksync: shutdown cleanup (#7840)
Now that shutdown is handled by contexts in most cases, I think it's
fair to cleanup the way this reactor shuts down. Additionaly there
were a few cases where the `blockSyncOutBridgeCh` was misshandled and
could have lead to a deadlock which I observed in some tests
2022-02-17 20:42:11 +00:00
Sam Kleinman 28d34d635c service: change stop interface (#7816) 2022-02-17 11:23:32 -05:00
M. J. Fromberger 7e09c2ef43 Clean up temp files more thoroughly after testing. (#7815)
Our test cases spew a lot of files and directories around $TMPDIR.  Make more
thorough use of the testing package's TempDir methods to ensure these are
cleaned up.

In a few cases, this required plumbing test contexts through existing helper
code. In a couple places an explicit path was required, to work around cases
where we do global setup during a TestMain function. Those cases probably
deserve more thorough cleansing (preferably with fire), but for now I have just
worked around it to keep focused on the cleanup.
2022-02-14 06:32:07 -08:00
Sam Kleinman 824960c565 libs/service: regularize Stop semantics and concurrency primitives (#7809) 2022-02-14 08:28:29 -05:00
William Banfield 0aa3b0b6fc Proposer-Based Timestamps Merge (#7605)
This pull request merges in the changes for implementing Proposer-based timestamps into `master`. The power was primarily being done in the `wb/proposer-based-timestamps` branch, with changes being merged into that branch during development. This pull request represents an amalgamation of the changes made into that development branch. All of the changes that were placed into that branch have been cleanly rebased on top of the latest `master`. The changes compile and the tests pass insofar as our tests in general pass.

### Note To Reviewers
 These changes have been extensively reviewed during development. There is not much new here. In the interest of making effective use of time, I would recommend against trying to perform a complete audit of the changes presented and instead examine for mistakes that may have occurred during the process of rebasing the changes. I gave the complete change set a first pass for any issues, but additional eyes would be very appreciated. 

In sum, this change set does the following:
closes #6942 
merges in #6849
2022-01-26 16:00:23 +00:00
Sam Kleinman e07c4cdcf2 node: collapse initialization internals (#7567) 2022-01-12 15:32:22 -05:00
Sam Kleinman 5bf1bdcfb4 reactors: skip log on some routine cancels (#7556) 2022-01-11 12:56:52 -05:00
Sam Kleinman d5c39f907d test/factory: pass testing.T around rather than errors for test fixtures (#7518) 2022-01-07 15:51:39 -05:00
Sam Kleinman aa76a367e0 blocksync: standardize construction process (#7531) 2022-01-07 13:40:08 -05:00
Sam Kleinman 332163ede6 testing: remove background contexts (#7509) 2022-01-05 12:42:57 -05:00
Sam Kleinman 3c8955e4b8 errors: formating cleanup (#7507) 2022-01-04 16:11:28 -05:00
Sam Kleinman 430817d9e9 types: remove panic from block methods (#7501) 2022-01-03 16:14:26 -05:00
M. J. Fromberger ab7da86b06 Internalize libs/sync. (#7450)
Inline the one usage of this library, and remove the lib.
2021-12-14 15:14:30 -08:00
Sam Kleinman 2ff962a63a log: dissallow nil loggers (#7445) 2021-12-14 12:45:13 -05:00
Sam Kleinman d0e03f01fc sync: remove special mutexes (#7438) 2021-12-13 13:35:32 -05:00
Sam Kleinman 65c0aaee5e p2p: use recieve for channel iteration (#7425) 2021-12-13 11:04:44 -05:00
Sam Kleinman bd6dc3ca88 p2p: refactor channel Send/out (#7414) 2021-12-09 14:03:41 -05:00
Sam Kleinman cb88bd3941 p2p: migrate to use new interface for channel errors (#7403)
* p2p: migrate to use new interface for channel errors

* Update internal/p2p/p2ptest/require.go

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>

* rename

* feedback

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
2021-12-08 14:05:01 +00:00
Sam Kleinman 892f5d9524 service: cleanup mempool and peer update shutdown (#7401) 2021-12-08 08:44:32 -05:00
Sam Kleinman 0ff3d4b89d service: cleanup close channel in reactors (#7399) 2021-12-07 11:40:59 -05:00
Sam Kleinman a62ac27047 service: remove exported logger from base implemenation (#7381) 2021-12-06 10:16:42 -05:00
Sam Kleinman 8a991e288c service: plumb contexts to all (most) threads (#7363)
This continues the push of plumbing contexts through tendermint. I
attempted to find all goroutines in the production code (non-test) and
made sure that these threads would exit when their contexts were
canceled, and I believe this PR does that.
2021-12-02 21:38:38 +00:00
Sam Kleinman a823d167bc service: cleanup base implementation and some caller implementations (#7301) 2021-12-01 09:28:06 -05:00
Sam Kleinman 4af2dbd03b eventbus: plumb contexts (#7337)
* eventbus: plumb contexts

* fix lint
2021-11-30 14:24:11 +00:00