Commit Graph

8933 Commits

Author SHA1 Message Date
Marko
ad0c115839 tools: remove k8s (#6625)
## Description

Remove mintnet as discussed on team call. 

closes #1941
2021-06-28 17:11:00 +00:00
dependabot[bot]
98a249c0ea build(deps): Bump github.com/spf13/viper from 1.8.0 to 1.8.1 (#6622)
Bumps [github.com/spf13/viper](https://github.com/spf13/viper) from 1.8.0 to 1.8.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/spf13/viper/releases">github.com/spf13/viper's releases</a>.</em></p>
<blockquote>
<h2>v1.8.1</h2>
<p>This patch releases fixes two minor issues:</p>
<ul>
<li>Replace <code>%s</code> with <code>%w</code> when wrapping errors</li>
<li>Fix <code>pflag.StringArray</code> processing</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="bd03865899"><code>bd03865</code></a> Add a proper processing for pflag.StringArray</li>
<li><a href="3fcad43618"><code>3fcad43</code></a> update %s to %w</li>
<li>See full diff in <a href="https://github.com/spf13/viper/compare/v1.8.0...v1.8.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=github.com/spf13/viper&package-manager=go_modules&previous-version=1.8.0&new-version=1.8.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
2021-06-28 14:47:25 +00:00
Tanya Bouman
09ec247646 cmd/tendermint/commands: replace $HOME/.some/test/dir with t.TempDir (#6623)
* cmd/tendermint/commands: replace $HOME/.some/test/dir with t.TempDir

* update changelog

Co-authored-by: Marko <marbar3778@yahoo.com>
2021-06-28 14:38:15 +00:00
Marko
7eef4d7ac2 config: add example on external_address (#6621)
## Description

It confused many people what they were supposed to add here. For chains with large genesis files you will only see the error after Initgenesis. Best to add a small sentence to provide better UX
2021-06-28 14:22:48 +00:00
JayT106
11a71c228c state/privval: no GetPubKey retry beyond the proposal/voting window (#6578)
Closes #5142
2021-06-28 13:50:25 +00:00
Yawning Angel
c5cc3c8d3f crypto: Use a different library for ed25519/sr25519 (#6526)
At Oasis we have spend some time writing a new Ed25519/X25519/sr25519 implementation called curve25519-voi.  This PR switches the import from ed25519consensus/go-schnorrkel, which should lead to performance gains on most systems.

Summary of changes:
 * curve25519-voi is now used for Ed25519 operations, following the existing ZIP-215 semantics.
 * curve25519-voi's public key cache is enabled (hardcoded size of 4096 entries, should be tuned, see the code comment) to accelerate repeated Ed25519 verification with the same public key(s).
 * (BREAKING) curve25519-voi is now used for sr25519 operations.  This is a breaking change as the current sr25519 support does something decidedly non-standard when going from a MiniSecretKey to a SecretKey and or PublicKey (The expansion routine is called twice).  While I believe the new behavior (that expands once and only once) to be more "correct", this changes the semantics as implemented.
 * curve25519-voi is now used for merlin since the included STROBE implementation produces much less garbage on the heap.

Side issues fixed:
 * The version of go-schnorrkel that is currently imported by tendermint has a badly broken batch verification implementation.  Upstream has fixed the issue after I reported it, so the version should be bumped in the interim.

Open design questions/issues:
 * As noted, the public key cache size should be tuned.  It is currently backed by a trivial thread-safe LRU cache, which is not scan-resistant, but replacing it with something better is a matter of implementing an interface.
 * As far as I can tell, the only reason why serial verification on batch failure is necessary is to provide more detailed error messages (that are only used in some unit tests).  If you trust the batch verification to be consistent with serial verification then the fallback can be eliminated entirely (the BatchVerifier provided by the new library supports an option that omits the fallback if this is chosen as the way forward).
 * curve25519-voi's sr25519 support could use more optimization and more eyes on the code.  The algorithm unfortunately is woefully under-specified, and the implementation was done primarily because I got really sad when I actually looked at go-schnorrkel, and we do not use the algorithm at this time.
2021-06-26 16:53:30 +00:00
JayT106
167fa738a3 rpc: re-index missing events (#6535) 2021-06-25 09:14:37 -04:00
Sam Kleinman
917180dfd2 p2p: reduce buffering on channels (#6609)
Having smaller buffers in each reactor/channel will mean that there will be fewer stale messages.
2021-06-24 20:38:35 +00:00
crypto-facs
10d174adcc rpc: Add TotalGasUsed to block_results response (#6615)
Closes #6551 

Simple PR to add the total gas used in the block by adding the gas used in all the transactions. 
This adds a `TotalGasUsed` field to `coretypes.ResultBlockResults`.

Its my first PR to the repo so let me know if there is anything I am missing!

@fedekunze In case you want to take a look
2021-06-24 17:47:41 +00:00
Sam Kleinman
9ffa7e8a2b types: move NodeInfo from p2p (#6618) 2021-06-24 12:18:19 -04:00
JayT106
2cc872543b rpc: add max peer block height into /status rpc call (#6610)
use  `maxPeerBlockHeight` information to show the current network's best height.

Closes #3983
Relate to #3365

ref: the`highestBlock` in the response of `eth.isSyncing` call
https://web3js.readthedocs.io/en/v1.3.4/web3-eth.html#issyncing
2021-06-24 15:11:10 +00:00
Sam Kleinman
ae5f98881b p2p: make NodeID and NetAddress public (#6583) 2021-06-24 09:59:14 -04:00
dependabot[bot]
4c30f084da build(deps): Bump docker/login-action from 1.9.0 to 1.10.0 (#6614)
Bumps [docker/login-action](https://github.com/docker/login-action) from 1.9.0 to 1.10.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v1.9.0...v1.10.0)

---
updated-dependencies:
- dependency-name: docker/login-action
  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-24 13:19:28 +00:00
JayT106
2b0a3c151b fastsync: update the metrics during fast-sync (#6590)
Closes #3507
2021-06-23 08:00:24 +00:00
Callum Waters
6e238b5b9d statesync: make fetching chunks more robust (#6587) 2021-06-21 10:14:15 -04:00
Sam Kleinman
144af9a81a rpc: use shorter path names for tests (#6602) 2021-06-21 09:44:49 -04:00
Sam Kleinman
bed58a749f p2p: address audit issues with the peer manager (#6603) 2021-06-21 08:57:48 -04:00
Sam Kleinman
5f553bb3ee changelog: update and regularize changelog entries (#6594) 2021-06-18 09:57:32 -04:00
Callum Waters
e8f38e3260 changelog: have a single friendly bug bounty reminder (#6600) 2021-06-18 14:07:36 +02:00
Callum Waters
6ade17997c release: update changelog and version (#6599) 2021-06-18 12:54:06 +02:00
Sam Kleinman
a6b30faf35 libs/time: move types/time into libs (#6595) 2021-06-17 16:02:31 -04:00
Sam Kleinman
09a409df9c libs/log: text logging format changes (#6589) 2021-06-17 13:17:03 -04:00
Sam Kleinman
d228afc548 p2p: avoid retry delay in error case (#6591) 2021-06-16 17:06:00 -04:00
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