Commit Graph

89 Commits

Author SHA1 Message Date
Callum Waters
9a3861fb82 light: wait for tendermint node to start before running example test (#6744) 2021-07-27 18:59:34 +02:00
Callum Waters
0e2752ae42 light: improve error handling and allow providers to be added (#6733) 2021-07-22 18:12:34 +02:00
Sam Kleinman
478f5321ad light: run examples as integration tests (#6745) 2021-07-21 09:54:14 -04:00
William Banfield
f70396c6fd add and run make target for generating existing mocks (#6732)
There are many `//go:generate mockery` lines in the source code.
This change adds a make target to invoke these mock generations.
This change also invokes the mock invocations and adds the resulting mocks to the repo.

Related to #5274
2021-07-18 00:46:04 +00:00
Callum Waters
40fba3960d add missing context catch and tests (#6701) 2021-07-14 11:23:15 +02:00
Callum Waters
051e127d38 light: correctly handle contexts (#6687) 2021-07-09 18:48:18 +02:00
Callum Waters
5ae3c24d55 evidence: update ADR 59 and add comments to the use of common height (#6628) 2021-06-29 18:15:11 +02:00
Sam Kleinman
144af9a81a rpc: use shorter path names for tests (#6602) 2021-06-21 09:44:49 -04:00
Sam Kleinman
a6b30faf35 libs/time: move types/time into libs (#6595) 2021-06-17 16:02:31 -04:00
Marko
31e7cdeeac dep: remove IAVL dependency (#6550)
## Description

remove IAVL as a Tendermint dependency.

closes #5694 

I dont think this needs a changelog entry.
2021-06-08 09:55:37 +00:00
Marko
eaa0468190 types: revert breaking change (#6538)
## Description

revert #5523 to avoid breaking changes

cc @greg-szabo
2021-06-07 08:26:47 +00:00
Sam Kleinman
663c0bba9c rpc: decouple test fixtures from node implementation (#6533) 2021-06-04 09:10:38 -04:00
Callum Waters
618c945d54 simplify initialization of light client (#6530) 2021-06-03 15:57:55 +02:00
Callum Waters
c0fcc5f6bb fix net_info call on light rpc (#6514) 2021-05-31 15:46:49 +02:00
Sam Kleinman
e9928f6186 p2p: limit rate of dialing new peers (#6485) 2021-05-26 14:39:04 -04:00
Marko
719e028e00 libs: internalize some packages (#6366)
## Description

Internalize some libs. This reduces the amount ot public API tendermint is supporting. The moved libraries are mainly ones that are used within Tendermint-core.
2021-05-25 16:25:31 +00:00
Callum Waters
72ee5aab26 evidence: separate abci specific validation (#6473) 2021-05-25 16:53:14 +02:00
Callum Waters
09e0df8479 light: spec alignment on verify skipping (#6474) 2021-05-25 14:48:15 +02:00
Sam Kleinman
d9134063e7 rpc: add chunked rpc interface (#6445) 2021-05-24 09:48:27 -04:00
Sam Kleinman
fdd506a126 rpc: clean up client global state in tests (#6438) 2021-05-11 10:22:38 -04:00
Callum Waters
811dbe439f light: ensure trust level is strictly less than 1 (#6447) 2021-05-11 15:13:52 +02:00
Callum Waters
a91680efee test: create common functions for easily producing tm data structures (#6435) 2021-05-07 17:00:02 +02:00
JayT106
ca7dbea05b Set cache control in the HTTP-RPC response header (#6265) 2021-04-14 14:05:27 +02:00
Callum Waters
d4d2b66067 light: handle too high errors correctly (#6346) 2021-04-13 14:21:00 +02:00
Callum Waters
a818f914ab fix deadlock in light tests (#6332) 2021-04-08 19:30:19 +02:00
Callum Waters
b272746444 Merge pull request from GHSA-f3w5-v9xx-rp8p
* add time warping lunatic attack test

* create too high and connecton refused errors and add to the light client provider

* add height check to provider

* introduce block lag

* add detection logic for processing forward lunatic attack

* add node-side verification logic

* clean up tests and formatting

* update adr's

* update testing

* fix fetching the latest block

* format

* update changelog

* implement suggestions

* modify ADR's

* format

* clean up node evidence verification
2021-04-08 08:10:03 -07:00
Aleksandr Bezobchuk
003f394512 rpc: index block events to support block event queries (#6226) 2021-03-22 11:47:35 -04:00
Callum Waters
fa781e6bb7 e2e: fix light client generator (#6236) 2021-03-15 13:04:33 +01:00
Callum Waters
418e2c140f e2e: integrate light clients (#6196) 2021-03-05 14:24:45 +01:00
Callum Waters
37d36cd5bc light: improve provider handling (#6053)
Introduces heuristics that track the amount of no responses or unavailable blocks a provider has for more robust provider handling by the light client. Use concurrent calls to all witnesses when a new primary is needed.
2021-03-01 12:04:02 +01:00
Anton Kaliaev
e9e5026dac rpc/client/http: drop endpoint arg from New and add WSOptions (#6176)
also

- replace `MaxReconnectAttempts`, `ReadWait`, `WriteWait` and `PingPeriod` options with `WSOptions` in `WSClient` (rpc/jsonrpc/client/ws_client.go).
- set default write wait to 10s for `WSClient`(rpc/jsonrpc/client/ws_client.go)
- unexpose `WSEvents`(rpc/client/http.go)

Closes #6162
2021-02-25 06:57:31 +00:00
Callum Waters
29360f955c light: improve timeout functionality (#6145) 2021-02-18 23:49:24 +01:00
Bipul Prasad
90c290ac52 rpc: standardize error codes (#6019) 2021-02-18 17:54:02 +01:00
Callum Waters
162f67cf26 correct spelling to US english (#6077) 2021-02-11 18:59:18 +01:00
Callum Waters
ee3f34f4ab light: create provider options struct (#6064) 2021-02-08 18:23:31 +01:00
Callum Waters
1608484de8 remove witnesses in order of decreasing index (#6058) 2021-02-08 12:34:02 +01:00
Callum Waters
b9b55db4e5 light: remove max retry attempts from client and add to provider (#6054) 2021-02-05 18:01:34 +01:00
Callum Waters
c7b619188d light: fix panic with RPC calls to commit and validator when height is nil (#6026) 2021-02-02 14:01:39 +01:00
Callum Waters
90d3f56797 store: fix deadlock in pruning (#6007) 2021-02-02 11:36:52 +01:00
Anton Kaliaev
1cd9bdb80b light/provider/http: fix Validators (#6022)
Closes #6010
2021-02-01 11:32:37 +00:00
Marko
70bb8cc8b7 proto: seperate native and proto types (#5994)
## Description

Separate protobuf and domain types. We should avoid using protobuf in our core logic. 

ref #5460
2021-01-27 20:14:27 +00:00
Anton Kaliaev
d76add65a6 libs/log: format []byte as hexidecimal string (uppercased) (#5960)
Closes: #5806 

Co-authored-by: Lanie Hei <heixx011@umn.edu>
2021-01-25 16:25:29 +04:00
Callum Waters
5cbb8263b4 patch concurrency issue with pruning in the light store (#5910) 2021-01-17 17:14:14 +01:00
Callum Waters
ca285844ea light: fix light store deadlock (#5901) 2021-01-14 17:22:09 +01:00
Callum Waters
385ea1db7d store: use db iterators for pruning and range-based queries (#5848) 2021-01-08 13:12:54 +01:00
Callum Waters
9b9222f461 store: order-preserving varint key encoding (#5771) 2021-01-05 16:53:26 +01:00
Callum Waters
f368b91caf light: minor fixes / standardising errors (#5716)
## Description

I'm just doing a self audit of the light client. There's a few things I've changed

- Validate trust level in `VerifyNonAdjacent` function
- Make errNoWitnesses public (it's something people running software on top of a light client should be able to parse)
- Remove `ChainID` check of witnesses on start up. We do this already when we compare the first header with witnesses
- Remove `ChainID()` from provider interface

Closes: #4538
2020-12-01 12:53:53 +00:00
Callum Waters
68dc751a8c light: ensure required header fields are present for verification (#5677) 2020-11-19 12:02:58 +01:00
Callum Waters
909da42789 light: make fraction parts uint64, ensuring that it is always positive (#5655) 2020-11-17 14:23:16 +01:00
Callum Waters
3922dde05d evidence: structs can independently form abci evidence (#5610) 2020-11-04 17:14:48 +01:00