Commit Graph

8910 Commits

Author SHA1 Message Date
Callum Waters
25bb556fee p2p: increase queue size to 16MB (#6588) 2021-06-16 17:27:41 +02:00
Callum Waters
c0f7fb08c0 config: add root dir to priv validator (#6585) 2021-06-16 17:13:14 +02:00
dependabot[bot]
7bc7de5092 build(deps): Bump github.com/spf13/viper from 1.7.1 to 1.8.0 (#6586)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/spf13/viper/releases)
- [Commits](https://github.com/spf13/viper/compare/v1.7.1...v1.8.0)

---
updated-dependencies:
- dependency-name: github.com/spf13/viper
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-16 14:33:30 +02:00
Aleksandr Bezobchuk
7d961b55b2 state sync: tune request timeout and chunkers (#6566) 2021-06-15 14:33:26 -04:00
Sam Kleinman
886519e3ca rpc: add subscription id to events (#6386)
Addresses  #3931
2021-06-15 17:33:47 +00:00
Cuong Manh Le
8d0c38257e test/fuzz: fix wrong path for some p2p fuzzing packages (#6580)
Updates #6557
2021-06-15 08:18:11 +00:00
Cuong Manh Le
10a41ae6c8 test/fuzz: fix wrong compile fuzzer command (#6579)
Updates #6557
2021-06-15 07:32:03 +00:00
Cuong Manh Le
e79262415c test/fuzz: add current fuzzing to oss-fuzz-build script (#6576)
Updates #6557
2021-06-15 05:11:23 +00:00
Sam Kleinman
13b95e7127 consensus: skip all messages during sync (#6577)
Co-authored-by: Aleksandr Bezobchuk
2021-06-14 13:52:46 -04:00
dependabot[bot]
c4cf4d3012 build(deps): Bump github.com/rs/zerolog from 1.22.0 to 1.23.0 (#6575)
Bumps [github.com/rs/zerolog](https://github.com/rs/zerolog) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/rs/zerolog/releases)
- [Commits](https://github.com/rs/zerolog/compare/v1.22.0...v1.23.0)

---
updated-dependencies:
- dependency-name: github.com/rs/zerolog
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-14 14:21:01 +02:00
JayT106
21536ac7a4 linter: linter checks non-ASCII identifiers (#6574)
Enabled the ASCII check linter
https://github.com/tdakkota/asciicheck

Closes #2801
2021-06-14 08:35:44 +00:00
JayT106
cb63ab4ac0 rpc: fix RPC client doesn't handle url's without ports (#6507) 2021-06-14 10:34:02 +02:00
Cuong Manh Le
66926d31ca fuzz: initial support for fuzzing (#6558) 2021-06-14 10:19:57 +02: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
10fa151749 state/types: refactor makeBlock, makeBlocks and makeTxs (#6567)
Closes #3584
2021-06-11 15:17:20 +00:00
Callum Waters
2c81638787 e2e: fix looping problem while waiting (#6568) 2021-06-11 14:47:55 +02: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
Cuong Manh Le
4e59575dc0 blockchain/v0: fix data race in blockchain channel (#6518)
There is a possible data race/panic between processBlockchainCh and
processPeerUpdates, since when we send to blockchainCh.Out in one
goroutine and close the channel in the other. The race is seen in some
Github Action runs.

This commit fix the race, by adding a peerUpdatesCh as a bridge between
processPeerUpdates and processBlockchainCh, so the former will send to
this channel, the later will listen and forward the message to
blockchainCh.Out channel.

Updates #6516
2021-06-10 06:58:37 +00:00
JayT106
d2b78ec09b indexer: use INSERT ... ON CONFLICT in the psql eventsink insert functions (#6556) 2021-06-09 09:22:43 -04:00
dependabot[bot]
b824dd3b47 build(deps): Bump codecov/codecov-action from 1.5.0 to 1.5.2 (#6559)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1.5.0 to 1.5.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1.5.0...v1.5.2)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-06-09 09:10:49 -04:00
dependabot[bot]
2b0955849e build(deps): Bump github.com/btcsuite/btcd (#6560)
Bumps [github.com/btcsuite/btcd](https://github.com/btcsuite/btcd) from 0.21.0-beta to 0.22.0-beta.
- [Release notes](https://github.com/btcsuite/btcd/releases)
- [Changelog](https://github.com/btcsuite/btcd/blob/master/CHANGES)
- [Commits](https://github.com/btcsuite/btcd/compare/v0.21.0-beta...v0.22.0-beta)

---
updated-dependencies:
- dependency-name: github.com/btcsuite/btcd
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-09 09:08:45 -04: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
dependabot[bot]
9c172a1be9 build(deps): Bump github.com/prometheus/client_golang (#6552)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.10.0 to 1.11.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/master/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.10.0...v1.11.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
2021-06-08 11:54:15 -04:00
Marko
2f6141645b metrics: change blocksize to a histogram (#6549)
## Description

Change block_size gauge to a histogram to observe block size overtime

This will help will see which chains have full blocks vs empty. 

closes #5752
2021-06-08 13:58:20 +00:00
Sam Kleinman
a855f96946 p2p: renames for reactors and routing layer internal moves (#6547) 2021-06-08 08:17:09 -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
7cc32f3f0f docs: logger updates (#6545)
## Description

Update for logging changes
2021-06-07 13:31:02 +00:00
Aleksandr Bezobchuk
3635c7a382 logger: refactor Tendermint logger by using zerolog (#6534) 2021-06-07 08:30:48 -04:00
dependabot[bot]
b28887e839 build(deps): Bump rtCamp/action-slack-notify from 2.1.3 to 2.2.0 (#6543)
Bumps [rtCamp/action-slack-notify](https://github.com/rtCamp/action-slack-notify) from 2.1.3 to 2.2.0.
- [Release notes](https://github.com/rtCamp/action-slack-notify/releases)
- [Commits](f565a63638...12e36fc18b)

---
updated-dependencies:
- dependency-name: rtCamp/action-slack-notify
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-06-07 11:08:48 +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
00c284d9d7 node: change package interface (#6540) 2021-06-04 11:36:30 -04:00
Callum Waters
08b134ddbc ws: parse remote addrs with trailing dash (#6537) 2021-06-04 17:07:50 +02:00
Marko
39ddfc24f4 test: add evidence hash testvectors (#6536)
## Description

Trying to debug a possible hashing issue, writing test vectors on 0.34 and then porting them to master to double-check it's not a hashing issue.
2021-06-04 14:22:42 +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
Marko
40fe4a3bf8 test: HeaderHash test vector (#6531)
## Decription

Tag teaming with callum on debugging, wrote this to test headerHash changes from 0.34 to master. Its useful going forward as well.
2021-06-03 12:42:06 +00: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
Cuong Manh Le
1f46a4c90e p2p/conn: check for channel id overflow before processing receive msg (#6522)
Per tendermint spec, each Channel has a globally unique byte id, which
is mapped to uint8 in Go. However, the proto PacketMsg.ChannelID field
is declared as int32, and when receive the packet, we cast it to a byte
without checking for possible overflow. That leads to a malform packet
with invalid channel id is sent successfully.

To fix it, we just add a check for possible overflow, and return invalid
channel id error.

Fixed #6521
2021-06-02 10:53:09 +00:00
Marko
96db0ae84a remove docs deployment (#6524) 2021-06-02 06:26:44 +00:00
Cuong Manh Le
915d9de91d p2p/pex: reuse hash.Hasher per addrbook for speed (#6509)
By pre-creating the hasher, instead of creating new one everytime
addrbook.hash is called.

```
name             old time/op    new time/op    delta
AddrBook_hash-8     181ns ±13%      80ns ± 1%  -56.08%  (p=0.000 n=10+10)

name             old alloc/op   new alloc/op   delta
AddrBook_hash-8      216B ± 0%        8B ± 0%  -96.30%  (p=0.000 n=10+10)

name             old allocs/op  new allocs/op  delta
AddrBook_hash-8      2.00 ± 0%      1.00 ± 0%  -50.00%  (p=0.000 n=10+10)
```

Fixed #6508
2021-06-01 16:38:36 +00:00
Aleksandr Bezobchuk
1e4bc04cd6 mempool: v1 implementation (#6466) 2021-06-01 11:17:45 -04:00
Marko
4e06dfef8c crypto/merkle: optimize merkle tree hashing (#6513)
## Description 

Upstream https://github.com/lazyledger/lazyledger-core/pull/351 to optimize merkle tree hashing 

### Benchmarking:

```
benchmark                                 old ns/op     new ns/op     delta
BenchmarkHashAlternatives/recursive-8     22914         21949         -4.21%
BenchmarkHashAlternatives/iterative-8     21634         21939         +1.41%

benchmark                                 old allocs     new allocs     delta
BenchmarkHashAlternatives/recursive-8     398            200            -49.75%
BenchmarkHashAlternatives/iterative-8     399            301            -24.56%

benchmark                                 old bytes     new bytes     delta
BenchmarkHashAlternatives/recursive-8     19088         6496          -65.97%
BenchmarkHashAlternatives/iterative-8     21776         13984         -35.78%
```

cc @odeke-em @cuonglm
2021-06-01 06:24:53 +00:00
JayT106
b4307ca7f4 tools: use os home dir to instead of the hardcoded PATH (#6498) 2021-05-31 18:22:55 +02:00
Callum Waters
e3d5a31d6e docs: rename tendermint-core to system (#6515) 2021-05-31 17:02:00 +02:00
Callum Waters
c0fcc5f6bb fix net_info call on light rpc (#6514) 2021-05-31 15:46:49 +02: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
Callum Waters
89b3b10740 docs: hide security page (second attempt) (#6511) 2021-05-31 12:00:14 +02:00
Emmanuel T Odeke
1e0efb6758 libs/log: use fmt.Fprintf directly with *bytes.Buffer to avoid unnecessary allocations (#6503)
Noticed from profiling that the loggers are memory hungry and alas,
we were passing fmt.Sprintf strings to (*bytes.Buffer).WriteString
which defeats the purpose of using fmt.* This change fixes that and
instead directly invokes fmt.Fprintf.
The benchmarks show the improvement:

```shell
$ benchstat before.txt after.txt
name                     old time/op    new time/op    delta
TMLoggerSimple-8           1.67µs ± 4%    1.69µs ±13%     ~     (p=0.118 n=20+19)
TMLoggerContextual-8       2.01µs ± 8%    1.94µs ± 1%   -3.79%  (p=0.000 n=18+20)
TMFmtLoggerSimple-8        1.20µs ± 3%    1.16µs ± 2%   -3.39%  (p=0.000 n=20+16)
TMFmtLoggerContextual-8    1.53µs ±19%    1.43µs ±13%   -6.10%  (p=0.001 n=20+20)

name                     old alloc/op   new alloc/op   delta
TMLoggerSimple-8             696B ± 0%      616B ± 0%  -11.49%  (p=0.000 n=20+20)
TMLoggerContextual-8       1.02kB ± 0%    0.94kB ± 0%   -7.87%  (p=0.000 n=20+20)
TMFmtLoggerSimple-8          240B ± 0%      160B ± 0%  -33.33%  (p=0.000 n=20+20)
TMFmtLoggerContextual-8      416B ± 0%      336B ± 0%  -19.23%  (p=0.000 n=20+20)

name                     old allocs/op  new allocs/op  delta
TMLoggerSimple-8             13.0 ± 0%      12.0 ± 0%   -7.69%  (p=0.000 n=20+20)
TMLoggerContextual-8         17.0 ± 0%      16.0 ± 0%   -5.88%  (p=0.000 n=20+20)
TMFmtLoggerSimple-8          6.00 ± 0%      5.00 ± 0%  -16.67%  (p=0.000 n=20+20)
TMFmtLoggerContextual-8      8.00 ± 0%      7.00 ± 0%  -12.50%  (p=0.000 n=20+20)
```

Fixes #6502
2021-05-28 17:27:47 +00:00