Commit Graph
80 Commits
Author SHA1 Message Date
mergify[bot]andGitHub ed7f51460b libs/strings: move to internal (#8890) (#8891) 2022-06-27 18:27:46 -04:00
b483058898 p2p: remove dial sleep and provide disconnect cooldown (backport #8839) (#8876)
* p2p: remove dial sleep and provide disconnect cooldown (#8839)

Alternative proposal for #8826

(cherry picked from commit 52b6dc19ba)

# Conflicts:
#	internal/p2p/router.go

* fix merge

Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-06-24 16:35:27 -04:00
7e7a2535c6 p2p: peer store and dialing changes (#8737) (#8784)
(cherry picked from commit 9e5b13725d)

Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-06-17 08:26:03 -04:00
c368abceab Revert "p2p: self-add node should not error (tendermint#8753)" (#8757) (#8758)
(cherry picked from commit bf1cb89bb7)

Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-06-14 17:08:35 -04:00
7335278479 p2p: self-add node should not error (#8753) (#8756)
(cherry picked from commit 7971f4a2fc)

Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-06-14 13:01:23 -04:00
Evan ForbesandGitHub 30929cf190 p2p: pass maxConns for MaxPeers during node setup (#8684)
* pass maxConns for MaxPeers
* add upgrade connections to max connections for max peers
* change the formula to calculate max peers
2022-06-03 07:22:38 -07:00
Sam KleinmanandGitHub 2897b75853 p2p: remove unused get height methods (#8569) 2022-05-17 10:56:26 -04:00
Sam KleinmanandGitHub 8670678291 p2p: remove support for multiple transports and endpoints (#8420) 2022-04-27 14:29:19 -04:00
Sam KleinmanandGitHub ad249ca178 node: cleanup setup for indexer and evidence components (#8378) 2022-04-19 15:35:14 +00:00
Sam KleinmanandGitHub efd4f4a40b cleanup: unused parameters (#8372) 2022-04-18 16:45:21 -04:00
Sam KleinmanandGitHub c372390fea eventbus: publish without contexts (#8369) 2022-04-18 16:28:31 -04:00
Sam KleinmanandGitHub 6ed3f2d98d node: move handshake out of constructor (#8264) 2022-04-07 11:21:10 -04:00
Sam KleinmanandGitHub d153388446 p2p: inject nodeinfo into router (#8261) 2022-04-06 14:02:07 -04:00
Sam KleinmanandGitHub 9d1e8eaad4 node: remove channel and peer update initialization from construction (#8238) 2022-04-05 13:26:53 +00:00
Sam KleinmanandGitHub a5320da5c8 node: cleanup evidence db (#8119) 2022-03-14 21:00:51 +00:00
Sam KleinmanandGitHub 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 KleinmanandGitHub 01266881b8 evidence: manage and initialize state objects more clearly in the pool (#8080) 2022-03-07 14:26:58 -05:00
Sam KleinmanandGitHub 8df7b6103f proxy: collapse triforcated abci.Client (#8067) 2022-03-06 18:25:50 -05:00
Sam KleinmanandGitHub 0167f0d527 node: nodes should fetch state on startup (#8062) 2022-03-04 12:23:57 -05:00
Sam KleinmanandGitHub 89dbebd1c5 p2p: retry failed connections slightly more aggressively (#8010)
* p2p: retry failed connections slightly more aggressively

* fix dial interval test
2022-02-25 18:05:29 +00:00
Jasmina MalicevicandGitHub e80541a251 types/events+evidence: emit events + metrics on evidence validation (#7802)
* event: Added Events after evidence validation; evidence: refactored AddEvidence

Added context and Metrics as parameter for the pool constructor

* evidence: pushed event firing into evidence pool and added metrics to represent the size of the evpool

* state: fixed parameters of evpool mock functions

* evidence: added test to confirm events are generated

* Removed obsolete EvidenceEventPublisher interface

* evidence: pool removed error on missing eventbus
2022-02-21 14:45:56 +01:00
Sam KleinmanandGitHub e0d44a650e node: clarify unneccessary logic in seed constructor (#7818) 2022-02-17 08:56:55 -05:00
GuiandGitHub ebbc3f02f5 p2p: always advertise self, to enable mutual address discovery (#7594)
Fixes #7593
2022-01-19 21:39:59 +00:00
Sam KleinmanandGitHub ed660bddeb node+privval: refactor privval construction (#7574) 2022-01-13 11:53:05 -05:00
Sam KleinmanandGitHub 90cf742065 pex: regularize reactor constructor (#7532) 2022-01-07 13:52:11 -05:00
Sam KleinmanandGitHub aa76a367e0 blocksync: standardize construction process (#7531) 2022-01-07 13:40:08 -05:00
Sam KleinmanandGitHub ae7a76a175 evidence: reactor constructor (#7533) 2022-01-07 13:28:23 -05:00
Sam KleinmanandGitHub 059b38afe4 mempool: refactor mempool constructor (#7530) 2022-01-07 12:49:22 -05:00
Sam KleinmanandGitHub 10402b728f consensus+p2p: change how consensus reactor is constructed (#7525) 2022-01-07 10:59:10 -05:00
Sam KleinmanandGitHub 74a8941854 consensus: remove reactor options (#7526) 2022-01-07 09:15:35 -05:00
Sam KleinmanandGitHub bef120dadf contexts: remove all TODO instances (#7466) 2021-12-16 15:15:26 -05:00
Sam KleinmanandGitHub e3aaae570d node: minor package cleanups (#7444) 2021-12-14 14:56:28 -05:00
Sam KleinmanandGitHub 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 WatersandGitHub bca2080c01 cmd: add integration test and fix bug in rollback command (#7315) 2021-12-02 12:17:16 +01:00
Sam KleinmanandGitHub 4af2dbd03b eventbus: plumb contexts (#7337)
* eventbus: plumb contexts

* fix lint
2021-11-30 14:24:11 +00:00
Sam KleinmanandGitHub 6ab62fe7b6 service: remove stop method and use contexts (#7292) 2021-11-18 17:56:21 -05:00
Sam KleinmanandGitHub 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 KleinmanandGitHub 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. FrombergerandGitHub 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. FrombergerandGitHub 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 KleinmanandGitHub e2b626fc92 node: cleanup construction (#7191) 2021-11-03 07:16:35 -04:00
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 KleinmanandGitHub 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 KleinmanandGitHub 23be048294 p2p: use correct transport configuration (#7152) 2021-10-25 07:19:20 -04:00
Sam KleinmanandGitHub 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
Sam KleinmanandGitHub 7143f14a63 p2p: simplify open channel interface (#7133)
A fourth #7075 component patch to simplify the channel creation interface
2021-10-15 18:00:24 +00:00
Sam KleinmanandGitHub 0900ea8396 p2p: channel shim cleanup (#7129) 2021-10-15 12:31:33 -04:00
MarkoandGitHub 66a11fe527 blocksync: remove v0 folder structure (#7128)
Remove v0 blocksync folder structure.
2021-10-15 13:03:53 +00:00
William BanfieldandGitHub 36a1acff52 internal/proxy: add initial set of abci metrics (#7115)
This PR adds an initial set of metrics for use ABCI. The initial metrics enable the calculation of timing histograms and call counts for each of the ABCI methods. The metrics are also labeled as either 'sync' or 'async' to determine if the method call was performed using ABCI's `*Async` methods.

An example of these metrics is included here for reference:
```
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.0001"} 0
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.0004"} 5
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.002"} 12
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.009"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.02"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.1"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="0.65"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="2"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="6"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="25"} 13
tendermint_abci_connection_method_timing_bucket{chain_id="ci",method="commit",type="sync",le="+Inf"} 13
tendermint_abci_connection_method_timing_sum{chain_id="ci",method="commit",type="sync"} 0.007802058000000001
tendermint_abci_connection_method_timing_count{chain_id="ci",method="commit",type="sync"} 13
```

These metrics can easily be graphed using prometheus's `histogram_quantile(...)` method to pick out a particular quantile to graph or examine. I chose buckets that were somewhat of an estimate of expected range of times for ABCI operations. They start at .0001 seconds and range to 25 seconds. The hope is that this range captures enough possible times to be useful for us and operators.
2021-10-13 20:52:25 +00:00
Sam KleinmanandGitHub 4781d04d18 node: always close database engine (#7113) 2021-10-12 17:40:59 -04:00