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

chore: pull cometbft v0.34.35 #1495

Merged
merged 179 commits into from
Sep 30, 2024
Merged
Changes from 1 commit
Commits
Show all changes
179 commits
Select commit Hold shift + click to select a range
9c1e23c
Fix `TestStateOversizedBlock` (backport #755) (#766)
mergify[bot] May 1, 2023
49cf700
Struct `Client` exposes sensitive data (#784) (#788)
mergify[bot] May 4, 2023
c5455d2
Unsafe int cast in `kill` command (backport #783) (#794)
mergify[bot] May 4, 2023
82c6c08
build(deps): Bump bufbuild/buf-setup-action from 1.17.0 to 1.18.0 (#805)
dependabot[bot] May 8, 2023
30af8c2
Backport of PR #771 to 0.34 : big int parsing (#798)
jmalicevic May 11, 2023
557ddea
rpc: Remove response data from response failure logs (backport #829) …
mergify[bot] May 16, 2023
7c58f28
build(deps): Bump slackapi/slack-github-action from 1.23.0 to 1.24.0 …
dependabot[bot] May 25, 2023
8220d97
build(deps): Bump bufbuild/buf-setup-action from 1.18.0 to 1.19.0 (#871)
dependabot[bot] May 25, 2023
1a37e72
build(deps): Bump bufbuild/buf-setup-action from 1.19.0 to 1.20.0 (#909)
dependabot[bot] Jun 5, 2023
ea902b6
v0.34.x: Prevent a transaction to appear twice in the mempool (backpo…
mergify[bot] Jun 8, 2023
2a526ca
fix: avoid recursive call after rename to (*PeerState).MarshalJSON (b…
mergify[bot] Jun 14, 2023
fe4894f
Release v0.34.29 (#973)
thanethomson Jun 14, 2023
91627c0
build(deps): Bump bufbuild/buf-setup-action from 1.20.0 to 1.21.0 (#940)
dependabot[bot] Jun 15, 2023
c6615d3
build(deps): Bump docker/build-push-action from 4.0.0 to 4.1.1 (#977)
dependabot[bot] Jun 15, 2023
90107ec
build(deps): Bump docker/setup-buildx-action from 2.5.0 to 2.7.0 (#976)
dependabot[bot] Jun 15, 2023
fecacbc
build(deps): Bump docker/login-action from 2.1.0 to 2.2.0 (#942)
dependabot[bot] Jun 16, 2023
ffc580f
Add `CMT_HOME` (or remove it?) (backport #983) (#1000)
mergify[bot] Jun 19, 2023
60e431e
feat: make handshake cancelable (backport #857) (#1012)
yihuang Jun 22, 2023
3452373
build(deps): Bump bufbuild/buf-setup-action from 1.21.0 to 1.22.0 (#1…
dependabot[bot] Jun 26, 2023
dde9946
docs: Added double quotes to /abci_query path param (#1015) (#1047)
mergify[bot] Jun 28, 2023
74bed03
build(deps): Bump bufbuild/buf-setup-action from 1.22.0 to 1.23.1 (#1…
dependabot[bot] Jul 4, 2023
61f6a41
build(deps): Bump docker/setup-buildx-action from 2.7.0 to 2.8.0 (#1069)
dependabot[bot] Jul 4, 2023
075f4b7
build(deps): Bump docker/setup-buildx-action from 2.8.0 to 2.9.0 (#1099)
dependabot[bot] Jul 10, 2023
0f35438
build(deps): Bump docker/setup-buildx-action from 2.9.0 to 2.9.1 (#1127)
dependabot[bot] Jul 17, 2023
197ed09
build(deps): Bump bufbuild/buf-setup-action from 1.23.1 to 1.24.0 (#1…
dependabot[bot] Jul 17, 2023
a389900
build(deps): Bump bufbuild/buf-setup-action from 1.24.0 to 1.25.0 (#1…
dependabot[bot] Jul 24, 2023
8732989
Close evidence.db OnStop (#1210) (#1226)
mergify[bot] Aug 8, 2023
4af4267
build(deps): Bump bufbuild/buf-setup-action from 1.25.0 to 1.25.1 (#1…
dependabot[bot] Aug 8, 2023
30895df
Log proposer's address when correctly accepting a proposal (backport …
mergify[bot] Aug 10, 2023
5188d4c
build(deps): Bump bufbuild/buf-setup-action from 1.25.1 to 1.26.0 (#1…
dependabot[bot] Aug 14, 2023
8cda4a1
build(deps): Bump bufbuild/buf-setup-action from 1.26.0 to 1.26.1 (#1…
dependabot[bot] Aug 21, 2023
827ec55
build(deps): Bump rtCamp/action-slack-notify from 2.2.0 to 2.2.1 (#1285)
dependabot[bot] Aug 28, 2023
d993d87
build(deps): Bump docker/setup-buildx-action from 2.9.1 to 2.10.0 (#1…
dependabot[bot] Sep 4, 2023
901212f
build(deps): Bump actions/checkout from 3 to 4 (#1317)
dependabot[bot] Sep 11, 2023
18fe235
build(deps): Bump docker/build-push-action from 4.1.1 to 4.2.1 (#1316)
dependabot[bot] Sep 11, 2023
ff9b8d2
build(deps): Bump docker/login-action from 2.2.0 to 3.0.0 (#1363)
dependabot[bot] Sep 20, 2023
257c2ac
build(deps): Bump goreleaser/goreleaser-action from 4 to 5 (#1361)
dependabot[bot] Sep 20, 2023
3ea23be
build(deps): Bump docker/build-push-action from 4.2.1 to 5.0.0 (#1362)
dependabot[bot] Sep 20, 2023
cb909f2
build(deps): Bump docker/setup-buildx-action from 2.10.0 to 3.0.0 (#1…
dependabot[bot] Sep 20, 2023
4d9a42a
update language (backport #1263) (#1269)
mergify[bot] Sep 22, 2023
54d2a76
Bump Go version used in `v0.34.x` to v1.20 (#1351)
thanethomson Sep 26, 2023
8d4b622
Fix typo: exent -> event (#1329) (#1342)
thanethomson Sep 26, 2023
e6a630a
doc: improve documentation of BlockParams.MaxBytes (backport of #1405…
cason Sep 28, 2023
5b4d364
build(deps): Bump bufbuild/buf-setup-action from 1.26.1 to 1.27.0 (#1…
dependabot[bot] Oct 10, 2023
eee9aae
build(deps): Bump styfle/cancel-workflow-action from 0.11.0 to 0.12.0…
dependabot[bot] Oct 10, 2023
caa625f
build(deps): Bump pillow from 9.3.0 to 10.0.1 in /scripts/qa/reportin…
mergify[bot] Oct 18, 2023
b3bf71a
build(deps): Bump bufbuild/buf-setup-action from 1.27.0 to 1.27.1 (#1…
dependabot[bot] Oct 23, 2023
b4de58b
build(deps): Bump bufbuild/buf-setup-action from 1.27.1 to 1.27.2 (#1…
dependabot[bot] Oct 30, 2023
d35bcb1
build(deps): Bump bufbuild/buf-setup-action from 1.27.2 to 1.28.0 (#1…
dependabot[bot] Nov 13, 2023
ade36fb
Updates grpc and net dependencies to avoid https://pkg.go.dev/vuln/GO…
lasarojc Nov 13, 2023
1064665
mempool: Add metric size of pool in bytes (backport #1512) (#1568)
mergify[bot] Nov 13, 2023
3372015
Update SECURITY.md (backport #1626) (#1635)
mergify[bot] Nov 16, 2023
5f640ea
experimental mempool: Backport #1558 and #1584 to 0.34.x (#1630)
hvanz Nov 16, 2023
a6c1443
mempool: Add missing gauge constructor for size_bytes metric (#1642)
thanethomson Nov 16, 2023
b3db150
Release v0.34.30 (#1641)
thanethomson Nov 17, 2023
5cfaa62
proto: Prepare for publishing v0.34.x protos to Buf registry (#1645)
thanethomson Nov 17, 2023
20de39f
proto: Update README (backport #1648) (#1653)
mergify[bot] Nov 17, 2023
386244d
build(deps): Bump bufbuild/buf-setup-action from 1.28.0 to 1.28.1 (#1…
dependabot[bot] Nov 20, 2023
e2b18ad
build(deps): Bump docker/build-push-action from 5.0.0 to 5.1.0 (#1658)
dependabot[bot] Nov 20, 2023
700fcd9
Do not block indefinitely on the semaphore (backport #1654) (#1690)
mergify[bot] Nov 24, 2023
0c0ef94
Release v0.34.31 (#1698)
lasarojc Nov 27, 2023
46ba63c
types: validate Validator#Address field (backport #1715) (#1723)
mergify[bot] Dec 2, 2023
bfc3d09
fix: increase abci socket message size limit to 2GB (backport #1730) …
mergify[bot] Dec 5, 2023
01b410a
Update CODE_OF_CONDUCT.md (#1708) (#1768)
mergify[bot] Dec 7, 2023
25f52bc
build(deps): Bump actions/setup-go from 4 to 5 (#1788)
dependabot[bot] Dec 11, 2023
aae8e38
build(deps): Bump actions/stale from 8 to 9 (#1789)
dependabot[bot] Dec 11, 2023
b7b07fd
Add changelog for #1749 (#1807) (#1821)
mergify[bot] Dec 13, 2023
ef38da4
Introduce `countAllSignatures` in `VerifyCommitLight` & `VerifyCommit…
sergio-mena Dec 14, 2023
578702c
consensus: return last saved BeginBlock, not a empty one (#1783)
melekes Dec 14, 2023
edb3029
build(deps): Bump actions/upload-artifact from 3 to 4 (#1848)
dependabot[bot] Dec 18, 2023
ad673d1
build(deps): Bump actions/download-artifact from 3 to 4 (#1849)
dependabot[bot] Dec 18, 2023
76146cb
Updates go crypto package to v0.17.0 (backport #1859) (#1865)
mergify[bot] Dec 20, 2023
c77707b
Allow blocksync to not verify all signatures (backport #1858) (#1872)
mergify[bot] Dec 20, 2023
5aa9fa1
docs: Fix Discord links in README (backport #1874) (#1896)
mergify[bot] Jan 4, 2024
83a9591
build(deps): Bump actions/cache from 3 to 4 (#2078)
dependabot[bot] Jan 22, 2024
f8b1188
build(deps): Bump styfle/cancel-workflow-action from 0.12.0 to 0.12.1…
dependabot[bot] Jan 29, 2024
e0dd09a
build(deps): Bump bufbuild/buf-setup-action from 1.28.1 to 1.29.0 (#2…
dependabot[bot] Jan 29, 2024
e0e50aa
build(deps): Bump slackapi/slack-github-action from 1.24.0 to 1.25.0 …
dependabot[bot] Jan 29, 2024
8651176
build(deps): Bump codecov/codecov-action from 3 to 4 (#2233)
dependabot[bot] Feb 5, 2024
a8c9da5
build(deps): Bump github.com/cloudflare/circl from 1.3.3 to 1.3.7 (ba…
mergify[bot] Feb 7, 2024
fce9dd6
feat(consensus): additional sanity checks for the size of proposed bl…
mergify[bot] Feb 9, 2024
3a3057b
build(deps): Bump golangci/golangci-lint-action from 3 to 4 (#2301)
dependabot[bot] Feb 12, 2024
4499649
docs: images not rendering properly in docs (backport #2331) (#2340)
mergify[bot] Feb 14, 2024
85df349
e2e: Add `load_max_txs` option to manifest (backport #2094) (#2350)
mergify[bot] Feb 15, 2024
dbed8c3
feat(e2e): Log number of sent txs (success and failed) (backport #232…
mergify[bot] Feb 15, 2024
c496f53
fix(docker-compose): fix subnet (backport #2383) (#2392)
mergify[bot] Feb 20, 2024
f9ae224
ci: check metrics generation in CI checks (backport #2483) (#2487)
mergify[bot] Mar 1, 2024
577d89c
build(deps): Bump docker/setup-buildx-action from 3.0.0 to 3.1.0 (#2499)
dependabot[bot] Mar 4, 2024
3f44a3f
build(deps): Bump bufbuild/buf-setup-action from 1.29.0 to 1.30.0 (#2…
dependabot[bot] Mar 11, 2024
6be1f5e
build(deps): Bump docker/build-push-action from 5.1.0 to 5.2.0 (#2565)
dependabot[bot] Mar 11, 2024
e60583e
Release v0.34.32 (#2590)
melekes Mar 12, 2024
eb48e94
build(deps): Bump docker/build-push-action from 5.2.0 to 5.3.0 (#2632)
dependabot[bot] Mar 18, 2024
bc4213f
build(deps): Bump docker/setup-buildx-action from 3.1.0 to 3.2.0 (#2633)
dependabot[bot] Mar 18, 2024
e1e43ad
build(deps): Bump docker/login-action from 3.0.0 to 3.1.0 (#2631)
dependabot[bot] Mar 18, 2024
32344f9
build(deps): Bump rtCamp/action-slack-notify from 2.2.1 to 2.3.0 (#2670)
dependabot[bot] Mar 25, 2024
8969102
build(deps): Bump bufbuild/buf-setup-action from 1.30.0 to 1.30.1 (#2…
dependabot[bot] Apr 8, 2024
b846338
deps: bump Go version used to v1.21 since v1.20 has reached EOL (#2784)
melekes Apr 11, 2024
d025d2e
build(deps): Bump docker/setup-buildx-action from 3.2.0 to 3.3.0 (#2800)
dependabot[bot] Apr 15, 2024
e21a2b4
deps: bump cometbft-db version to v0.9.1 (#2783)
melekes Apr 15, 2024
a30019c
deps: bump Go version from 1.20 to 1.21 in go.mod (v0.34.x) (#2816)
melekes Apr 16, 2024
f4e7974
fix(bits): prevent BitArray.UnmarshalJSON from crashing on 0 bits in …
mergify[bot] Apr 16, 2024
da85b33
build(deps): Bump slackapi/slack-github-action from 1.25.0 to 1.26.0 …
dependabot[bot] Apr 22, 2024
390b693
v0.34.33 (#2905)
melekes Apr 26, 2024
dc0eb82
build(deps): Bump bufbuild/buf-setup-action from 1.30.1 to 1.31.0 (#2…
dependabot[bot] Apr 29, 2024
9557047
build(deps): Bump golangci/golangci-lint-action from 4 to 5 (#2917)
dependabot[bot] Apr 29, 2024
a8343a5
spec: fix broken link (#3032)
melekes May 8, 2024
f574b26
docs: disambiguate protocol version (backport #3034) (#3038)
mergify[bot] May 8, 2024
ff9f36c
build(deps): Bump golangci/golangci-lint-action from 5 to 6 (#3058)
dependabot[bot] May 13, 2024
e3ad4e2
build(deps): Bump bufbuild/buf-setup-action from 1.31.0 to 1.32.0 (#3…
dependabot[bot] May 20, 2024
4035879
build(deps): Bump bufbuild/buf-setup-action from 1.32.0 to 1.32.1 (#3…
dependabot[bot] May 27, 2024
de4916a
build(deps): Bump docker/login-action from 3.1.0 to 3.2.0 (#3172)
dependabot[bot] Jun 3, 2024
a14515d
build(deps): Bump bufbuild/buf-setup-action from 1.32.1 to 1.32.2 (#3…
dependabot[bot] Jun 3, 2024
8d7f58f
build(deps): Bump goreleaser/goreleaser-action from 5 to 6 (#3222)
dependabot[bot] Jun 10, 2024
0bc9825
build(deps): Bump bufbuild/buf-setup-action from 1.32.2 to 1.33.0 (#3…
dependabot[bot] Jun 17, 2024
6d08eec
build(deps): Bump docker/build-push-action from 5.3.0 to 6.0.0 (#3287)
dependabot[bot] Jun 17, 2024
b23d82e
build(deps): Bump docker/build-push-action from 6.0.0 to 6.1.0 (#3323)
dependabot[bot] Jun 24, 2024
a463d08
build(deps): Bump bufbuild/buf-setup-action from 1.33.0 to 1.34.0 (#3…
dependabot[bot] Jun 24, 2024
099a330
build(deps): Bump docker/build-push-action from 6.1.0 to 6.2.0 (#3377)
dependabot[bot] Jul 1, 2024
7719694
build(deps): Bump docker/build-push-action from 6.2.0 to 6.3.0 (#3441)
dependabot[bot] Jul 8, 2024
00fdf98
build(deps): Bump docker/setup-buildx-action from 3.3.0 to 3.4.0 (#3442)
dependabot[bot] Jul 8, 2024
759bf8a
build(deps): Bump docker/build-push-action from 6.3.0 to 6.4.1 (#3539)
dependabot[bot] Jul 22, 2024
d753e5e
build(deps): Bump docker/login-action from 3.2.0 to 3.3.0 (#3579)
dependabot[bot] Jul 29, 2024
54228b3
build(deps): Bump bufbuild/buf-setup-action from 1.34.0 to 1.35.1 (#3…
dependabot[bot] Jul 29, 2024
ba230d3
build(deps): Bump docker/build-push-action from 6.4.1 to 6.5.0 (#3577)
dependabot[bot] Jul 29, 2024
c1aa5a9
build(deps): Bump docker/setup-buildx-action from 3.4.0 to 3.5.0 (#3576)
dependabot[bot] Jul 29, 2024
7208eb3
build(deps): Bump docker/setup-buildx-action from 3.5.0 to 3.6.1 (#3608)
dependabot[bot] Aug 5, 2024
4a6b0c0
fix(e2e): replace docker-compose w/ docker compose (backport #3614) (…
mergify[bot] Aug 5, 2024
033b20f
build(deps): Bump docker/build-push-action from 6.5.0 to 6.6.1 (#3665)
dependabot[bot] Aug 12, 2024
4459fa5
build(deps): Bump bufbuild/buf-setup-action from 1.35.1 to 1.36.0 (#3…
dependabot[bot] Aug 12, 2024
0593552
build(deps): Bump docker/build-push-action from 6.6.1 to 6.7.0 (#3732)
dependabot[bot] Aug 19, 2024
c590da2
build(deps): Bump bufbuild/buf-setup-action from 1.36.0 to 1.37.0 (#3…
dependabot[bot] Aug 19, 2024
d0bcdaa
chore: Update dependencies to address CVEs (#3754)
melekes Aug 20, 2024
7588c1b
feat(tools): remove `tools` package (backport #2046) (#3760)
mergify[bot] Aug 20, 2024
494b165
chore(deps): force update runc and viper (#3764)
melekes Aug 20, 2024
e87512d
build(deps): replace go-kit w/ a fork (#3821)
melekes Aug 21, 2024
1c6670f
build(deps): Bump github.com/BurntSushi/toml from 1.2.1 to 1.4.0 (#3779)
dependabot[bot] Aug 22, 2024
6e09eeb
build(deps): Bump github.com/Workiva/go-datastructures from 1.0.54 to…
dependabot[bot] Aug 22, 2024
a21403b
build(deps): Bump github.com/gofrs/uuid from 4.3.1+incompatible to 4.…
dependabot[bot] Aug 22, 2024
17befae
chore(deps): cometbft-db v0.9.4 (#3769)
melekes Aug 22, 2024
0ec01d9
build(deps): update continuity (#3822)
melekes Aug 22, 2024
af4ef55
build(deps): replace afero with our fork (#3839)
melekes Aug 23, 2024
2321aaa
build(deps): Bump bufbuild/buf-setup-action from 1.37.0 to 1.38.0 (#3…
dependabot[bot] Aug 26, 2024
6f3fb7d
Merge commit from fork
melekes Sep 3, 2024
0a09f46
v0.34.34 (#3979)
melekes Sep 3, 2024
ddd6d9f
build(deps): Bump github.com/prometheus/client_golang from 1.20.1 to …
dependabot[bot] Sep 4, 2024
e3b7203
build(deps): Bump slackapi/slack-github-action from 1.26.0 to 1.27.0 …
dependabot[bot] Sep 4, 2024
fae1816
build(deps): Bump bufbuild/buf-setup-action from 1.38.0 to 1.39.0 (#3…
dependabot[bot] Sep 4, 2024
f125d93
build(deps): Bump github.com/Masterminds/semver/v3 from 3.2.1 to 3.3.…
dependabot[bot] Sep 4, 2024
40c4aef
build(deps): Bump bufbuild/buf-setup-action from 1.39.0 to 1.40.1 (#4…
dependabot[bot] Sep 9, 2024
afd00e9
build(deps): update python module `requests` to v2.32.3 (#4053)
alesforz Sep 10, 2024
0f713de
build(deps): Update cometbft-db to v0.9.5 (#4059)
alesforz Sep 10, 2024
60e85f7
build(deps): Bump github.com/go-git/go-git/v5 from 5.11.0 to 5.12.0 (…
dependabot[bot] Sep 10, 2024
61a6c3f
build(deps): updated pkg gonum.org/v1/gonum to v0.15.1: (#4045)
alesforz Sep 10, 2024
415d93d
build(deps): Bump github.com/ChainSafe/go-schnorrkel from 1.0.0 to 1.…
dependabot[bot] Sep 10, 2024
044f605
build(deps): Bump github.com/rs/cors from 1.11.0 to 1.11.1 (#3921)
dependabot[bot] Sep 10, 2024
0aa6b32
build(deps): update adlio schema (#4050)
melekes Sep 10, 2024
09e4b25
ci: update Go to 1.22 (#4060)
melekes Sep 10, 2024
3c1db27
build(deps): update go-kit (#4056)
melekes Sep 10, 2024
1ea9db5
build(deps): Bump github.com/btcsuite/btcd/btcec/v2 from 2.2.2 to 2.3…
dependabot[bot] Sep 11, 2024
907925d
build(deps): Update `gonum` dependency to latest commit (#4090)
alesforz Sep 12, 2024
d9fca7f
build(deps): Bump bufbuild/buf-setup-action from 1.40.1 to 1.41.0 (#4…
dependabot[bot] Sep 16, 2024
46db8f4
v0.34.35 (#4105)
melekes Sep 16, 2024
0587ad1
Merge branch 'rp/cometbft-v0.34.35' into rp/v0.34.35
rootulp Sep 20, 2024
010b7bd
fix: must use btcsuite v2.3.4
rootulp Sep 20, 2024
8d302da
fix: incorrect merge conflict resolution
rootulp Sep 20, 2024
d80185f
chore: clean up GIT_DIFF usage
rootulp Sep 20, 2024
4a7caf1
fix: lint
rootulp Sep 20, 2024
a2ac117
fix: e2e test make docker
rootulp Sep 20, 2024
ece27f3
fix: make enough txs for 2 part sets
rootulp Sep 20, 2024
a2fab52
fix: TestBlockStoreSaveLoadBlock
rootulp Sep 20, 2024
235840d
fix: TestSaveTxInfo
rootulp Sep 20, 2024
4610dac
fix: TestLoadBlockPart
rootulp Sep 20, 2024
61989fe
ci: increase test timeout
rootulp Sep 20, 2024
77a3b09
ci: bump to 15m
rootulp Sep 21, 2024
65ead60
ci: run all tests in one group
rootulp Sep 25, 2024
6907f9c
fix: TestTxPool_ConcurrentlyAddingTx
rootulp Sep 25, 2024
b8b2570
refactor: TestTxPool_ConcurrentTxs
rootulp Sep 25, 2024
660877c
skip TestTxMempool_ExpiredTxs_Timestamp
rootulp Sep 25, 2024
1123aae
fix: TestPruneBlocksPrunesTxs
rootulp Sep 25, 2024
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
experimental mempool: Backport #1558 and #1584 to 0.34.x (#1630)
* Backports #1558 and #1584 to 0.37.x (#1611)
Backports #1558 and #1584 to 0.38.x (#1592)

* mempool: Limit gossip connections to persistent and non-persistent peers (experimental) (#1584)

* Experimental - Reduce # of connections effectively used to gossip transactions out (#1558)

* maxpeers for mempool

* mempool: fix max_peers bcast routine active flag

* Use semaphore to limit concurrency

* Rename MaxPeers to MaxOutboundPeers

* Add max_outbound_peers to config toml template

* Rename in error message

* Renams the parameter to highlight its experimental nature. Extend the AddPeer method to return an error. Moves the semaphone to outside the broadcast routine

* reverting the addition of error to AddPeer. It fails if the context is done and handling this case will be done some other time, when an actual context is passed into acquire.

* reverting the addition of error to AddPeer. It fails if the context is done and handling this case will be done some other time, when an actual context is passed into acquire.

* Fixing lint issue

* renaming semaphore to something more meaningful

* make default value 0, which is the same as the current behavior. 10 is the recommended value.

* adding new flag to manifest.go

* Adding changelog

* Improve the description of the parameter in the generated config file.

* Add metric to track the current number of active connections.

* Change metric to gauge type and rename it.

* e2e: Allow disabling the PEX reactor on all nodes in the testnet

* Apply suggestions from code review

* Update config/config.go comment

* fix lint error

* Improve config description

* Rename metric (remove experimental prefix)

* Add unit test

* Improve unit test

* Update mempool/reactor.go comment

---------

* Updating test file, leaving it broken for now

* mempool: Limit gossip connections to persistent and non-persistent peers (experimental) (#1584)

* Ignore persistent peers from limiting of outbound connections

* Update 1558-experimental-gossip-limiting.md

Update changeling

* Fix typo in mempool/metrics.go

* Use two independent configs and semaphores for persistent and non-persistent peers

* Forgot to rename in test

* Update metric description

* Rename semaphores

* Add comment to unit test

---------

* Reverting to old way of reporting errors

* Reverting change that shouldn't have been included in cherry-pick

* Reverting tests to use older functions

* fix rebase merge

---------

Co-authored-by: Adi Seredinschi <[email protected]>
Co-authored-by: Ethan Buchman <[email protected]>
Co-authored-by: Daniel Cason <[email protected]>
Co-authored-by: hvanz <[email protected]>
Co-authored-by: Andy Nogueira <[email protected]>
Co-authored-by: Sergio Mena <[email protected]>

* Comment that feature only applies to v0 mempool

* Fix new metric

* This commit makes the test be the same as in main, that is, it ignores the order of transactions in the receiving reactor. (#1629)

* Update .changelog/unreleased/improvements/1558-experimental-gossip-limiting.md

Co-authored-by: Thane Thomson <[email protected]>

---------

Co-authored-by: Adi Seredinschi <[email protected]>
Co-authored-by: Ethan Buchman <[email protected]>
Co-authored-by: Daniel Cason <[email protected]>
Co-authored-by: Andy Nogueira <[email protected]>
Co-authored-by: Sergio Mena <[email protected]>
Co-authored-by: lasaro <[email protected]>
Co-authored-by: Thane Thomson <[email protected]>
8 people authored Nov 16, 2023

Partially verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
We cannot verify signatures from co-authors, and some of the co-authors attributed to this commit require their commits to be signed.
commit 5f640ea52e2762b215a319d9d923c6ce9fa5b745
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
- `[mempool]` Add experimental feature to limit the number of persistent peers and non-persistent
peers to which the node gossip transactions (only for "v0" mempool).
([\#1558](https://github.com/cometbft/cometbft/pull/1558),
([\#1584](https://github.com/cometbft/cometbft/pull/1584))
- `[config]` Add mempool parameters `experimental_max_gossip_connections_to_persistent_peers` and
`experimental_max_gossip_connections_to_non_persistent_peers` for limiting the number of peers to
which the node gossip transactions.
([\#1558](https://github.com/cometbft/cometbft/pull/1558))
([\#1584](https://github.com/cometbft/cometbft/pull/1584))
27 changes: 27 additions & 0 deletions abci/example/kvstore/helpers.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package kvstore

import (
"fmt"
"strings"

"github.com/tendermint/tendermint/abci/types"
cmtrand "github.com/tendermint/tendermint/libs/rand"
)
@@ -34,3 +37,27 @@ func InitKVStore(app *PersistentKVStoreApplication) {
Validators: RandVals(1),
})
}

// Create a new transaction
func NewTx(key, value string) []byte {
return []byte(strings.Join([]string{key, value}, "="))
}

func NewRandomTx(size int) []byte {
if size < 4 {
panic("random tx size must be greater than 3")
}
return NewTx(cmtrand.Str(2), cmtrand.Str(size-3))
}

func NewRandomTxs(n int) [][]byte {
txs := make([][]byte, n)
for i := 0; i < n; i++ {
txs[i] = NewRandomTx(10)
}
return txs
}

func NewTxFromID(i int) []byte {
return []byte(fmt.Sprintf("%d=%d", i, i))
}
30 changes: 26 additions & 4 deletions config/config.go
Original file line number Diff line number Diff line change
@@ -728,6 +728,20 @@ type MempoolConfig struct {
// Including space needed by encoding (one varint per transaction).
// XXX: Unused due to https://github.com/tendermint/tendermint/issues/5796
MaxBatchBytes int `mapstructure:"max_batch_bytes"`
// Experimental parameters to limit gossiping txs to up to the specified number of peers.
// This feature is only available for the default mempool (version config set to "v0").
// We use two independent upper values for persistent peers and for non-persistent peers.
// Unconditional peers are not affected by this feature.
// If we are connected to more than the specified number of persistent peers, only send txs to
// the first ExperimentalMaxGossipConnectionsToPersistentPeers of them. If one of those
// persistent peers disconnects, activate another persistent peer. Similarly for non-persistent
// peers, with an upper limit of ExperimentalMaxGossipConnectionsToNonPersistentPeers.
// If set to 0, the feature is disabled for the corresponding group of peers, that is, the
// number of active connections to that group of peers is not bounded.
// For non-persistent peers, if enabled, a value of 10 is recommended based on experimental
// performance results using the default P2P configuration.
ExperimentalMaxGossipConnectionsToPersistentPeers int `mapstructure:"experimental_max_gossip_connections_to_persistent_peers"`
ExperimentalMaxGossipConnectionsToNonPersistentPeers int `mapstructure:"experimental_max_gossip_connections_to_non_persistent_peers"`

// TTLDuration, if non-zero, defines the maximum amount of time a transaction
// can exist for in the mempool.
@@ -755,10 +769,12 @@ func DefaultMempoolConfig() *MempoolConfig {
WalPath: "",
// Each signature verification takes .5ms, Size reduced until we implement
// ABCI Recheck
Size: 5000,
MaxTxsBytes: 1024 * 1024 * 1024, // 1GB
CacheSize: 10000,
MaxTxBytes: 1024 * 1024, // 1MB
Size: 5000,
MaxTxsBytes: 1024 * 1024 * 1024, // 1GB
CacheSize: 10000,
MaxTxBytes: 1024 * 1024, // 1MB
ExperimentalMaxGossipConnectionsToNonPersistentPeers: 0,
ExperimentalMaxGossipConnectionsToPersistentPeers: 0,
TTLDuration: 0 * time.Second,
TTLNumBlocks: 0,
}
@@ -796,6 +812,12 @@ func (cfg *MempoolConfig) ValidateBasic() error {
if cfg.MaxTxBytes < 0 {
return errors.New("max_tx_bytes can't be negative")
}
if cfg.ExperimentalMaxGossipConnectionsToPersistentPeers < 0 {
return errors.New("experimental_max_gossip_connections_to_persistent_peers can't be negative")
}
if cfg.ExperimentalMaxGossipConnectionsToNonPersistentPeers < 0 {
return errors.New("experimental_max_gossip_connections_to_non_persistent_peers can't be negative")
}
return nil
}

15 changes: 15 additions & 0 deletions config/toml.go
Original file line number Diff line number Diff line change
@@ -397,6 +397,21 @@ ttl-duration = "{{ .Mempool.TTLDuration }}"
# it's insertion time into the mempool is beyond ttl-duration.
ttl-num-blocks = {{ .Mempool.TTLNumBlocks }}
# Experimental parameters to limit gossiping txs to up to the specified number of peers.
# This feature is only available for the default mempool (version config set to "v0").
# We use two independent upper values for persistent peers and for non-persistent peers.
# Unconditional peers are not affected by this feature.
# If we are connected to more than the specified number of persistent peers, only send txs to
# the first experimental_max_gossip_connections_to_persistent_peers of them. If one of those
# persistent peers disconnects, activate another persistent peer. Similarly for non-persistent
# peers, with an upper limit of experimental_max_gossip_connections_to_non_persistent_peers.
# If set to 0, the feature is disabled for the corresponding group of peers, that is, the
# number of active connections to that group of peers is not bounded.
# For non-persistent peers, if enabled, a value of 10 is recommended based on experimental
# performance results using the default P2P configuration.
experimental_max_gossip_connections_to_persistent_peers = {{ .Mempool.ExperimentalMaxGossipConnectionsToPersistentPeers }}
experimental_max_gossip_connections_to_non_persistent_peers = {{ .Mempool.ExperimentalMaxGossipConnectionsToNonPersistentPeers }}
#######################################################
### State Sync Configuration Options ###
#######################################################
26 changes: 19 additions & 7 deletions mempool/metrics.go
Original file line number Diff line number Diff line change
@@ -42,6 +42,10 @@ type Metrics struct {

// Number of times transactions are rechecked in the mempool.
RecheckTimes metrics.Counter

// Number of connections being actively used for gossiping transactions
// (experimental feature).
ActiveOutboundConnections metrics.Gauge
}

// PrometheusMetrics returns Metrics build using Prometheus client library.
@@ -95,18 +99,26 @@ func PrometheusMetrics(namespace string, labelsAndValues ...string) *Metrics {
Name: "recheck_times",
Help: "Number of times transactions are rechecked in the mempool.",
}, labels).With(labelsAndValues...),

ActiveOutboundConnections: prometheus.NewGaugeFrom(stdprometheus.GaugeOpts{
Namespace: namespace,
Subsystem: MetricsSubsystem,
Name: "active_outbound_connections",
Help: "Number of connections being actively used for gossiping transactions (experimental feature).",
}, labels).With(labelsAndValues...),
}
}

// NopMetrics returns no-op Metrics.
func NopMetrics() *Metrics {
return &Metrics{
Size: discard.NewGauge(),
SizeBytes: discard.NewGauge(),
TxSizeBytes: discard.NewHistogram(),
FailedTxs: discard.NewCounter(),
RejectedTxs: discard.NewCounter(),
EvictedTxs: discard.NewCounter(),
RecheckTimes: discard.NewCounter(),
Size: discard.NewGauge(),
SizeBytes: discard.NewGauge(),
TxSizeBytes: discard.NewHistogram(),
FailedTxs: discard.NewCounter(),
RejectedTxs: discard.NewCounter(),
EvictedTxs: discard.NewCounter(),
RecheckTimes: discard.NewCounter(),
ActiveOutboundConnections: discard.NewGauge(),
}
}
22 changes: 16 additions & 6 deletions mempool/v0/clist_mempool_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package v0

import (
"crypto/rand"
"encoding/binary"
"fmt"
mrand "math/rand"
@@ -96,16 +95,27 @@ func ensureFire(t *testing.T, ch <-chan struct{}, timeoutMS int) {
}
}

func callCheckTx(t *testing.T, mp mempool.Mempool, txs types.Txs) {
txInfo := mempool.TxInfo{SenderID: 0}
for i, tx := range txs {
if err := mp.CheckTx(tx, nil, txInfo); err != nil {
// Skip invalid txs.
// TestMempoolFilters will fail otherwise. It asserts a number of txs
// returned.
if mempool.IsPreCheckError(err) {
continue
}
t.Fatalf("CheckTx failed: %v while checking #%d tx", err, i)
}
}
}

func checkTxs(t *testing.T, mp mempool.Mempool, count int, peerID uint16) types.Txs {
txs := make(types.Txs, count)
txInfo := mempool.TxInfo{SenderID: peerID}
for i := 0; i < count; i++ {
txBytes := make([]byte, 20)
txBytes := kvstore.NewRandomTx(20)
txs[i] = txBytes
_, err := rand.Read(txBytes)
if err != nil {
t.Error(err)
}
if err := mp.CheckTx(txBytes, nil, txInfo); err != nil {
// Skip invalid txs.
// TestMempoolFilters will fail otherwise. It asserts a number of txs
44 changes: 43 additions & 1 deletion mempool/v0/reactor.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package v0

import (
"context"
"errors"
"fmt"
"time"
@@ -15,6 +16,7 @@ import (
"github.com/tendermint/tendermint/p2p"
protomem "github.com/tendermint/tendermint/proto/tendermint/mempool"
"github.com/tendermint/tendermint/types"
"golang.org/x/sync/semaphore"
)

// Reactor handles mempool tx broadcasting amongst peers.
@@ -25,6 +27,12 @@ type Reactor struct {
config *cfg.MempoolConfig
mempool *CListMempool
ids *mempoolIDs

// Semaphores to keep track of how many connections to peers are active for broadcasting
// transactions. Each semaphore has a capacity that puts an upper bound on the number of
// connections for different groups of peers.
activePersistentPeersSemaphore *semaphore.Weighted
activeNonPersistentPeersSemaphore *semaphore.Weighted
}

type mempoolIDs struct {
@@ -98,6 +106,9 @@ func NewReactor(config *cfg.MempoolConfig, mempool *CListMempool) *Reactor {
ids: newMempoolIDs(),
}
memR.BaseReactor = *p2p.NewBaseReactor("Mempool", memR)
memR.activePersistentPeersSemaphore = semaphore.NewWeighted(int64(memR.config.ExperimentalMaxGossipConnectionsToPersistentPeers))
memR.activeNonPersistentPeersSemaphore = semaphore.NewWeighted(int64(memR.config.ExperimentalMaxGossipConnectionsToNonPersistentPeers))

return memR
}

@@ -145,7 +156,37 @@ func (memR *Reactor) GetChannels() []*p2p.ChannelDescriptor {
// It starts a broadcast routine ensuring all txs are forwarded to the given peer.
func (memR *Reactor) AddPeer(peer p2p.Peer) {
if memR.config.Broadcast {
go memR.broadcastTxRoutine(peer)
go func() {
// Always forward transactions to unconditional peers.
if !memR.Switch.IsPeerUnconditional(peer.ID()) {
if peer.IsPersistent() && memR.config.ExperimentalMaxGossipConnectionsToPersistentPeers > 0 {
// Block sending transactions to peer until one of the connections become
// available in the semaphore.
if err := memR.activePersistentPeersSemaphore.Acquire(context.TODO(), 1); err != nil {
memR.Logger.Error("Failed to acquire semaphore: %v", err)
return
}
// Release semaphore to allow other peer to start sending transactions.
defer memR.activePersistentPeersSemaphore.Release(1)
defer memR.mempool.metrics.ActiveOutboundConnections.Add(-1)
}

if !peer.IsPersistent() && memR.config.ExperimentalMaxGossipConnectionsToNonPersistentPeers > 0 {
// Block sending transactions to peer until one of the connections become
// available in the semaphore.
if err := memR.activeNonPersistentPeersSemaphore.Acquire(context.TODO(), 1); err != nil {
memR.Logger.Error("Failed to acquire semaphore: %v", err)
return
}
// Release semaphore to allow other peer to start sending transactions.
defer memR.activeNonPersistentPeersSemaphore.Release(1)
defer memR.mempool.metrics.ActiveOutboundConnections.Add(-1)
}
}

memR.mempool.metrics.ActiveOutboundConnections.Add(1)
memR.broadcastTxRoutine(peer)
}()
}
}

@@ -222,6 +263,7 @@ func (memR *Reactor) broadcastTxRoutine(peer p2p.Peer) {
if !memR.IsRunning() || !peer.IsRunning() {
return
}

// This happens because the CElement we were looking at got garbage
// collected (removed). That is, .NextWait() returned nil. Go ahead and
// start from the beginning.
81 changes: 75 additions & 6 deletions mempool/v0/reactor_test.go
Original file line number Diff line number Diff line change
@@ -319,6 +319,51 @@ func TestLegacyReactorReceiveBasic(t *testing.T) {
})
}

// Test the experimental feature that limits the number of outgoing connections for gossiping
// transactions (only non-persistent peers).
// Note: in this test we know which gossip connections are active or not because of how the p2p
// functions are currently implemented, which affects the order in which peers are added to the
// mempool reactor.
func TestMempoolReactorMaxActiveOutboundConnections(t *testing.T) {
config := cfg.TestConfig()
config.Mempool.ExperimentalMaxGossipConnectionsToNonPersistentPeers = 1
reactors := makeAndConnectReactors(config, 4)
defer func() {
for _, r := range reactors {
if err := r.Stop(); err != nil {
assert.NoError(t, err)
}
}
}()
for _, r := range reactors {
for _, peer := range r.Switch.Peers().List() {
peer.Set(types.PeerStateKey, peerState{1})
}
}

// Add a bunch transactions to the first reactor.
txs := newUniqueTxs(100)
callCheckTx(t, reactors[0].mempool, txs)

// Wait for all txs to be in the mempool of the second reactor; the other reactors should not
// receive any tx. (The second reactor only sends transactions to the first reactor.)
checkTxsInMempool(t, txs, reactors[1], 0)
for _, r := range reactors[2:] {
require.Zero(t, r.mempool.Size())
}

// Disconnect the second reactor from the first reactor.
firstPeer := reactors[0].Switch.Peers().List()[0]
reactors[0].Switch.StopPeerGracefully(firstPeer)

// Now the third reactor should start receiving transactions from the first reactor; the fourth
// reactor's mempool should still be empty.
checkTxsInMempool(t, txs, reactors[2], 0)
for _, r := range reactors[3:] {
require.Zero(t, r.mempool.Size())
}
}

// mempoolLogger is a TestingLogger which uses a different
// color for each validator ("validator" key must exist).
func mempoolLogger() log.Logger {
@@ -349,19 +394,26 @@ func makeAndConnectReactors(config *cfg.Config, n int) []*Reactor {
p2p.MakeConnectedSwitches(config.P2P, n, func(i int, s *p2p.Switch) *p2p.Switch {
s.AddReactor("MEMPOOL", reactors[i])
return s

}, p2p.Connect2Switches)
return reactors
}

func newUniqueTxs(n int) types.Txs {
txs := make(types.Txs, n)
for i := 0; i < n; i++ {
txs[i] = kvstore.NewTxFromID(i)
}
return txs
}

func waitForTxsOnReactors(t *testing.T, txs types.Txs, reactors []*Reactor) {
// wait for the txs in all mempools
wg := new(sync.WaitGroup)
for i, reactor := range reactors {
wg.Add(1)
go func(r *Reactor, reactorIndex int) {
defer wg.Done()
waitForTxsOnReactor(t, txs, r, reactorIndex)
checkTxsInOrder(t, txs, r, reactorIndex)
}(reactor, i)
}

@@ -379,13 +431,30 @@ func waitForTxsOnReactors(t *testing.T, txs types.Txs, reactors []*Reactor) {
}
}

func waitForTxsOnReactor(t *testing.T, txs types.Txs, reactor *Reactor, reactorIndex int) {
mempool := reactor.mempool
for mempool.Size() < len(txs) {
// Wait until the mempool has a certain number of transactions.
func waitForNumTxsInMempool(numTxs int, reactor *Reactor) {
for reactor.mempool.Size() < numTxs {
time.Sleep(time.Millisecond * 100)
}
}

// Wait until all txs are in the mempool and check that the number of txs in the
// mempool is as expected.
func checkTxsInMempool(t *testing.T, txs types.Txs, reactor *Reactor, _ int) {
waitForNumTxsInMempool(len(txs), reactor)

reapedTxs := reactor.mempool.ReapMaxTxs(len(txs))
require.Equal(t, len(txs), len(reapedTxs))
require.Equal(t, len(txs), reactor.mempool.Size())
}

// Wait until all txs are in the mempool and check that they are in the same
// order as given.
func checkTxsInOrder(t *testing.T, txs types.Txs, reactor *Reactor, reactorIndex int) {
waitForNumTxsInMempool(len(txs), reactor)

reapedTxs := mempool.ReapMaxTxs(len(txs))
// Check that all transactions in the mempool are in the same order as txs.
reapedTxs := reactor.mempool.ReapMaxTxs(len(txs))
for i, tx := range txs {
assert.Equalf(t, tx, reapedTxs[i],
"txs at index %d on reactor %d don't match: %v vs %v", i, reactorIndex, tx, reapedTxs[i])
4 changes: 4 additions & 0 deletions test/e2e/pkg/manifest.go
Original file line number Diff line number Diff line change
@@ -68,6 +68,10 @@ type Manifest struct {
// Enable or disable Prometheus metrics on all nodes.
// Defaults to false (disabled).
Prometheus bool `toml:"prometheus"`

// Maximum number of peers to which the node gossip transactions
ExperimentalMaxGossipConnectionsToPersistentPeers uint `toml:"experimental_max_gossip_connections_to_persistent_peers"`
ExperimentalMaxGossipConnectionsToNonPersistentPeers uint `toml:"experimental_max_gossip_connections_to_non_persistent_peers"`
}

// ManifestNode represents a node in a testnet manifest.
38 changes: 21 additions & 17 deletions test/e2e/pkg/testnet.go
Original file line number Diff line number Diff line change
@@ -57,23 +57,25 @@ const (

// Testnet represents a single testnet.
type Testnet struct {
Name string
File string
Dir string
IP *net.IPNet
InitialHeight int64
InitialState map[string]string
Validators map[*Node]int64
ValidatorUpdates map[int64]map[*Node]int64
Nodes []*Node
KeyType string
Evidence int
LoadTxSizeBytes int
LoadTxBatchSize int
LoadTxConnections int
ABCIProtocol string
UpgradeVersion string
Prometheus bool
Name string
File string
Dir string
IP *net.IPNet
InitialHeight int64
InitialState map[string]string
Validators map[*Node]int64
ValidatorUpdates map[int64]map[*Node]int64
Nodes []*Node
KeyType string
Evidence int
LoadTxSizeBytes int
LoadTxBatchSize int
LoadTxConnections int
ABCIProtocol string
UpgradeVersion string
Prometheus bool
ExperimentalMaxGossipConnectionsToPersistentPeers uint
ExperimentalMaxGossipConnectionsToNonPersistentPeers uint
}

// Node represents a CometBFT node in a testnet.
@@ -136,6 +138,8 @@ func LoadTestnet(manifest Manifest, fname string, ifd InfrastructureData) (*Test
ABCIProtocol: manifest.ABCIProtocol,
UpgradeVersion: manifest.UpgradeVersion,
Prometheus: manifest.Prometheus,
ExperimentalMaxGossipConnectionsToPersistentPeers: manifest.ExperimentalMaxGossipConnectionsToPersistentPeers,
ExperimentalMaxGossipConnectionsToNonPersistentPeers: manifest.ExperimentalMaxGossipConnectionsToNonPersistentPeers,
}
if len(manifest.KeyType) != 0 {
testnet.KeyType = manifest.KeyType
2 changes: 2 additions & 0 deletions test/e2e/runner/setup.go
Original file line number Diff line number Diff line change
@@ -165,6 +165,8 @@ func MakeConfig(node *e2e.Node) (*config.Config, error) {
cfg.P2P.AddrBookStrict = false
cfg.DBBackend = node.Database
cfg.StateSync.DiscoveryTime = 5 * time.Second
cfg.Mempool.ExperimentalMaxGossipConnectionsToNonPersistentPeers = int(node.Testnet.ExperimentalMaxGossipConnectionsToNonPersistentPeers)
cfg.Mempool.ExperimentalMaxGossipConnectionsToPersistentPeers = int(node.Testnet.ExperimentalMaxGossipConnectionsToPersistentPeers)

switch node.ABCIProtocol {
case e2e.ProtocolUNIX: