685 Commits

Author SHA1 Message Date
Sergio Mena
854fd07461 Fixing handling of contexts in the ABCI++ rebased branch (#7768)
* Fixing context

* Removed logger change

* Fixing UTs

* Bump
2022-02-04 15:55:35 +01:00
M. J. Fromberger
c67ace3433 Revert "PrepareProposal-VoteExtension integration (#6915)" (#7769)
This reverts commit 39ffa80ae7.

Nightly end-to-end tests are currently failing; revert temporarily so we can
debug.
2022-02-03 09:42:08 -08:00
mconcat
39ffa80ae7 PrepareProposal-VoteExtension integration (#6915) 2022-02-02 11:51:13 +01: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
Gui
ebbc3f02f5 p2p: always advertise self, to enable mutual address discovery (#7594)
Fixes #7593
2022-01-19 21:39:59 +00:00
M. J. Fromberger
c8e8a62084 abci/client: simplify client interface (#7607)
This change has two main effects:

1. Remove most of the Async methods from the abci.Client interface.
   Remaining are FlushAsync, CommitTxAsync, and DeliverTxAsync.

2. Rename the synchronous methods to remove the "Sync" suffix.

The rest of the change is updating the implementations, subsets, and mocks of
the interface, along with the call sites that point to them.

* Fix stringly-typed mock stubs.
* Rename helper method.
2022-01-19 10:58:56 -08:00
Sam Kleinman
82b65868ce node+autofile: avoid leaks detected during WAL shutdown (#7599) 2022-01-14 13:04:01 -05:00
Sam Kleinman
cef17e1c02 node+rpc: rpc environment should own it's creation (#7573) 2022-01-13 12:39:48 -05:00
Sam Kleinman
ed660bddeb node+privval: refactor privval construction (#7574) 2022-01-13 11:53:05 -05:00
Sam Kleinman
2a348cc1e9 logging: remove reamining instances of SetLogger interface (#7572) 2022-01-12 16:56:49 -05:00
Sam Kleinman
e07c4cdcf2 node: collapse initialization internals (#7567) 2022-01-12 15:32:22 -05:00
Sam Kleinman
46f56fcea5 node: move seed node implementation to its own file (#7566) 2022-01-12 12:33:17 -05:00
Kene
2f858f1448 node: new concrete type for seed node implementation (#7521)
Defines a different concrete type that satisfies the service interface for a seed node.
update the seed node unit test to assert the new type.

Fixes #6775
2022-01-11 14:07:49 +01: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
90cf742065 pex: regularize reactor constructor (#7532) 2022-01-07 13:52:11 -05:00
Sam Kleinman
aa76a367e0 blocksync: standardize construction process (#7531) 2022-01-07 13:40:08 -05:00
Sam Kleinman
ae7a76a175 evidence: reactor constructor (#7533) 2022-01-07 13:28:23 -05:00
Sam Kleinman
059b38afe4 mempool: refactor mempool constructor (#7530) 2022-01-07 12:49:22 -05:00
Sam Kleinman
fc36c7782f statesync: reactor and channel construction (#7529) 2022-01-07 12:04:17 -05:00
Sam Kleinman
10402b728f consensus+p2p: change how consensus reactor is constructed (#7525) 2022-01-07 10:59:10 -05:00
Sam Kleinman
74a8941854 consensus: remove reactor options (#7526) 2022-01-07 09:15:35 -05:00
Sam Kleinman
569629486b tests: remove panics from test fixtures (#7522) 2022-01-06 17:34:32 -05:00
Sam Kleinman
332163ede6 testing: remove background contexts (#7509) 2022-01-05 12:42:57 -05:00
Sam Kleinman
f2cc496f09 testing: pass testing.T to assert and require always, assertion cleanup (#7508) 2022-01-05 09:25:08 -05:00
Sam Kleinman
3c8955e4b8 errors: formating cleanup (#7507) 2022-01-04 16:11:28 -05:00
Sam Kleinman
5c0abb5367 testing: use scoped logger for all public packages (#7504) 2022-01-04 12:56:17 -05:00
Sam Kleinman
430817d9e9 types: remove panic from block methods (#7501) 2022-01-03 16:14:26 -05:00
Sam Kleinman
bef120dadf contexts: remove all TODO instances (#7466) 2021-12-16 15:15:26 -05:00
M. J. Fromberger
82738eb016 Move the libs/pubsub package to internal scope (#7451)
No API changes, merely changes the import path.
2021-12-15 07:09:32 -08:00
Sam Kleinman
e3aaae570d node: minor package cleanups (#7444) 2021-12-14 14:56:28 -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
Callum Waters
bca2080c01 cmd: add integration test and fix bug in rollback command (#7315) 2021-12-02 12:17:16 +01:00
Sam Kleinman
a823d167bc service: cleanup base implementation and some caller implementations (#7301) 2021-12-01 09:28:06 -05:00
M. J. Fromberger
ab1788b922 Fix incorrect tests using the PSQL sink. (#7349)
Some of our tests were creating a psql event sink and expecting
it to report (or not report) certain kinds of errors. These tests
were ill-founded in a couple of ways:

1. Tests that required the Postgres driver were not loading it.
   This led to spurious successes on tests that wanted "some error"
   from the sink constructor, but didn't exercise the right path.

2. Tests that wanted a Postgres sink to succeed without a database.
   These tests "passed" because they weren't actually establishing a
   connection to the database, but if they had would have failed for
   the lack of one.

To fix this:
- Load the postgres driver in tests that need it.
- Verify connectivity before reporting successful creation of a PSQL event sink.
- Remove tests that wanted a psql sink without a database, since that case
  is already tested elsewhere.
2021-11-30 12:57:44 -08:00
Sam Kleinman
4af2dbd03b eventbus: plumb contexts (#7337)
* eventbus: plumb contexts

* fix lint
2021-11-30 14:24:11 +00:00
Sam Kleinman
6ab62fe7b6 service: remove stop method and use contexts (#7292) 2021-11-18 17:56:21 -05:00
Sam Kleinman
d7606777cf libs/service: pass logger explicitly (#7288)
This is a very small change, but removes a method from the
`service.Service` interface (a win!) and forces callers to explicitly
pass loggers in to objects during construction rather than (later)
injecting them. There's not a real need for this kind of lazy
construction of loggers, and I think a decent potential for confusion
for mutable loggers.

The main concern I have is that this changes the constructor API for
ABCI clients. I think this is fine, and I suspect that as we plumb
contexts through, and make changes to the RPC services there'll be a
number of similar sorts of changes to various (quasi) public
interfaces, which I think we should welcome.
2021-11-16 16:20:56 +00:00
Sam Kleinman
a15ae5b53a node+consensus: handshaker initialization (#7283)
This mostly just pushes more of initialization out of the node package.
2021-11-15 18:28:52 +00:00
M. J. Fromberger
d5865af1f4 Add basic metrics to the indexer package. (#7250)
This follows the same model as we did in the p2p package.

Rework the indexer service constructor to take a struct of arguments,
that makes it easier to construct the optional settings.
Deprecate but do not remove the existing constructor.

Clean up node initialization a little bit.
2021-11-05 12:50:53 -07:00
M. J. Fromberger
54d7030510 pubsub: Move indexing out of the primary subscription path (#7231)
This is part of the work described by #7156.

Remove "unbuffered subscriptions" from the pubsub service.
Replace them with a dedicated blocking "observer" mechanism.
Use the observer mechanism for indexing.

Add a SubscribeWithArgs method and deprecate the old Subscribe
method. Remove SubscribeUnbuffered entirely (breaking).

Rework the Subscription interface to eliminate exposed channels.
Subscriptions now use a context to manage lifecycle notifications.

Internalize the eventbus package.
2021-11-05 10:25:25 -07:00
Sam Kleinman
ffcd347ef6 pex: allow disabled pex reactor (#7198)
This ensures the implementation respects disabling the pex reactor.
2021-11-03 11:51:42 +00:00
Sam Kleinman
e2b626fc92 node: cleanup construction (#7191) 2021-11-03 07:16:35 -04:00
Sam Kleinman
5cc980698a mempool: consoldate implementations (#7171)
* mempool: consoldate implementations

* update chagelog

* fix test

* Apply suggestions from code review

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

* cleanup locking comments

* context twiddle

* migrate away from deprecated ioutil APIs (#7175)

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

Co-authored-by: M. J. Fromberger <michael.j.fromberger@gmail.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-10-29 04:19:06 -04:00
Sam Kleinman
93eb940dcd config: WriteConfigFile should return error (#7169) 2021-10-27 08:46:18 -04:00
Sam Kleinman
4bd8c5ab6f p2p: transport should be captive resposibility of router (#7160)
The main (and minor) win of this PR is that the transport is fully the
responsibility of the router and the node doesn't need to be responsible for its lifecylce.
2021-10-26 16:34:44 +00:00
Sam Kleinman
cb39e2f917 node,blocksync,config: remove support for running nodes with blocksync disabled (#7159)
We stopped testing these configurations a while ago, and it doesn't
really make sense to allow nodes to run in this configuration. This
drops support for non-blocksync nodes and cleans up the
configuration/tests accordingly.

Closes: #6908
2021-10-26 14:35:14 +00:00
Sam Kleinman
23be048294 p2p: use correct transport configuration (#7152) 2021-10-25 07:19:20 -04:00
Callum Waters
68ca65f5d7 pex: remove legacy proto messages (#7147)
This PR implements the proto changes made in https://github.com/tendermint/spec/pull/352, removing the legacy messages that were used in the pex reactor.
2021-10-22 12:07:46 +00:00
Sam Kleinman
ca8f004112 p2p: remove final shims from p2p package (#7136)
This is, perhaps, the trival final piece of #7075 that I've been
working on.

There's more work to be done: 
- push more of the setup into the pacakges themselves
- move channel-based sending/filtering out of the 
- simplify the buffering throuhgout the p2p stack.
2021-10-15 20:08:09 +00:00