Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pull changes from upstream master #629

Closed
wants to merge 313 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
313 commits
Select commit Hold shift + click to select a range
5e4f3c4
build(deps): Bump github.com/tendermint/tm-db from 0.6.4 to 0.6.6 (#7…
dependabot[bot] Nov 16, 2021
2492b6c
proto: rebuild the proto files from the spec repository (#7291)
williambanfield Nov 17, 2021
458896f
service: remove stop method and use contexts (#7292)
tychoish Nov 18, 2021
0c340e1
service: remove quit method (#7293)
tychoish Nov 19, 2021
10061ac
build: update location of proto builder image (#7296)
Nov 19, 2021
90d3bb1
docs: add abci timing metrics to the metrics docs (#7311)
williambanfield Nov 23, 2021
060598a
Update example code in OpenAPI docs. (#7318)
Nov 25, 2021
6c80f13
docs: go tutorial fixed for 0.35.0 version (#7329) (#7330)
ppedziwiatr Nov 27, 2021
92f107e
Performance improvements for the event query API (#7319)
Nov 29, 2021
77f30ce
adr: lib2p implementation plan (#7282)
tychoish Nov 29, 2021
9edadca
build(deps-dev): Bump watchpack from 2.2.0 to 2.3.0 in /docs (#7335)
dependabot[bot] Nov 29, 2021
2d478e7
Remove the PEG query implementation. (#7336)
Nov 29, 2021
120094d
Add pending change log entry for #7319. (#7339)
Nov 30, 2021
1ea1ea5
eventbus: plumb contexts (#7337)
tychoish Nov 30, 2021
b070bc2
pubsub: Make the queue unwritable after shutdown. (#7316)
Nov 30, 2021
ffb49a6
lint: remove lll check (#7346)
tychoish Nov 30, 2021
b0e8273
e2e: control access to state in Info calls (#7345)
tychoish Nov 30, 2021
ba4a26d
e2e: more clear height test (#7347)
tychoish Nov 30, 2021
ff82953
pex: improve goroutine lifecycle (#7343)
tychoish Nov 30, 2021
595b116
e2e: stabilize validator update form (#7340)
tychoish Nov 30, 2021
1efe094
e2e: clarify apphash reporting (#7348)
tychoish Nov 30, 2021
2b480a2
e2e: generate keys for more stable load (#7344)
tychoish Nov 30, 2021
6b71389
Fix incorrect tests using the PSQL sink. (#7349)
Nov 30, 2021
3aaa358
Remove now-unused nolint:lll directives. (#7356)
Nov 30, 2021
7c8ecf9
p2p: remove unused trust package (#7359)
tychoish Nov 30, 2021
bcc4f2f
service: cleanup base implementation and some caller implementations …
tychoish Dec 1, 2021
8260667
tools/tm-signer-harness: switch to not use hardcoded bytes for config…
williambanfield Dec 1, 2021
a81dc3d
rpc: implement header and header_by_hash queries (#7270)
fedekunze Dec 2, 2021
a7ea6f7
cmd: add integration test and fix bug in rollback command (#7315)
cmwaters Dec 2, 2021
d200649
tools: remove tm-signer-harness (#7370)
tychoish Dec 2, 2021
e52face
ci: move test execution to makefile (#7372)
tychoish Dec 2, 2021
f592758
service: plumb contexts to all (most) threads (#7363)
tychoish Dec 2, 2021
9befed1
Revert CI test timeout. (#7375)
Dec 3, 2021
697fe2e
p2p/upnp: remove unused functionality (#7379)
tychoish Dec 3, 2021
6bf80de
p2p: implement interface for p2p.Channel without channels (#7378)
tychoish Dec 3, 2021
e2fd783
service: remove exported logger from base implemenation (#7381)
tychoish Dec 6, 2021
cb8769f
Update mergify configuration. (#7385)
Dec 6, 2021
aa07878
Update Mergify configuration. (#7388)
Dec 6, 2021
1d82c73
ci: cleanup build/test targets (#7393)
tychoish Dec 7, 2021
6b0749a
ci: fix missing dependency (#7396)
tychoish Dec 7, 2021
386abea
p2p: remove unneeded close channels from p2p layer (#7392)
tychoish Dec 7, 2021
1367465
ci: skip docker image builds during PRs (#7397)
tychoish Dec 7, 2021
7bbf49f
service: cleanup close channel in reactors (#7399)
tychoish Dec 7, 2021
ebb9cbd
ci: tweak e2e configuration (#7400)
tychoish Dec 7, 2021
3907a87
build: declare packages variable in correct makefile (#7402)
tychoish Dec 7, 2021
08c8866
Revert "ci: tweak e2e configuration (#7400)" (#7404)
tychoish Dec 7, 2021
a5cc517
cmd: cosmetic changes for errors and print statements (#7377)
cmwaters Dec 8, 2021
2167dd8
service: cleanup mempool and peer update shutdown (#7401)
tychoish Dec 8, 2021
372a38c
p2p: migrate to use new interface for channel errors (#7403)
tychoish Dec 8, 2021
042fb22
mempool: avoid arbitrary background contexts (#7409)
tychoish Dec 8, 2021
2e70baa
state: pass connected context (#7410)
tychoish Dec 8, 2021
f4fd26c
build(deps): Bump github.com/adlio/schema from 1.1.14 to 1.1.15 (#7407)
dependabot[bot] Dec 8, 2021
353290b
Fix link to Terraform/Ansible documentation. (#7416)
Dec 9, 2021
52308f0
p2p: refactor channel Send/out (#7414)
tychoish Dec 9, 2021
2c9fee9
internal/libs/protoio: optimize MarshalDelimited by plain byteslice a…
odeke-em Dec 10, 2021
669c845
Fix a panic in the indexer service test. (#7424)
Dec 10, 2021
c20894e
build(deps): Bump github.com/adlio/schema from 1.1.15 to 1.2.2 (#7423)
dependabot[bot] Dec 10, 2021
51b64ff
build(deps): Bump github.com/adlio/schema from 1.2.2 to 1.2.3 (#7432)
dependabot[bot] Dec 13, 2021
cd52c97
build(deps): Bump github.com/spf13/viper from 1.9.0 to 1.10.0 (#7434)
dependabot[bot] Dec 13, 2021
98e9142
Go 1.17 (#7429)
faddat Dec 13, 2021
cf557df
p2p: use recieve for channel iteration (#7425)
tychoish Dec 13, 2021
5f6b22d
build(deps-dev): Bump watchpack from 2.3.0 to 2.3.1 in /docs (#7430)
dependabot[bot] Dec 13, 2021
b842a97
sync: remove special mutexes (#7438)
tychoish Dec 13, 2021
534de74
Fix broken documentation link. (#7439)
Dec 14, 2021
9ce4e41
log: dissallow nil loggers (#7445)
tychoish Dec 14, 2021
ec6a169
node: minor package cleanups (#7444)
tychoish Dec 14, 2021
117c95b
testing,log: add testing.T logger connector (#7447)
tychoish Dec 14, 2021
33c9c1d
Move libs/async to internal/libs/async. (#7449)
Dec 14, 2021
1ae13da
Internalize libs/sync. (#7450)
Dec 14, 2021
2e559a0
build(deps): Bump github.com/spf13/cobra from 1.2.1 to 1.3.0 (#7456)
dependabot[bot] Dec 15, 2021
ce4163b
Move the libs/pubsub package to internal scope (#7451)
Dec 15, 2021
4f179b0
build(deps): Bump google.golang.org/grpc from 1.42.0 to 1.43.0 (#7455)
dependabot[bot] Dec 15, 2021
1677efd
rfc: deterministic proto bytes serialization (#7427)
williambanfield Dec 15, 2021
5743795
statesync: assert app version matches (#7463)
cmwaters Dec 16, 2021
8c1e2ab
contexts: remove all TODO instances (#7466)
tychoish Dec 16, 2021
f3501db
build(deps): Bump github.com/rs/zerolog from 1.26.0 to 1.26.1 (#7469)
dependabot[bot] Dec 17, 2021
5e0e3dd
build(deps): Bump github.com/spf13/viper from 1.10.0 to 1.10.1 (#7470)
dependabot[bot] Dec 17, 2021
4fad7f9
libs/rand: remove custom seed function (#7473)
tychoish Dec 17, 2021
9dec207
Remove the "URI" RPC client. (#7474)
Dec 17, 2021
a477fa4
rfc: don't panic (#7472)
tychoish Dec 17, 2021
6371996
privval: remove panics in privval implementation (#7475)
tychoish Dec 17, 2021
bbf9a98
Remove extra white space (#7477)
git-sgmoore Dec 19, 2021
86b8c8c
docs: update go ws code snippets (#7486)
Dec 22, 2021
426ebe6
build(deps): Bump github.com/rs/cors from 1.8.0 to 1.8.2 (#7484)
dependabot[bot] Dec 22, 2021
f6b7498
build(deps): Bump docker/login-action from 1.10.0 to 1.12.0 (#7494)
dependabot[bot] Dec 27, 2021
e92ffd2
config: add a Deprecation annotation to P2PConfig.Seeds. (#7496)
Dec 28, 2021
a94f06b
types: fix path handling in node key tests (#7493)
Jan 3, 2022
cb308b0
types: remove panic from block methods (#7501)
tychoish Jan 3, 2022
edf47d0
testing: use scoped logger for all public packages (#7504)
tychoish Jan 4, 2022
6d1d902
light: remove global context from tests (#7505)
tychoish Jan 4, 2022
c1e5ed7
errors: formating cleanup (#7507)
tychoish Jan 4, 2022
773e9a3
testing: pass testing.T to assert and require always, assertion clean…
tychoish Jan 5, 2022
d7f33ed
privval: improve test hygine (#7511)
tychoish Jan 5, 2022
a0718b9
e2e: use more simple strings for generated transactions (#7513)
tychoish Jan 5, 2022
6b73774
testing: remove background contexts (#7509)
tychoish Jan 5, 2022
a147ecd
e2e: avoid global test context (#7512)
tychoish Jan 5, 2022
c7df973
types: tests should not panic (#7506)
tychoish Jan 5, 2022
6d67fb9
e2e: constrain test parallelism and reporting (#7516)
tychoish Jan 5, 2022
e16768d
libs/os: remove trap signal (#7515)
tychoish Jan 6, 2022
728f377
e2e: make tx test more stable (#7523)
tychoish Jan 6, 2022
2e47672
tests: remove panics from test fixtures (#7522)
tychoish Jan 6, 2022
9f04e44
consensus: remove reactor options (#7526)
tychoish Jan 7, 2022
a097480
consensus+p2p: change how consensus reactor is constructed (#7525)
tychoish Jan 7, 2022
bc46118
statesync: reactor and channel construction (#7529)
tychoish Jan 7, 2022
5678dcf
mempool: refactor mempool constructor (#7530)
tychoish Jan 7, 2022
6f5035d
evidence: reactor constructor (#7533)
tychoish Jan 7, 2022
0fac7af
blocksync: standardize construction process (#7531)
tychoish Jan 7, 2022
4ac1d15
pex: regularize reactor constructor (#7532)
tychoish Jan 7, 2022
78d3baf
test/factory: pass testing.T around rather than errors for test fixtu…
tychoish Jan 7, 2022
5b443c7
Replace uses of libs/json with encoding/json. (#7534)
Jan 8, 2022
ddc4bb9
build(deps): Bump technote-space/get-diff-action from 5 to 6.0.1 (#7535)
dependabot[bot] Jan 10, 2022
ea7604d
test: uniquify prom IDs (#7540)
tychoish Jan 10, 2022
d53d5a1
log: remove support for traces (#7542)
tychoish Jan 10, 2022
ddfbcb8
rpc: remove positional parameter encoding from clients (#7545)
Jan 10, 2022
128fea8
rpc: collapse Caller and HTTPClient interfaces. (#7548)
Jan 10, 2022
a8a0d7b
statesync: use specific testing.T logger for tests (#7543)
tychoish Jan 10, 2022
9ade61c
abci: socket server shutdown response handler (#7547)
tychoish Jan 10, 2022
2d84133
rpc: simplify the JSON-RPC client Caller interface (#7549)
Jan 10, 2022
a97ddad
node: new concrete type for seed node implementation (#7521)
spaceCh1mp Jan 11, 2022
5e2e544
rpc: replace anonymous arguments with structured types (#7552)
Jan 11, 2022
6ab5c54
reactors: skip log on some routine cancels (#7556)
tychoish Jan 11, 2022
55af77d
rpc: refactor the HTTP POST handler (#7555)
Jan 11, 2022
24937f8
rpc: replace custom context-like argument with context.Context (#7559)
Jan 11, 2022
6587c0a
privval: improve client shutdown to prevent resource leak (#7544)
tychoish Jan 11, 2022
bffdd3d
tests: remove in-test logging (#7558)
tychoish Jan 11, 2022
ebc9246
build(deps): Bump github.com/BurntSushi/toml from 0.4.1 to 1.0.0 (#7562)
dependabot[bot] Jan 12, 2022
458185c
node: move seed node implementation to its own file (#7566)
tychoish Jan 12, 2022
248b7d7
statesync: clarify test cleanup (#7565)
tychoish Jan 12, 2022
c80f22c
rpc: remove cache control settings from the HTTP server (#7568)
Jan 12, 2022
089411e
statesync: SyncAny test buffering (#7570)
tychoish Jan 12, 2022
8349ec1
rpc: fix mock test cases (#7571)
Jan 12, 2022
d2126c3
node: collapse initialization internals (#7567)
tychoish Jan 12, 2022
1dd72d6
internal/libs: delete unused functionality (#7569)
tychoish Jan 12, 2022
9e39edc
service: avoid debug logs before error (#7564)
tychoish Jan 12, 2022
cb336eb
logging: remove reamining instances of SetLogger interface (#7572)
tychoish Jan 12, 2022
0e8435d
rpc: rework how responses are written back via HTTP (#7575)
Jan 13, 2022
341753d
rpc: simplify panic recovery in the server middleware (#7578)
Jan 13, 2022
5740218
node+privval: refactor privval construction (#7574)
tychoish Jan 13, 2022
4d0cdc8
consensus: use noop logger for WAL test (#7580)
tychoish Jan 13, 2022
9534e0f
node+rpc: rpc environment should own it's creation (#7573)
tychoish Jan 13, 2022
9c4d59b
rpc: consolidate RPC route map construction (#7582)
Jan 13, 2022
12d5a1c
log: avoid use of legacy test logging (#7583)
tychoish Jan 13, 2022
5522fc8
rpc: clean up the RPCFunc constructor signature (#7586)
Jan 13, 2022
54d170c
consensus: explicit test timeout (#7585)
tychoish Jan 13, 2022
f014377
rpc: check RPC service functions more carefully (#7587)
Jan 13, 2022
798701e
rpc: update fuzz criteria to match the implementation (#7595)
Jan 14, 2022
09ff380
light: avoid panic for integer underflow (#7589)
tychoish Jan 14, 2022
24bb676
rpc: remove dependency of URL (GET) requests on tmjson (#7590)
Jan 14, 2022
3a7b196
Add changelog entries from release v0.34.15. (#7598)
Jan 14, 2022
8a7f5ff
RFC-009: Consensus Parameter Upgrades (#7524)
williambanfield Jan 14, 2022
88f6c1e
ADR-74: Migrate Timeout Parameters to Consensus Parameters (#7503)
williambanfield Jan 14, 2022
e963e70
node+autofile: avoid leaks detected during WAL shutdown (#7599)
tychoish Jan 14, 2022
ddeda98
light: remove test panic (#7588)
tychoish Jan 14, 2022
f091d98
light: convert validation panics to errors (#7597)
tychoish Jan 14, 2022
7ad9523
statesync: more orderly dispatcher shutdown (#7601)
tychoish Jan 14, 2022
f65009c
rpc: simplify the encoding of interface-typed arguments in JSON (#7600)
Jan 15, 2022
bb6a566
Update README.md (#7602)
SierraGolf Jan 15, 2022
faf262a
protoio: fix incorrect test assertion (#7606)
Jan 16, 2022
cba0a15
light: fix provider error plumbing (#7610)
Jan 16, 2022
189dbe6
rpc: paginate mempool /unconfirmed_txs endpoint (#7612)
spaceCh1mp Jan 18, 2022
f1f90c4
consensus: test shutdown to avoid hangs (#7603)
tychoish Jan 18, 2022
3f42f80
testing: use noop loger with leakteset in more places (#7604)
tychoish Jan 18, 2022
3c75f4d
consensus: calculate prevote message delay metric (#7551)
williambanfield Jan 18, 2022
d97bf14
pex: avert a data race on map access in the reactor (#7614)
Jan 18, 2022
452cab9
pex: do not send nil envelopes to the reactor (#7622)
Jan 18, 2022
13d2b7b
pex: improve handling of closed channels (#7623)
Jan 18, 2022
9645d3e
autofile: ensure files are not reopened after closing (#7628)
Jan 18, 2022
a84d672
privval: synchronize leak check with shutdown (#7629)
Jan 19, 2022
f1ef363
consensus: check proposal non-nil in prevote message delay metric (#7…
williambanfield Jan 19, 2022
89523cc
build: Make sure to test packages with external tests (#7608)
Jan 19, 2022
99fc3a1
build(deps): Bump github.com/prometheus/client_golang (#7636)
dependabot[bot] Jan 19, 2022
99ab072
Increase test splits from 4 to 6. (#7630)
Jan 19, 2022
65c89b9
abci/client: use a no-op logger in the test (#7633)
Jan 19, 2022
1034650
privval: do not use old proposal timestamp (#7621)
williambanfield Jan 19, 2022
3e9dcb6
consensus/state: avert a data race with state update and tests (#7643)
Jan 19, 2022
19d9522
abci/client: simplify client interface (#7607)
Jan 19, 2022
dc0df93
p2p: always advertise self, to enable mutual address discovery (#7594)
altergui Jan 19, 2022
c378a37
consensus: use delivertxsync (#7616)
tychoish Jan 19, 2022
44a3585
light: return light client status on rpc /status (#7536)
jmalicevic Jan 20, 2022
e457c4a
tests: update docker versions to match build version (#7646)
tychoish Jan 20, 2022
f586eac
privval: avoid re-signing vote when RHS and signbytes are equal (#7592)
maxkaneco Jan 20, 2022
5020e42
tests: update cleanup opertunities (#7647)
tychoish Jan 20, 2022
c0e5610
autofile: avoid shutdown race (#7650)
tychoish Jan 20, 2022
a523e3f
consensus: fix height advances in test state (#7648)
williambanfield Jan 20, 2022
7e4e003
Fix query against the latest state in light client (#7642)
ashcherbakov Jan 21, 2022
23ba5ca
Update pending changelog from #7607. (#7666)
Jan 21, 2022
bf1ec6e
mempool: reactor concurrency test tweaks (#7651)
tychoish Jan 21, 2022
5ec4c9b
jsontypes: improve tests and error diagnostics (#7669)
Jan 21, 2022
43c60ea
rpc: use encoding/json rather than tmjson (#7670)
Jan 21, 2022
9ab2d6b
build(deps): Bump docker/build-push-action from 2.7.0 to 2.8.0 (#7679)
dependabot[bot] Jan 24, 2022
293acd3
build(deps): Bump vuepress-theme-cosmos from 1.0.182 to 1.0.183 in /d…
dependabot[bot] Jan 24, 2022
561c0b5
Delete the custom libs/json (tmjson) package. (#7673)
Jan 24, 2022
ef62e80
tests: reduce timeout to 4m from 8m (#7681)
tychoish Jan 24, 2022
574ef30
build(deps): Bump github.com/vektra/mockery/v2 from 2.9.4 to 2.10.0 (…
dependabot[bot] Jan 25, 2022
7d8dc4e
rpc: check error code for broadcast_tx_commit (#7683)
tychoish Jan 25, 2022
d9fe2ad
clist: reduce size of test workload for clist implementation (#7682)
tychoish Jan 25, 2022
6b494c2
pubsub: use concrete queries instead of an interface (#7686)
Jan 25, 2022
6fa4972
Remove unused chacha20poly1305 package. (#7690)
Jan 26, 2022
c26e247
build(deps): Bump github.com/golangci/golangci-lint from 1.43.0 to 1.…
dependabot[bot] Jan 26, 2022
8afbf30
ADR 074: RPC Event Subscription Interface (#7677)
Jan 26, 2022
2978d2f
Remove unused xsalsa20symmetric package. (#7691)
Jan 26, 2022
6c16205
types: rename and extend the EventData interface (#7687)
Jan 26, 2022
7f7770c
Proposer-Based Timestamps Merge (#7605)
williambanfield Jan 26, 2022
cd2b59f
Mark ADR 075 as "accepted". (#7699)
Jan 26, 2022
103d9eb
remove duplicate ABCIVersion (#7703)
JayT106 Jan 26, 2022
b650f0f
build(deps): Bump google.golang.org/grpc from 1.43.0 to 1.44.0 (#7695)
dependabot[bot] Jan 26, 2022
9ded373
consensus: use buffered channel in TestStateFullRound1 (#7668)
williambanfield Jan 26, 2022
3367916
Pin super-linter to a less noisy version. (#7706)
Jan 26, 2022
d0dbe4d
params: increase default synchrony params (#7704)
williambanfield Jan 26, 2022
fc459b9
Forward-port v0.35.1 changelogs. (#7705)
Jan 26, 2022
3b840e3
ci: fix super-linter configuration settings (#7708)
Jan 27, 2022
f29bc54
metrics: add metric for proposal timestamp difference (#7709)
williambanfield Jan 27, 2022
3b788a0
rpc: add application info to `status` call (#7701)
Jan 27, 2022
254beca
Use proposer timestamp instead of genesis time for height 1 block tim…
williambanfield Jan 27, 2022
5955d20
rpc: remove unused websocket options (#7712)
Jan 27, 2022
6030a31
rpc: clean up unused non-default websocket client options (#7713)
Jan 27, 2022
033818c
light: Fix absence proof verification by light client (#7639)
ashcherbakov Jan 27, 2022
665f7e2
mempool: return duplicate tx errors more consistently (#7714)
tychoish Jan 27, 2022
f143dd2
rpc: don't route websocket-only methods on GET requests (#7715)
Jan 27, 2022
f779e52
rpc: clean up encoding of request and response messages (#7721)
Jan 28, 2022
3ce2ec3
rpc: simplify and consolidate response construction (#7725)
Jan 28, 2022
b41e274
docs: fix some typos in ADR 075. (#7726)
Jan 31, 2022
25fe8c8
build(deps): Bump github.com/prometheus/client_golang from 1.12.0 to …
dependabot[bot] Jan 31, 2022
fc56e5c
rpc: clean up unmarshaling of batch-valued responses (#7728)
Jan 31, 2022
304f470
cmd: avoid package state in cli constructors (#7719)
tychoish Jan 31, 2022
bf8ffd2
conensus: put timeouts on reactor tests (#7733)
tychoish Jan 31, 2022
86c0614
consensus: remove unused closer construct (#7734)
tychoish Jan 31, 2022
388d050
rfc: p2p light client (#7672)
tychoish Jan 31, 2022
414edea
rpc: simplify the handling of JSON-RPC request and response IDs (#7738)
Jan 31, 2022
b1b3a1d
docs: drop v0.32 from the doc site configuration (#7741)
Jan 31, 2022
684c729
rpc: fix layout of endpoint list (#7742)
Jan 31, 2022
b9792e2
abci: PrepareProposal (#6544)
tac0turtle Jul 27, 2021
4db2b3f
abci: Vote Extension 1 (#6646)
mconcat Aug 23, 2021
4711f03
ABCI Vote Extension 2 (#6885)
mconcat Sep 22, 2021
736bdfd
PrepareProposal-VoteExtension integration (#6915)
mconcat Nov 16, 2021
aa2d536
evidence: Refactored the evidence message to process Evidence instead…
jmalicevic Feb 2, 2022
8946bde
remove unmaintained tutorials (#7751)
cmwaters Feb 2, 2022
1722bdb
types: make timely predicate adaptive after 10 rounds (#7739)
williambanfield Feb 2, 2022
3ec8841
consensus: delay start of peer routines (#7753)
tychoish Feb 2, 2022
28538a8
rpc: remove the placeholder RunState type. (#7749)
Feb 2, 2022
27fc333
replace PreprocessTxs with PrepareProposal when creating a proposal b…
evan-forbes Feb 2, 2022
d7e0b1e
fix proto generation
evan-forbes Feb 3, 2022
f6afb04
regenerate new proto files
evan-forbes Feb 3, 2022
95ac3ce
update proto
evan-forbes Feb 3, 2022
af0234c
restore proto files that were accidently deleted
evan-forbes Feb 4, 2022
167a978
add missing vote extension + minor formatting
evan-forbes Feb 4, 2022
f157ad8
fix tests
evan-forbes Feb 7, 2022
67f318c
linter
evan-forbes Feb 10, 2022
b4aca6f
patch p2p inconsistency and try to get the protobuf to fetch the corr…
evan-forbes Feb 10, 2022
e5260b7
recompile proto
evan-forbes Feb 10, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
adr: lib2p implementation plan (#7282)
  • Loading branch information
tychoish authored and evan-forbes committed Feb 2, 2022
commit 77f30ceea4d3691c5a55d0971f881eed7ef32f53
5 changes: 3 additions & 2 deletions docs/architecture/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ Note the context/background should be written in the present tense.
- [ADR-059: Evidence-Composition-and-Lifecycle](./adr-059-evidence-composition-and-lifecycle.md)
- [ADR-062: P2P-Architecture](./adr-062-p2p-architecture.md)
- [ADR-063: Privval-gRPC](./adr-063-privval-grpc.md)
- [ADR-066-E2E-Testing](./adr-066-e2e-testing.md)
- [ADR-066: E2E-Testing](./adr-066-e2e-testing.md)
- [ADR-072: Restore Requests for Comments](./adr-072-request-for-comments.md)

### Accepted

- [ADR-006: Trust-Metric](./adr-006-trust-metric.md)
Expand Down Expand Up @@ -99,4 +101,3 @@ Note the context/background should be written in the present tense.
- [ADR-057: RPC](./adr-057-RPC.md)
- [ADR-069: Node Initialization](./adr-069-flexible-node-initialization.md)
- [ADR-071: Proposer-Based Timestamps](adr-071-proposer-based-timestamps.md)
- [ADR-072: Restore Requests for Comments](./adr-072-request-for-comments.md)
2 changes: 1 addition & 1 deletion docs/architecture/adr-072-request-for-comments.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

## Status

Proposed
Implemented

## Context

Expand Down
235 changes: 235 additions & 0 deletions docs/architecture/adr-073-libp2p.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,235 @@
# ADR 073: Adopt LibP2P

## Changelog

- 2021-11-02: Initial Draft (@tychoish)

## Status

Proposed.

## Context


As part of the 0.35 development cycle, the Tendermint team completed
the first phase of the work described in ADRs 61 and 62, which included a
large scale refactoring of the reactors and the p2p message
routing. This replaced the switch and many of the other legacy
components without breaking protocol or network-level
interoperability and left the legacy connection/socket handling code.

Following the release, the team has reexamined the state of the code
and the design, as well as Tendermint's requirements. The notes
from that process are available in the [P2P Roadmap
RFC][rfc].

This ADR supersedes the decisions made in ADRs 60 and 61, but
builds on the completed portions of this work. Previously, the
boundaries of peer management, message handling, and the higher level
business logic (e.g., "the reactors") were intermingled, and core
elements of the p2p system were responsible for the orchestration of
higher-level business logic. Refactoring the legacy components
made it more obvious that this entanglement of responsibilities
had outsized influence on the entire implementation, making
it difficult to iterate within the current abstractions.
It would not be viable to maintain interoperability with legacy
systems while also achieving many of our broader objectives.

LibP2P is a thoroughly-specified implementation of a peer-to-peer
networking stack, designed specifically for systems such as
ours. Adopting LibP2P as the basis of Tendermint will allow the
Tendermint team to focus more of their time on other differentiating
aspects of the system, and make it possible for the ecosystem as a
whole to take advantage of tooling and efforts of the LibP2P
platform.

## Alternative Approaches

As discussed in the [P2P Roadmap RFC][rfc], the primary alternative would be to
continue development of Tendermint's home-grown peer-to-peer
layer. While that would give the Tendermint team maximal control
over the peer system, the current design is unexceptional on its
own merits, and the prospective maintenance burden for this system
exceeds our tolerances for the medium term.

Tendermint can and should differentiate itself not on the basis of
its networking implementation or peer management tools, but providing
a consistent operator experience, a battle-tested consensus algorithm,
and an ergonomic user experience.

## Decision

Tendermint will adopt libp2p during the 0.37 development cycle,
replacing the bespoke Tendermint P2P stack. This will remove the
`Endpoint`, `Transport`, `Connection`, and `PeerManager` abstractions
and leave the reactors, `p2p.Router` and `p2p.Channel`
abstractions.

LibP2P may obviate the need for a dedicated peer exchange (PEX)
reactor, which would also in turn obviate the need for a dedicated
seed mode. If this is the case, then all of this functionality would
be removed.

If it turns out (based on the advice of Protocol Labs) that it makes
sense to maintain separate pubsub or gossipsub topics
per-message-type, then the `Router` abstraction could also
be entirely subsumed.

## Detailed Design

### Implementation Changes

The seams in the P2P implementation between the higher level
constructs (reactors), the routing layer (`Router`) and the lower
level connection and peer management code make this operation
relatively straightforward to implement. A key
goal in this design is to minimize the impact on the reactors
(potentially entirely,) and completely remove the lower level
components (e.g., `Transport`, `Connection` and `PeerManager`) using the
separation afforded by the `Router` layer. The current state of the
code makes these changes relatively surgical, and limited to a small
number of methods:

- `p2p.Router.OpenChannel` will still return a `Channel` structure
which will continue to serve as a pipe between the reactors and the
`Router`. The implementation will no longer need the queue
implementation, and will instead start goroutines that
are responsible for routing the messages from the channel to libp2p
fundamentals, replacing the current `p2p.Router.routeChannel`.

- The current `p2p.Router.dialPeers` and `p2p.Router.acceptPeers`,
are responsible for establishing outbound and inbound connections,
respectively. These methods will be removed, along with
`p2p.Router.openConnection`, and the libp2p connection manager will
be responsible for maintaining network connectivity.

- The `p2p.Channel` interface will change to replace Go
channels with a more functional interface for sending messages.
New methods on this object will take contexts to support safe
cancellation, and return errors, and will block rather than
running asynchronously. The `Out` channel through which
reactors send messages to Peers, will be replaced by a `Send`
method, and the Error channel will be replaced by an `Error`
method.

- Reactors will be passed an interface that will allow them to
access Peer information from libp2p. This will supplant the
`p2p.PeerUpdates` subscription.

- Add some kind of heartbeat message at the application level
(e.g. with a reactor,) potentially connected to libp2p's DHT to be
used by reactors for service discovery, message targeting, or other
features.

- Replace the existing/legacy handshake protocol with [Noise](http://www.noiseprotocol.org/noise.html).

This project will initially use the TCP-based transport protocols within
libp2p. QUIC is also available as an option that we may implement later.
We will not support mixed networks in the initial release, but will
revisit that possibility later if there is a demonstrated need.

### Upgrade and Compatibility

Because the routers and all current P2P libraries are `internal`
packages and not part of the public API, the only changes to the public
API surface area of Tendermint will be different configuration
file options, replacing the current P2P options with options relevant
to libp2p.

However, it will not be possible to run a network with both networking
stacks active at once, so the upgrade to the version of Tendermint
will need to be coordinated between all nodes of the network. This is
consistent with the expectations around upgrades for Tendermint moving
forward, and will help manage both the complexity of the project and
the implementation timeline.

## Open Questions

- What is the role of Protocol Labs in the implementation of libp2p in
tendermint, both during the initial implementation and on an ongoing
basis thereafter?

- Should all P2P traffic for a given node be pushed to a single topic,
so that a topic maps to a specific ChainID, or should
each reactor (or type of message) have its own topic? How many
topics can a libp2p network support? Is there testing that validates
the capabilities?

- Tendermint presently provides a very coarse QoS-like functionality
using priorities based on message-type.
This intuitively/theoretically ensures that evidence and consensus
messages don't get starved by blocksync/statesync messages. It's
unclear if we can or should attempt to replicate this with libp2p.

- What kind of QoS functionality does libp2p provide and what kind of
metrics does libp2p provide about it's QoS functionality?

- Is it possible to store additional (and potentially arbitrary)
information into the DHT as part of the heartbeats between nodes,
such as the latest height, and then access that in the
reactors. How frequently can the DHT be updated?

- Does it make sense to have reactors continue to consume inbound
messages from a Channel (`In`) or is there another interface or
pattern that we should consider?

- We should avoid exposing Go channels when possible, and likely
some kind of alternate iterator likely makes sense for processing
messages within the reactors.

- What are the security and protocol implications of tracking
information from peer heartbeats and exposing that to reactors?

- How much (or how little) configuration can Tendermint provide for
libp2p, particularly on the first release?

- In general, we should not support byo-functionality for libp2p
components within Tendermint, and reduce the configuration surface
area, as much as possible.

- What are the best ways to provide request/response semantics for
reactors on top of libp2p? Will it be possible to add
request/response semantics in a future release or is there
anticipatory work that needs to be done as part of the initial
release?

## Consequences

### Positive

- Reduce the maintenance burden for the Tendermint Core team by
removing a large swath of legacy code that has proven to be
difficult to modify safely.

- Remove the responsibility for maintaining and developing the entire
peer management system (p2p) and stack.

- Provide users with a more stable peer and networking system,
Tendermint can improve operator experience and network stability.

### Negative

- By deferring to library implementations for peer management and
networking, Tendermint loses some flexibility for innovating at the
peer and networking level. However, Tendermint should be innovating
primarily at the consensus layer, and libp2p does not preclude
optimization or development in the peer layer.

- Libp2p is a large dependency and Tendermint would become dependent
upon Protocol Labs' release cycle and prioritization for bug
fixes. If this proves onerous, it's possible to maintain a vendor
fork of relevant components as needed.

### Neutral

- N/A

## References

- [ADR 61: P2P Refactor Scope][adr61]
- [ADR 62: P2P Architecture][adr62]
- [P2P Roadmap RFC][rfc]

[adr61]: ./adr-061-p2p-refactor-scope.md
[adr62]: ./adr-062-p2p-architecture.md
[rfc]: ../rfc/rfc-000-p2p.rst