1129 Commits

Author SHA1 Message Date
William Banfield
e7b9ee7cef add allocate in Receive calls (#9667) 2022-11-04 14:04:35 -04:00
mergify[bot]
bdedf2ec20 p2p: add a per-message type send and receive metric (backport #9622) (#9641)
* p2p: add a per-message type send and receive metric (#9622)

* p2p: ressurrect the p2p envelope and use to calculate message metric

Add new SendEnvelope, TrySendEnvelope, BroadcastEnvelope, and ReceiveEnvelope methods in the p2p package to work with the new envelope type.

Care was taken to ensure this was performed in a non-breaking manner.

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: William Banfield <wbanfield@gmail.com>
2022-11-01 16:12:54 -04:00
mergify[bot]
e914fe40ec ci: Fix linter complaint (backport #9645) (#9647)
* ci: Fix linter complaint (#9645)

Fixes a very silly linter complaint that makes absolutely no sense and is blocking the merging of several PRs.

---

#### PR checklist

- [x] Tests written/updated, or no tests needed
- [x] `CHANGELOG_PENDING.md` updated, or no changelog entry needed
- [x] Updated relevant documentation (`docs/`) and code comments, or no
      documentation updates needed

(cherry picked from commit 83b7f4ad5b)

# Conflicts:
#	.github/workflows/lint.yml
#	.golangci.yml
#	cmd/tendermint/commands/debug/util.go

* Resolve conflicts

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* ci: Sync golangci-lint config with main

Minus the spelling configuration that restricts spelling to US English
only.

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* make format

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove usage of deprecated io/ioutil package

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Remove unused mockBlockStore

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* blockchain/v2: Remove unused method

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Bulk fix lints

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* lint: Ignore auto-generated query PEG

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
2022-10-29 08:58:18 -04:00
Thane Thomson
eed27addec docs: Update v0.34.x to prepare for v0.37 (#9244)
* Ignore generated/copied RPC docs

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync vuepress config with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs package-lock.json with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs redirects with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs versions with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update OpenAPI version to v0.34

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync DOCS_README with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update all v0.34.x docs references from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update v0.34 OpenAPI references from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update repo doc links from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update code comment references from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update repo root doc links from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update repo root doc links for docs.tendermint.com from master to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Build v0.34.x as "latest"

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Explicitly mark v0.34 docs as latest in version selector

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Add nav link to main and clearly mark as unstable

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Direct all docs.tendermint.com links to v0.34 on v0.34.x

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update all relevant links on v0.34.x branch to be v0.34-specific

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update changelog refs to docs.tendermint.com

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Update remaining GH master link to main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Sync docs build and nav config with main

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Migrate spec links to GitHub repo from docs site

Signed-off-by: Thane Thomson <connect@thanethomson.com>

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-08-19 07:20:32 -04:00
samricotta
dad439f115 Bump linter to 1.47 (#9218)
*bump linter to 1.47

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-08-11 15:53:17 +02:00
samricotta
fbd754b4de Backport of sam/abci-responses (#9090) (#9159)
*backport of sam/abci-responses

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
2022-08-11 10:41:41 +02:00
Aleksandr Bezobchuk
6b7d30cf37 feat: v0.34.x Prioritized Mempool (#8695)
* Updated mocks

* add reactor tests

* add v1 reactor tests

* Fix fuzz test for priority mempool

* e2e adapted to mempool v1; prio pool is default now

* Reverted default mempool to be fifo

* Changed buf version

* Added priority mempool to ci testnet

* Fixed linter

* Updated makefile

* Aligned makefile changes to v0.34.x

* Added go install for proto

* Add log message to warn about prioritized mempool bug

Signed-off-by: Thane Thomson <connect@thanethomson.com>

* Changelog message

Co-authored-by: Jasmina Malicevic <jasmina.dustinac@gmail.com>
Co-authored-by: Callum Waters <cmwaters19@gmail.com>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
2022-06-27 11:34:28 +02:00
Joe Abbey
4a1df4911d fix: "Lazy" Stringers to defer Sprintf and Hash until logs print (#8845) 2022-06-23 14:56:34 -04:00
William Banfield
799489e474 consensus: change lock to handle panics (#8237) 2022-04-01 14:43:20 -04:00
William Banfield
4b5472c387 consensus: change lock handling in reactor for RoundState (#7994)
This change updates the lock handling in the consensus reactor. The consensus reactor now periodically fetches the RoundState and the gossip routines operate on this fetched copy instead of fetching the latest copy in each iteration of the gossip routine.
2022-03-09 17:38:57 -05:00
William Banfield
fd3bfb38e7 consensus: change lock handling in 'handleMsg' method (#7992)
* change lock handling in consensus state file

* add comment explaining the unlock

* comment fix

* Update consensus/state.go

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>

* spelling fix

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2022-03-09 12:57:55 -05:00
William Banfield
a97bb37d44 consensus: start the timeout ticker before replay (backport #7844) (#8079)
Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
Co-authored-by: Sam Kleinman <garen@tychoish.com>
2022-03-08 10:55:28 -05:00
mergify[bot]
80f656d8d7 consensus: check proposal non-nil in prevote message delay metric (backport #7625) (#7631)
* consensus: check proposal non-nil in prevote message delay metric (#7625)

(cherry picked from commit b6307c42e0)

# Conflicts:
#	consensus/state.go

* fix merge conflicts

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: William Banfield <wbanfield@gmail.com>
2022-01-19 13:16:03 -05:00
mergify[bot]
f36cc80568 consensus: calculate prevote message delay metric (backport #7551) (#7617)
* consensus: calculate prevote message delay metric (#7551)

## What does this pull request do?
This pull requests adds two metrics intended for use in calculating an experimental value for `MessageDelay`.

The metrics are as follows:
```
# HELP tendermint_consensus_complete_prevote_message_delay Difference in seconds between the proposal timestamp and the timestamp of the prevote that achieved 100% of the voting power in the prevote step.
# TYPE tendermint_consensus_complete_prevote_message_delay gauge
tendermint_consensus_complete_prevote_message_delay{chain_id="test-chain-aZbwF1"} 0.013025505

# HELP tendermint_consensus_quorum_prevote_message_delay Difference in seconds between the proposal timestamp and the timestamp of the prevote that achieved a quorum in the prevote step.
# TYPE tendermint_consensus_quorum_prevote_message_delay gauge
tendermint_consensus_quorum_prevote_message_delay{chain_id="test-chain-aZbwF1"} 0.013025505
```

## Why this change?

 For more information on what these metrics are calculating, see #7202. The aim is to merge to backport these metrics to v0.34 and run nodes on a few popular chains with these metrics to determine the experimental values for `MessageDelay` on these popular chains and use these to select our default `SynchronyParams.MessageDelay` value.

## Why Gauges for the metrics?
Gauges allow us to overwrite the metric on each successive observation. We can then capture these metrics over time to track the highest and lowest observed value.

(cherry picked from commit 0c82ceaa5f)

# Conflicts:
#	consensus/metrics.go
#	consensus/state.go

* fix merge conflicts

Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: William Banfield <wbanfield@gmail.com>
2022-01-19 12:10:18 -05:00
Marko
b14dc70664 Reduce p2p log noise (#7465)
* reduce some logs

* reduce error logs

* remove debug
2021-12-17 11:32:08 +01:00
dependabot[bot]
d0031b0503 build(deps): Bump github.com/go-kit/kit from 0.10.0 to 0.12.0 (#7213)
* build(deps): Bump github.com/go-kit/kit from 0.10.0 to 0.12.0

Bumps [github.com/go-kit/kit](https://github.com/go-kit/kit) from 0.10.0 to 0.12.0.
- [Release notes](https://github.com/go-kit/kit/releases)
- [Commits](https://github.com/go-kit/kit/compare/v0.10.0...v0.12.0)

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

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

* add nolint

* fix lint

* fix build

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: tycho garen <garen@tychoish.com>
2021-11-08 14:39:00 -05:00
Sam Kleinman
4ef140f6ca lint: cleanup pending lint errors (#7237) 2021-11-04 08:08:55 -04:00
mergify[bot]
a82cb7dcda Revert "abci: change client to use multi-reader mutexes (#6306)" (backport #7106) (#7109) 2021-10-12 18:00:22 +02:00
mergify[bot]
e0c6199aae abci: change client to use multi-reader mutexes (backport #6306) (#6873) 2021-08-30 11:57:39 -04:00
mergify[bot]
0c05841902 internal/consensus: update error log (#6863) (#6867)
Issues reported in Osmosis, where the message is extremely long. Also, there is absolutely no reason to log the message IMO. If we must, we can make the message log DEBUG.

(cherry picked from commit 58a6cfff9a)

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
2021-08-26 09:35:26 -04:00
mergify[bot]
6fde228e9d state/privval: vote timestamp fix (backport #6748) (#6783) 2021-07-30 17:48:49 +02:00
mergify[bot]
0682337de2 logging: shorten precommit log message (#6270) (#6274)
This is an attempt to clean up the logging message as requested in #6269.

(cherry picked from commit 3f9066b290)

Co-authored-by: Sam Kleinman <garen@tychoish.com>
2021-03-25 16:19:50 -04:00
mergify[bot]
d004a584f8 use error.Is to check for nondeterminstic vote error type (#6237) (#6239)
(cherry picked from commit bf8cce83db)

Co-authored-by: Callum Waters <cmwaters19@gmail.com>
2021-03-15 11:20:33 +01:00
mergify[bot]
a047a4a70f logs: cleanup (#6198)
Co-authored-by: Marko <marbar3778@yahoo.com>
2021-03-04 10:42:19 +00:00
mergify[bot]
0191a22636 state executor: groom logs (bp #6152) (#6172) 2021-02-24 09:50:46 -05:00
mergify[bot]
a0f376127d consensus: more log grooming (bp #6140) (#6143) 2021-02-18 14:23:12 -05:00
Tess Rinearson
53d40e1092 consensus: remove privValidator from log call (#6128) 2021-02-18 01:47:55 +01:00
Aleksandr Bezobchuk
bedb00d252 consensus: Groom Logs (#5917)
Executed a local network using simapp and looked for logs that seemed superfluous. This isn't by any means an exhaustive grooming, but should drastically help legibility of logs.

ref: #5912
2021-02-17 10:05:13 +00:00
Callum Waters
fbf2c3815d check block store base is non negative before sending block meta or commits (#6042) 2021-02-11 17:29:52 +01:00
Anton Kaliaev
72851a12d3 libs/log: format []byte as hexidecimal string (uppercased) (#5960)
Closes: #5806

Co-authored-by: Lanie Hei <heixx011@umn.edu>
2021-02-11 17:02:38 +01:00
Callum
a2a6852ab9 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
Erik Grinaker
15eed81f12 test/consensus: improve WaitGroup handling in Byzantine tests (#5861)
Fixes #5845.
2021-01-06 17:27:51 +01:00
Anton Kaliaev
b1328db07f modify Reactor priorities (#5826) (#5830)
blockchain/vX reactor priority was decreased because during the normal operation
(i.e. when the node is not fast syncing) blockchain priority can't be
the same as consensus reactor priority. Otherwise, it's theoretically possible to
slow down consensus by constantly requesting blocks from the node.

NOTE: ideally blockchain/vX reactor priority would be dynamic. e.g. when
the node is fast syncing, the priority is 10 (max), but when it's done
fast syncing - the priority gets decreased to 5 (only to serve blocks
for other nodes). But it's not possible now, therefore I decided to
focus on the normal operation (priority = 5).

evidence and consensus critical messages are more important than
the mempool ones, hence priorities are bumped by 1 (from 5 to 6).

statesync reactor priority was changed from 1 to 5 to be the same as
blockchain/vX priority.

Refs https://github.com/tendermint/tendermint/issues/5816
2020-12-23 18:05:14 +01:00
Tess Rinearson
0d9606e1b4 reactors: omit incoming message bytes from reactor logs (#5743)
After a reactor has failed to parse an incoming message, it shouldn't output the "bad" data into the logs, as that data is unfiltered and could have anything in it. (We also don't think this information is helpful to have in the logs anyways.)
2020-12-04 12:18:14 +01:00
Erik Grinaker
ce144a1d71 test: fix TestByzantinePrevoteEquivocation flake (#5710)
This fixes spurious `TestByzantinePrevoteEquivocation` failures by extending the block range and time spent waiting for evidence. I've seen many runs where the evidence isn't committed until e.g. height 27. Haven't looked into _why_ this happens, but as long as the evidence is committed eventually and the test doesn't spuriously fail I'm (mostly) happy. WDYT @cmwaters?
2020-11-30 11:30:40 +01:00
Callum Waters
9d354c842e evidence: structs can independently form abci evidence (#5610) 2020-11-05 10:38:42 +01:00
Callum Waters
4947333e67 evidence: don't gossip consensus evidence too soon (#5528)
and don't return errors on seeing the same evidence twice
2020-10-28 09:10:53 +01:00
Marko
9379bc92fd fix lint failures with 1.31 (#5489) 2020-10-22 13:36:08 +02:00
QuantumExplorer
1b733ea28d fix a few typos (#5402) 2020-10-22 13:36:08 +02:00
Erik Grinaker
7c17fa115a consensus: open target WAL as read/write during autorepair (#5536) (#5547)
Fixes #5422. That turned out to be a whole lot easier than expected.

Backport of #5536.
2020-10-21 18:24:38 +02:00
Callum Waters
7d5d417dc9 evidence: use bytes instead of quantity to limit size (#5449)(#5476) 2020-10-08 14:38:11 +02:00
Callum Waters
52994aa2a9 consensus: check block parts don't exceed maximum block bytes (#5436) 2020-10-01 16:11:54 +02:00
Erik Grinaker
58b4deca86 blockstore: fix race conditions when loading data (#5382)
Fixes #5377 and comments in #4588 (review).
2020-09-23 10:13:43 +04:00
Callum Waters
ed002cea7e evidence: introduction of LightClientAttackEvidence and refactor of evidence lifecycle (#5361)
evidence: modify evidence types (#5342)

light: detect light client attacks (#5344)

evidence: refactor evidence pool (#5345)

abci: application evidence prepared by evidence pool (#5354)
2020-09-22 10:22:54 +02:00
Marko
56911ee352 state: define interface for state store (#5348)
## Description

Make an interface for the state store. 

Closes: #5213
2020-09-15 07:45:48 +00:00
Marko
0ed8dba991 lint: enable errcheck (#5336)
## Description

Enable errcheck linter throughout the codebase

Closes: #5059
2020-09-07 15:03:18 +00:00
Callum Waters
3359e0bf2f resurrect consensus tests (#5334) 2020-09-07 09:54:13 +04:00
Marko
b8d08b9ef4 lint: add errchecks (#5316)
## Description

Work towards enabling errcheck

ref #5059
2020-09-04 11:58:03 +00:00
Marko
4787c5b61a metrics: switch from gauge to histogram (#5326)
## Description

Part of the issue is to add metrics to the websocket connection. It seems this would require some moving around of things in the node pkg. I opted to not make this change now, and wait for when we do a node pkg refactor. 

If someone disagrees with this appraoch please let me know, I can attempt to get metrics into the rpc layer.

There is not a need to update documentation as it already states this metric is a histogram..

Closes: #1791
2020-09-03 13:08:13 +00:00
Erik Grinaker
63ea4f1d26 consensus: fix wrong proposer schedule for InitChain validators (#5329)
Fixes #5328.
2020-09-03 12:58:09 +00:00