Commit Graph

358 Commits

Author SHA1 Message Date
Callum Waters
a2610a9998 lint 2022-10-26 17:07:23 +02:00
Callum Waters
67bc51ad72 split out node into a setup file 2022-10-26 16:45:27 +02:00
Rootul P
af2981a2f7 docs: remove outdated comment (#9597)
https://github.com/tendermint/tendermint/issues/8775 was resolved and backported so I think this comment is no longer applicable.
2022-10-24 08:19:23 +00:00
Thane Thomson
b7f1e1f218 config: Add missing storage section when generating config (#9483) 2022-09-23 12:19:49 +02:00
Callum Waters
a0ed437942 config: cleaner separation of tests (#9421) 2022-09-22 12:42:25 +02:00
Callum Waters
561440a56d config: add version to the config file (#9413) 2022-09-22 10:49:31 +02:00
Callum Waters
93ead3d0e5 remove fast sync deprecation warning (#9414) 2022-09-13 10:18:52 +02:00
Callum Waters
2ae117ef62 config: fix broken test (#9309) 2022-09-07 11:42:20 +02:00
Thane Thomson
cceea4de22 chore: Format and fix lints (#9336)
* make format

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

* Fix linting directives

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

* make mockery

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

* Appease CI linter

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

* Appease CI linter

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

Signed-off-by: Thane Thomson <connect@thanethomson.com>
2022-08-30 12:28:46 -04:00
samricotta
aa303edaef Forward port discard abci responses change (#9286)
* Backport of sam/abci-responses (#9090) (#9159)

Signed-off-by: Thane Thomson <connect@thanethomson.com>
Co-authored-by: William Banfield <4561443+williambanfield@users.noreply.github.com>
Co-authored-by: Thane Thomson <connect@thanethomson.com>
2022-08-22 12:53:01 +02:00
William Banfield
1069ffc6aa config: backport the rename of fastsync to blocksync (#9259)
This is largely a cherry pick of #6755 with some additional fixups added where detected. 
This change moves the blockchain package to a package called blocksync. Additionally, it renames the relevant uses of the term `fastsync` to `blocksync`.

closes: #9227 

#### PR checklist

- [ ] 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
2022-08-17 15:19:20 +00:00
Jacob Gadikian
a6dde14ec4 do not use ioutil (#9206) 2022-08-10 14:35:14 -04:00
Callum Waters
4206a0e9b7 remove v1 and v2 blocksync protocol impementations (#9146) 2022-08-02 11:30:28 +02:00
Callum Waters
49ec3b9780 chore: lint repo (use american english) (#9144) 2022-08-01 14:24:49 +02:00
M. J. Fromberger
2b3737333f config: remove obsolete mempool v1 warning (#8987) 2022-07-13 18:27:06 +02:00
Callum Waters
5e354a3a57 release: prepare v0.34.20-rc0 (#8888) 2022-06-27 18:44:21 +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
M. J. Fromberger
8a7affe3a0 Update default config docs for PSQL indexer settings. (#8728) 2022-06-08 13:59:49 -07:00
Thane Thomson
12e3419f2b rpc: Add experimental config params to allow for subscription buffer size control (tm v0.34.x) (#7230)
A workaround for #6729. Add parameters to control buffer sizes for
event subscription RPC clients. On some networks, buffering causes
clients to be dropped and/or events to be lost.

For additional context, see the discussion on #7188.

- Add experimental_subscription_buffer_size config parameter
- Add experimental_websocket_write_buffer_size config parameter
- Add experimental_close_on_slow_client config parameter

Co-authored-by: M. J. Fromberger <fromberger@interchain.io>
2021-11-09 12:35:45 -08:00
M. J. Fromberger
8ba6d218e4 Backport the psql indexer into v0.34.x (#6906)
This change backports the PostgreSQL indexing sink, addressing part of #6828.

Development on the main branch has diverged substantially since the v0.34.x
release. It includes package moves, breaking API and protobuf schema changes,
and new APIs, all of which together have a large footprint on the mapping
between the implementation at tip and the v0.34 release branch.

To avoid the need to retrofit all of those improvements, this change works by
injecting the new indexing sink into the existing (v0.34) indexing interfaces
by delegation. This means the backport does _not_ pull in all the newer APIs
for event handling, and thus has minimal impact on existing code written
against the v0.34 package structure.

This change includes the test for the `psql` implementation, and thus updates
some Go module dependencies. Because it does not interact with any other types,
however, I did not add any unit tests to other packages in this change.

Related changes:
 * Update module dependencies for psql backport.
 * Update test data to be type-compatible with the old protobuf types.
 * Add config settings for the PostgreSQL indexer.
 * Clean up some linter settings.
 * Hook up the psql indexer in the node main.
2021-09-07 18:57:44 -04:00
mergify[bot]
0712063ec8 config: add example on external_address (backport #6621) (#6624) 2021-06-30 15:52:19 +02:00
Callum Waters
d515bbcf1d statesync: increase chunk priority and robustness (#6582) 2021-06-18 09:59:52 +02:00
mergify[bot]
be8c9833ca state sync: tune request timeout and chunkers (backport #6566) (#6581)
* state sync: tune request timeout and chunkers (#6566)

(cherry picked from commit 7d961b55b2)

# Conflicts:
#	CHANGELOG_PENDING.md
#	config/config.go
#	internal/statesync/reactor.go
#	internal/statesync/reactor_test.go
#	node/node.go
#	statesync/syncer.go

* fix build

* fix config

* fix config

Co-authored-by: Aleksandr Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Aleksandr Bezobchuk <aleks.bezobchuk@gmail.com>
2021-06-15 15:10:16 -04:00
mergify[bot]
1614e12035 statesync: improve e2e test outcomes (backport #6378) (#6380)
(cherry picked from commit d36a5905a6)

Co-authored-by: Sam Kleinman <garen@tychoish.com>
2021-04-21 12:30:17 -04: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
Tess Rinearson
0def3a964a config: fix mispellings (#5914)
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
2021-01-19 12:58:35 +01:00
Anton Kaliaev
dc101f2eff mempool: disable MaxBatchBytes (#5800)
@p4u from vocdoni.io reported that the mempool might behave incorrectly under a
high load. The consequences can range from pauses between blocks to the peers
disconnecting from this node.

My current theory is that the flowrate lib we're using to control flow
(multiplex over a single TCP connection) was not designed w/ large blobs
(1MB batch of txs) in mind.

I've tried decreasing the Mempool reactor priority, but that did not
have any visible effect. What actually worked is adding a time.Sleep
into mempool.Reactor#broadcastTxRoutine after an each successful send ==
manual control flow of sort.

As a temporary remedy (until the mempool package
is refactored), the max-batch-bytes was disabled. Transactions will be sent
one by one without batching

Closes #5796
2020-12-21 20:29:31 +04:00
Anton Kaliaev
dc90cf60d5 mempool: introduce KeepInvalidTxsInCache config option (#5813)
When set to true, an invalid transaction will be kept in the cache (this may help some applications to protect against spam).

NOTE: this is a temporary config option. The more correct solution would be to add a TTL to each transaction (i.e. CheckTx may return a TTL in ResponseCheckTx).

Closes: #5751
2020-12-21 20:29:14 +04:00
Callum Waters
7d5d417dc9 evidence: use bytes instead of quantity to limit size (#5449)(#5476) 2020-10-08 14:38:11 +02:00
Erik Grinaker
1a2cc933a0 config: set statesync.rpc_servers when generating config file (#5433) (#5438)
Required for #5291, to generate configuration files with state sync RPC servers.
2020-10-01 15:55:57 +02:00
Erik Grinaker
f83ecdad1d config: add state sync discovery_time setting (#5399)
Reduces the state sync discovery time from 20 to 15 seconds, and makes it configurable.
2020-09-24 16:01:45 +02:00
Anton Kaliaev
ffe2742a6c mempool: batch txs per peer in broadcastTxRoutine (#5321)
Closes #625
2020-09-23 14:13:13 +04:00
Anton Kaliaev
4b99502d5b config: set time_iota_ms to timeout_commit in test genesis (#5386)
also, document consensus parameters.
https://forum.cosmos.network/t/consensus-timeouts-explained/1421

Closes #4489
2020-09-23 12:24:45 +04:00
Anton Kaliaev
43c3e4265b config: rename prof_laddr to pprof_laddr and move it to rpc (#5315)
* config: rename prof_laddr to pprof_laddr and move it to rpc

also, remove `/unsafe_start_cpu_profiler`, `/unsafe_stop_cpu_profiler`
and `/unsafe_write_heap_profile` in favor of pprof server functionality.

Closes #5303

* update changelog

* log start
2020-09-01 11:54:21 +04:00
Marko
0fafffcd5a config: trust period consistency (#5297)
## Description

make state sync trust period consistent with the default in the `tendermint light` cmd

Closes: #XXX
2020-08-27 14:44:47 +00:00
dongsam
e30b125725 consensus: double-sign risk reduction (ADR-51) (#5147)
Implementation spec of Double Signing Risk Reduction [ADR-51](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-051-double-signing-risk-reduction.md) by B-Harvest
- Add `DoubleSignCheckHeight` config variable to ConsensusConfig for "How many blocks looks back to check existence of the node's consensus votes when before joining consensus"
- Add `consensus.double_sign_check_height` to `config.toml` and `tendermint node` as flag for set `DoubleSignCheckHeight`
- Set default `consensus.double_sign_check_height` to `0`  ( it could be adjustable in this PR, disable when 0  )

Refs

- [ADR-51](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-051-double-signing-risk-reduction.md)
- [https://github.com/tendermint/tendermint/issues/4059](https://github.com/tendermint/tendermint/issues/4059)
- [https://github.com/tendermint/tendermint/pull/4262](https://github.com/tendermint/tendermint/pull/4262)
2020-08-27 08:57:36 +04:00
Erik Grinaker
b1b82c493a db: add support for badgerdb (#5233)
* db: add support for badgerdb

* add badgerdb comment for Config.DBBackend
2020-08-12 13:23:57 +00:00
Erik Grinaker
cc247c091b genesis: add support for arbitrary initial height (#5191)
Adds a genesis parameter `initial_height` which specifies the initial block height, as well as ABCI `RequestInitChain.InitialHeight` to pass it to the ABCI application, and `State.InitialHeight` to keep track of the initial height throughout the code. Fixes #2543, based on [RFC-002](https://github.com/tendermint/spec/pull/119). Spec changes in https://github.com/tendermint/spec/pull/135.
2020-08-11 17:03:28 +00:00
Marko
7e2cc1db5e linter: (1/2) enable errcheck (#5064)
## Description

partially cleanup in preparation for errcheck

i ignored a bunch of defer errors in tests but with the update to go 1.14 we can use `t.Cleanup(func() { if err := <>; err != nil {..}}` to cover those errors, I will do this in pr number two of enabling errcheck.

ref #5059
2020-07-01 15:13:11 +00:00
Marko
5412426ae8 indexer: remove index filtering (#5006)
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-06-23 17:42:10 +02:00
Marko
74cae49c3b proto: leftover amino (#4986) 2020-06-15 11:14:36 +02:00
Marko
a057da6ab5 toml: make sections standout (#4993)
## Description

make sections in the toml standout.

Making this PR as I found it hard to find different sections on the `config.toml` when it was generated. This makes it somewhat simpler

Closes: #XXX
2020-06-10 17:49:27 +00:00
Marko
a89f2581fc blockchain: proto migration (#4969)
## Description

migration of blockchain reactors to protobuf

Closes: #XXX
2020-06-08 12:45:03 +00:00
Marko
a88537bb88 ints: stricter numbers (#4939) 2020-06-04 16:34:56 +02:00
Marko
e4427b7292 linting: remove unused variable
## Description

left over variable
2020-04-30 11:39:42 +00:00
Erik Grinaker
511ab6717c add state sync reactor (#4705)
Fixes #828. Adds state sync, as outlined in [ADR-053](https://github.com/tendermint/tendermint/blob/master/docs/architecture/adr-053-state-sync-prototype.md). See related PRs in Cosmos SDK (https://github.com/cosmos/cosmos-sdk/pull/5803) and Gaia (https://github.com/cosmos/gaia/pull/327).

This is split out of the previous PR #4645, and branched off of the ABCI interface in #4704. 

* Adds a new P2P reactor which exchanges snapshots with peers, and bootstraps an empty local node from remote snapshots when requested.

* Adds a new configuration section `[statesync]` that enables state sync and configures the light client. Also enables `statesync:info` logging by default.

* Integrates state sync into node startup. Does not support the v2 blockchain reactor, since it needs some reorganization to defer startup.
2020-04-29 10:47:00 +02:00
Anton Kaliaev
f31f4327b5 privval: remove deprecated OldFilePV
The old format was deprecated in v0.28. It's time we remove it.
2020-04-28 08:51:51 +00:00
Erik Grinaker
f51ca72b24 config: allow fastsync.version = v2 (#4639) 2020-04-04 14:33:50 +00:00
Erik Grinaker
4298bbcc4e add support for block pruning via ABCI Commit response (#4588)
* Added BlockStore.DeleteBlock()

* Added initial block pruner prototype

* wip

* Added BlockStore.PruneBlocks()

* Added consensus setting for block pruning

* Added BlockStore base

* Error on replay if base does not have blocks

* Handle missing blocks when sending VoteSetMaj23Message

* Error message tweak

* Properly update blockstore state

* Error message fix again

* blockchain: ignore peer missing blocks

* Added FIXME

* Added test for block replay with truncated history

* Handle peer base in blockchain reactor

* Improved replay error handling

* Added tests for Store.PruneBlocks()

* Fix non-RPC handling of truncated block history

* Panic on missing block meta in needProofBlock()

* Updated changelog

* Handle truncated block history in RPC layer

* Added info about earliest block in /status RPC

* Reorder height and base in blockchain reactor messages

* Updated changelog

* Fix tests

* Appease linter

* Minor review fixes

* Non-empty BlockStores should always have base > 0

* Update code to assume base > 0 invariant

* Added blockstore tests for pruning to 0

* Make sure we don't prune below the current base

* Added BlockStore.Size()

* config: added retain_blocks recommendations

* Update v1 blockchain reactor to handle blockstore base

* Added state database pruning

* Propagate errors on missing validator sets

* Comment tweaks

* Improved error message

Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com>

* use ABCI field ResponseCommit.retain_height instead of retain-blocks config option

* remove State.RetainHeight, return value instead

* fix minor issues

* rename pruneHeights() to pruneBlocks()

* noop to fix GitHub borkage

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
2020-04-03 08:38:32 +00:00
Marko
18d44a0186 blockchain: enable v2 to be set (#4597)
* blockchain: enable v2 to be set

- enable v2 to be set via config params

Signed-off-by: Marko Baricevic <marbar3778@yahoo.com>

* replace tab with space

* correctly spell usability
2020-03-23 19:12:31 +00:00