Commit Graph

594 Commits

Author SHA1 Message Date
Callum Waters
6e238b5b9d statesync: make fetching chunks more robust (#6587) 2021-06-21 10:14:15 -04:00
Sam Kleinman
a6b30faf35 libs/time: move types/time into libs (#6595) 2021-06-17 16:02:31 -04:00
Callum Waters
c0f7fb08c0 config: add root dir to priv validator (#6585) 2021-06-16 17:13:14 +02:00
Aleksandr Bezobchuk
7d961b55b2 state sync: tune request timeout and chunkers (#6566) 2021-06-15 14:33:26 -04:00
Callum Waters
74af343f28 statesync: tune backfill process (#6565)
This PR make some tweaks to backfill after running e2e tests:
- Separates sync and backfill as two distinct processes that the node calls. The reason is because if sync fails then the node should fail but if backfill fails it is still possible to proceed.
- Removes peers who don't have the block at a height from the local peer list. As the process goes backwards if a node doesn't have a block at a height they're likely pruning blocks and thus they won't have any prior ones either. 
- Sleep when we've run out of peers, then try again.
2021-06-11 15:26:18 +00:00
JayT106
a456b71f1f state: move pruneBlocks from consensus/state to state/execution (#6541)
state: move pruneBlocks function from consensus/state to state/execution

Closes #5414
2021-06-10 14:24:47 +00:00
Callum Waters
32bc399bdd node: fix genesis on start up (#6563) 2021-06-10 10:22:35 +02:00
Callum Waters
d6b4bc267b node/tests: clean up use of genesis doc and surrounding tests (#6554) 2021-06-08 19:32:15 +02:00
Callum Waters
6f6ac5c04e state sync: reverse sync implementation (#6463) 2021-06-08 19:23:52 +02:00
Sam Kleinman
a855f96946 p2p: renames for reactors and routing layer internal moves (#6547) 2021-06-08 08:17:09 -04:00
Sam Kleinman
00c284d9d7 node: change package interface (#6540) 2021-06-04 11:36:30 -04:00
Aleksandr Bezobchuk
7ec123c968 improvement: update TxInfo (#6529)
Remove `Context` from the `TxInfo` type and instead require the caller to pass a `Context` to `CheckTx` which is idiomatic.

closes: #6497
2021-06-02 13:53:57 +00:00
Aleksandr Bezobchuk
1e4bc04cd6 mempool: v1 implementation (#6466) 2021-06-01 11:17:45 -04:00
Sam Kleinman
7bf84d9d7f config: seperate priv validator config into seperate section (#6462)
Addresses a beginning component of #6255
2021-05-31 13:16:46 +00:00
Marko
1709e49813 version: revert version through ldflag only (#6494)
## Description

Add version back to versions, but allow it to be overridden via a ldflag.

Reason:

Many users are not setting the ldflag causing issues with tooling that relies on it (cosmjs)

closes #6488

cc @webmaster128
2021-05-28 14:22:31 +00:00
JayT106
711a718162 config/indexer: custom event indexing (#6411) 2021-05-27 10:44:46 -04:00
Sam Kleinman
d9134063e7 rpc: add chunked rpc interface (#6445) 2021-05-24 09:48:27 -04:00
Sam Kleinman
fa891c5a4b node: cleanup pex initialization (#6467) 2021-05-14 10:05:59 -04:00
Callum Waters
c320eb1407 split out initializers into setup.go (#6446) 2021-05-12 11:11:24 +02:00
Callum Waters
64e7b5efea p2p: add channel descriptors to open channel (#6440) 2021-05-10 22:22:07 +02:00
JayT106
e334555393 node/state: graceful shutdown in the consensus state (#6370) 2021-05-10 21:45:26 +02:00
Sam Kleinman
0b0914b3df rpc: remove global environment (#6426) 2021-05-06 17:06:16 -04:00
Callum Waters
ec5e3b0b02 p2p: wire pex v2 reactor to router (#6407) 2021-05-05 18:46:51 +02:00
Aleksandr Bezobchuk
bc643b19c4 p2p: support private peer IDs in new p2p stack (#6409)
Pass a set of private peer ids to the `PeerManager` and any node that exists in this set is not returned in the `Advertise` method.

closes: #6405
2021-04-30 20:37:17 +00:00
Sam Kleinman
8eccaf9535 mempool: remove vestigal mempool wal (#6396) 2021-04-29 15:33:59 -04:00
Callum Waters
9efc20c963 p2p: improve PEX reactor (#6305) 2021-04-26 13:03:19 +02:00
Callum Waters
36d8cb09df config: create BootstrapPeers p2p config parameter (#6372) 2021-04-22 12:55:50 +02:00
JayT106
43eacd159f state/indexer: reconstruct indexer, move txindex into the indexer package (#6382) 2021-04-21 16:37:44 -04:00
Callum Waters
8e8de2b2fb node: use db provider instead of mem db (#6362) 2021-04-16 19:07:18 +02:00
Aleksandr Bezobchuk
47b28fd6aa p2p: minor cleanup + update router options (#6353) 2021-04-14 09:35:43 -04:00
Nate Williams
b517dd5685 Expose getter for txIndexer (#6327) 2021-04-12 14:47:20 +02:00
Sam Kleinman
0f41f7465c p2p: extend e2e tests for new p2p framework (#6323) 2021-04-08 11:09:21 -04:00
Sam Kleinman
6d9372bd39 test: improve cleanup for data and disk use (#6311) 2021-04-05 12:39:04 -04:00
Sam Kleinman
d0b513c182 p2p: filter peers by IP address and ID (#6300) 2021-03-30 18:00:43 -04:00
Sam Kleinman
3ed8f14bf9 p2p: connect max inbound peers configuration to new router (#6296) 2021-03-30 10:04:14 -04:00
Aleksandr Bezobchuk
a554005136 p2p: revised router message scheduling (#6126) 2021-03-25 16:58:46 -04:00
Aleksandr Bezobchuk
003f394512 rpc: index block events to support block event queries (#6226) 2021-03-22 11:47:35 -04:00
Callum Waters
9f7051d38a node: implement tendermint modes (#6241)
Co-authored-by: dongsam <dongsamb@gmail.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-03-18 11:17:53 +01:00
Marko
efd2fde474 privval: add ctx to privval interface (#6240)
## Description

- Add `context.Context` to Privval interface

This pr does not introduce context into our custom privval connection protocol because this will be removed in the next release. When this pr is released.
2021-03-16 14:41:03 +00:00
Silas Davis
9498cd80bd Normalise GenesisDoc before saving to state (#6059)
Co-authored-by: Callum <cmwaters19@gmail.com>
2021-02-23 13:27:42 +01:00
Erik Grinaker
b6be889b97 node: feature flag for legacy p2p support (#6056) 2021-02-16 11:57:16 -05:00
Aleksandr Bezobchuk
16bbe8c862 consensus: p2p refactor (#5969) 2021-02-16 11:02:52 -05:00
Callum Waters
162f67cf26 correct spelling to US english (#6077) 2021-02-11 18:59:18 +01:00
Erik Grinaker
9b6d6a3ad0 p2p: tighten up Router and add tests (#6044)
This cleans up the `Router` code and adds a bunch of tests. These sorts of systems are a real pain to test, since they have a bunch of asynchronous goroutines living their own lives, so the test coverage is decent but not fantastic. Luckily we've been able to move all of the complex peer management and transport logic outside of the router, as synchronous components that are much easier to test, so the core router logic is fairly small and simple.

This also provides some initial test tooling in `p2p/p2ptest` that automatically sets up in-memory networks and channels for use in integration tests. It also includes channel-oriented test asserters in `p2p/p2ptest/require.go`, but these have primarily been written for router testing and should probably be adapted or extended for reactor testing.
2021-02-03 23:03:02 +00:00
Erik Grinaker
50b8907581 p2p: clean up new Transport infrastructure (#6017)
This revises the new P2P `Transport` interface and does some preliminary code cleanups and simplifications.

The major change here is to add `Connection.Handshake()` for performing node handshakes (once the stream transport API is implemented, this can be done entirely independent of the transport).  This moves most of the handshaking logic into the `Router`, such as prevention of head-of-line blocking, validation of peer's `NodeInfo`, controlling timeouts, and so on. This significantly simplifies transports, completely removes the need for internal goroutines, and shares common logic across all transports. This also allows varying the handshake `NodeInfo` across peers, e.g. to vary `ListenAddr`. Similarly, connection filtering is also moved into the switch/router so that it can be shared between transports.
2021-01-30 10:51:22 +00:00
Erik Grinaker
a741314c97 p2p: improve peerStore prototype (#5954)
This improves the `peerStore` prototype by e.g.:

* Using a database with Protobuf for persistence, but also keeping full peer set in memory for performance.
* Simplifying the API, by taking/returning struct copies for safety, and removing errors for in-memory operations.
* Caching the ranked peer set, as a temporary solution until a better data structure is implemented.
* Adding `PeerManagerOptions.MaxPeers` and pruning the peer store (based on rank) when it's full.
* Rewriting `PeerAddress` to be independent of `url.URL`, normalizing it and tightening semantics.
2021-01-25 17:27:44 +00:00
Aleksandr Bezobchuk
68bd2116f0 mempool: p2p refactor (#5919) 2021-01-22 09:34:12 -05:00
Callum
af723eca8a use correct source of evidence time
Conflicting votes are now sent to the evidence pool to form duplicate vote evidence only once
the height of the evidence is finished and the time of the block finalised.
2021-01-19 16:00:02 +01:00
Aleksandr Bezobchuk
62d7a5d028 blockchain v0: p2p refactor (#5858) 2021-01-18 16:35:11 -05:00
Marko
f05788e632 privval: Query validator key (#5876)
## Description

- Query validator key when a remote signer is used. This is supported gRPC remote signing and filePV only. 


Closes: #3009
2021-01-12 10:06:33 +00:00