8000 chore(mempool/lanes): merge main into feature branch by hvanz · Pull Request #3481 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

chore(mempool/lanes): merge main into feature branch #3481

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

Merged
merged 187 commits into from
Jul 11, 2024

Conversation

hvanz
Copy link
Member
@hvanz hvanz commented Jul 10, 2024

Also assign new number to ADR (from 113 to 118).


PR checklist

  • Tests written/updated
  • Changelog entry added in .changelog (we use unclog to manage our changelog)
  • Updated relevant documentation (docs/ or spec/) and code comments
  • Title follows the Conventional Commits spec

ValarDragon and others added 30 commits April 23, 2024 12:45
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

Many RPC methods require JSON marshalled responses. We saw this taking a
notable amount of heap allocation in query serving full nodes. This PR
removes some extra heap allocations that were being done. We avoided
using the more efficient encoder.Encode before, because it added a
newline. This PR changes the function signature for these private
methods to be using *bytes.Buffer, and then uses the in-buffer methods
(rather than a second copy). We then just truncate the final byte after
each such call, which does not waste any allocations.

I added a benchmark for the most complex test case. 

OLD:
```
BenchmarkJsonMarshalStruct-12              78992             15542 ns/op            4487 B/op        191 allocs/op
```
New:
```
BenchmarkJsonMarshalStruct-12              93346             11132 ns/op            3245 B/op         58 allocs/op
```

Roughly a 3-4x reduction in the number of allocations, and 20% speedup.

#### PR checklist

- [x] Tests written/updated - Existing tests cover this
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
Addresses #2840.

The same approach taken for the `send()` method is also adopted for the
`onReceive()` method.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
…Type` and `PubKeyBytes` (#2843)

This PR deprecates `PubKey` in `abci.ValidatorUpdate` and adds two new
fields:

- string `PubKeyType`
- bytes `PubKeyBytes`

Co-authored by: @tac0turtle 

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Marko Baricevic <markobaricevic3778@gmail.com>
Co-authored-by: Andy Nogueira <me@andynogueira.dev>
Closes #2871

<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

#### PR checklist

- [ ] ~~Tests written/updated~~
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [ ] ~~Updated relevant documentation (`docs/` or `spec/`) and code
comments~~
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

fix function name in comment

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [ ] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

Signed-off-by: dockercui <dockercui@aliyun.com>
Replaces #2152

Co-authored by: @faddat 

---

#### PR checklist

- [ ] ~~Tests written/updated~~
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [ ] ~~Updated relevant documentation (`docs/` or `spec/`) and code
comments~~
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
In Osmosis we see massive amounts of heap pressure/allocations coming
from txIndex matchRange. (Screenshot below from ~1 hour of heap
profiling)


![image](https://github.com/cometbft/cometbft/assets/6440154/bf2dfe89-56f0-4824-815b-c5822d20568b)

This PR is expected to fully compatibly drop this down by a factor of 3.
It:
- Does not get Key() twice (160GB allocation saved)
- Uses no heap allocations for isTagKey (120GB saved)
- Does not string cast or do strings.Split in parsing the value (~400GB
expected saved)
- Reuses the big.Int (24GB saved)

The remaining RAM overhead from .Key() needs a cometbft-db API change.
The remaining RAM overhead from extracting the value can be saved with
an unsafe call for casting the output to string with no heap allocation,
but we can do that in a separate PR.

---

#### PR checklist

- [x] Tests written/updated - All existing tests still apply
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

This PR significantly speeds up bitArray.PickRandom which is used in
VoteGossip and BlockPart gossip. We saw for a query serving full node,
over an hour, this was a very large amount of RAM allocations. (75GB of
RAM!)


![image](https://github.com/cometbft/cometbft/assets/6440154/755918a5-0cef-4e67-a47e-ce8a56aa1cd5)

This PR drops it down to 0 allocations, and makes the routine 10x faster
on my machine.

OLD:
```
BenchmarkPickRandomBitArray-12           1545199               846.1 ns/op          1280 B/op          1 allocs/op
```
NEW:
```
BenchmarkPickRandomBitArray-12          22192857                75.39 ns/op            0 B/op          0 allocs/op
```

I think the new tests I wrote make this more tested than the old code
that was here tbh, but pls let me know if theres more tests we'd like to
see!

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
Follow-up to #2841

---

#### PR checklist

- [x] Tests written/updated
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [ ] ~~Updated relevant documentation (`docs/` or `spec/`) and code
comments~~
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
)

Closes #2225

If the app returns an error on an ABCI call (in particular CheckTx),
CometBFT should stop, because the error is unrecoverable.

---

#### PR checklist

- [X] Tests written/updated
- [X] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

Since moving to faster blocks, Osmosis public RPC nodes have noticed
massive RAM spikes, resulting in nodes constantly crashing:

![Screenshot 2024-04-20 at 11 25
36 AM](https://github.com/osmosis-labs/cometbft/assets/40078083/18d0513e-25fc-4510-b4bd-b48472a9df69)

After heap profiling, the issue was clearly coming from TxSearch,
showing that it was unmarshaling a huge amount of data.

![Screenshot 2024-04-20 at 11 28
29 AM](https://github.com/osmosis-labs/cometbft/assets/40078083/5d88a66a-c72d-4752-8770-a2c00e6d7669)

After looking into the method, the issue is that txSearch retrieves all
hashes (filtered by the query condition), but we call Get (and therefore
unmarshal) every filtered transaction from the transaction index store,
regaurdless whether or not the transactions are within the pagination
request. Therefore, if one were to call txSearch on an event that
happens on almost every transaction, this causes the node to unmarshal
essentially every transaction.

We have all the data we need in the key though to sort the transaction
hashes without unmarshaling the transactions at all! This PR filters and
sorts the hashes, paginates them, and then only retrieves the
transactions that fall in the page being requested.

We have run this patch on two of our RPC nodes, and have seen zero
spikes on the patched ones thus far!

![Screenshot 2024-04-20 at 11 33
11 AM](https://github.com/osmosis-labs/cometbft/assets/40078083/fd815f81-5756-45bd-b1c0-818e6774ea53)

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
)

Bumps
[bufbuild/buf-setup-action](https://github.com/bufbuild/buf-setup-action)
from 1.30.1 to 1.31.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/bufbuild/buf-setup-action/releases">bufbuild/buf-setup-action's
releases</a>.</em></p>
<blockquote>
<h2>v1.31.0</h2>
<p>Release v1.31.0</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/bufbuild/buf-setup-action/commit/480a0ee8a588045b52a847b48138c6f377a89519"><code>480a0ee</code></a>
Release v1.31.0 (<a
href="https://redirect.github.com/bufbuild/buf-setup-action/issues/202">#202</a>)</li>
<li>See full diff in <a
href="https://github.com/bufbuild/buf-setup-action/compare/v1.30.1...v1.31.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=bufbuild/buf-setup-action&package-manager=github_actions&previous-version=1.30.1&new-version=1.31.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [github.com/rs/cors](https://github.com/rs/cors) from 1.10.1 to
1.11.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rs/cors/commit/4c32059b2756926619f6bf70281b91be7b5dddb2"><code>4c32059</code></a>
Normalize allowed request headers and store them in a sorted set (fixes
<a
href="https://redirect.github.com/rs/cors/issues/170">#170</a>)...</li>
<li><a
href="https://github.com/rs/cors/commit/8d33ca4794eae9bcb270e306fd3e9b89cf07ec4c"><code>8d33ca4</code></a>
Complete documentation; deprecate AllowOriginRequestFunc in favour of
AllowOr...</li>
<li><a
href="https://github.com/rs/cors/commit/af821aecfc8d5a51ab050c39b85ae4698cc16a82"><code>af821ae</code></a>
Merge branch 'jub0bs-master'</li>
<li><a
href="https://github.com/rs/cors/commit/0bcf73f5c969d9ae35f1ed986ab27fbb37a58ff2"><code>0bcf73f</code></a>
Update benchmark</li>
<li><a
href="https://github.com/rs/cors/commit/eacc8e8b6c597a9f21aa46971bdfa7cfd39fbcc8"><code>eacc8e8</code></a>
Fix skewed middleware benchmarks (<a
href="https://redirect.github.com/rs/cors/issues/165">#165</a>)</li>
<li><a
href="https://github.com/rs/cors/commit/9297f1560644af50a550ea860e2e7a55d8fa70e6"><code>9297f15</code></a>
Respect the documented precedence of options (<a
href="https://redirect.github.com/rs/cors/issues/163">#163</a>)</li>
<li><a
href="https://github.com/rs/cors/commit/73f81b45a644ae054838a58b287ff96a4d218c30"><code>73f81b4</code></a>
Fix readme benchmark rendering (<a
href="https://redirect.github.com/rs/cors/issues/161">#161</a>)</li>
<li>See full diff in <a
href="https://github.com/rs/cors/compare/v1.10.1...v1.11.0">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
and `pub_key_bytes` in `privval.PubKeyResponse`, `types.Validator` and
`types.SimpleValidator`.

Closes #2878
Follow-up to #2843
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Sergio Mena <sergio@informal.systems>
in favor of `timeout_commit=0`

Closes #2891

<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

#### PR checklist

- [ ] ~~Tests written/updated~~
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

Closes #2923 

Caches the block hash to ensure we only compute it once in consensus
execution.

---

#### PR checklist

- [x] Tests written/updated - not sure what test I should write, any
suggestions?
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [ ] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

Signed-off-by: MarkDaveny <peicuiping@aliyun.com>
…#2911)

Component of #2869 

This on its own is an expected 1% speedup to blocksync on osmosis
mainnet right now.

I originally considered keeping the log lines but with only creating the
logger cost if there is an error, but these are debug logs I've never
seen. I think its better to just remove these debug logs directly,
rather than worry about maintaining them. These aren't even that
concerning scenarios I feel like, as more of the stack moves away from
these.


---

#### PR checklist

- [x] Tests written/updated - Covered by existing tests
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [X] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
… Anoma) (#2929)

---

#### PR checklist

- [ ] ~~Tests written/updated~~
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Andy Nogueira <me@andynogueira.dev>
#2928)

<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

Simplest component of #2854 

We already run ValidateBlock in finalizeCommit, so this PR removes one
extra redundant call by using ApplyVerifiedBlock. (The other call is
also redundant, but that likely requires a more complex caching strategy
as noted in #2854 to remedy)

From my understanding of these benchmarks, at Osmosis 150 validators,
this should be saving ~13ms of execution time per block.

---

#### PR checklist

- [X] Tests written/updated - Theres no test to update, as its
impossible to reach the difference in codepaths!
- [X] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
closes #2769

merging configuration documents

---

#### PR checklist

- [ ] Tests written/updated
- [X] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [X] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
Small refactor to simplify the calls to "is timely"

---

#### PR checklist

- [ ] Tests written/updated
- [ ] ~~Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)~~
- [ ] ~~Updated relevant documentation (`docs/` or `spec/`) and code
comments~~
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
Speeds up 5% of the non-IO time overhead from
`channel.WritePacketMsgTo`. The CPU time overhead in this function is
quite significant, CPU time is more than 3 times the syscall time for
writing to the net buffer. Working on a github issue for more
substantial refactor / time eliminations, but this 3s is easy enough.

We don't even use this codepath, so this make slice is entirely wasted.
However we should do things that reduce this overhead further.


![image](https://github.com/cometbft/cometbft/assets/6440154/e02e45bf-d6ff-4e11-9983-e81ca1102dc8)

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
This PR is a driveby change. We were doing an atomic read here, but this
is unnecessary. Nothing in the codebase modified this variable after
instantiation.

Doesn't really feel changelog worthy, but I can add one if we want. Felt
like a minor code nit
…et delays (#2952)

Somehow this minint call is appearing in CPU profiles. Its too large of
an appearance to be declared as noise, but I really don't get why its
there. Must be some weird system effect I don't get. (perhaps due to
being the result of a function call for a slice index? idk)

This PR just removes the function call, since its not needed, as we
already branch on the if statement.

Profile showing it:

![image](https://github.com/cometbft/cometbft/assets/6440154/a12c8918-e4ce-4a3d-bad4-5ae678988f94)

Contributes a 3% improvement to #2951 

---

#### PR checklist

- [x] Tests written/updated - fully compatible with what already exists
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
…ps highlight performance improvements (#2953)

Fully compatible refactor to the `sendSomePacketMsgs` loop, that I think
makes it easier to:
1) Understand the code
2) See how we improve it for serial time performance
3) Puts my notes for how to improve some consensus gossip bottlenecks.

---

#### PR checklist

- [x] Tests written/updated - N/A, this is fully compatible so no new
test updates needed
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog) - I dont think refactors get changelogs?
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
close: #2867 

Adds middleware for the JSONRPC server to enforce a configurable maximum
batch size for RPC requests.

---

#### PR checklist

- [ ] Tests written/updated
- [X] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [X] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
Speedup ExtendedCommit.BitArray() by making a direct constructor that
does not go through mutexes. I expect this to be a 10x performance
improvement. (It also removes the duffcopies and reduces setIndex
proportion of time here)

This removes this time (which is mostly coming from mutex calls): 

![image](https://github.com/cometbft/cometbft/assets/6440154/da11d57d-6bea-40ea-a0fa-9209ea3e22f8)

Later on we should instead make an API that lets us randomly sample from
a bit array with no bit array copying needed. (But that makes the
interface messier)

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
…ng (#2984)

In the metric `MessageReceiveBytesTotal`, the only value produced in the
`message_type` label is `v1_Message`. This is because we are reading the
`msg` variable before the message is unwrapped. This bug was recently
introduced in #2851.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [ ] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
Closes #2896


---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [ ] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
andynog and others added 15 commits July 5, 2024 15:52
close: #3002 

This PR fixes the issue reported above.

This is not a storage issue in particular, the results are still in
storage after an upgrade, but not returned properly by the RPC endpoint.
The fix is to make the `/block_results` endpoint in `v0.38` to return
properly a legacy ABCI response created with `v0.37`.

Once this fix is merged on `v0.38` and a patch release is cut, any node
on `v0.38` (e.g. an archive node) that applies the patch release, should
have the results returned properly by the RPC `/block_results` endpoint.

---

#### PR checklist

- [X] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] ~~Updated relevant documentation (`docs/` or `spec/`) and code
comments~~
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Sergio Mena <sergio@informal.systems>
Co-authored-by: Daniel <daniel.cason@informal.systems>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Daniel Wedul <github@wedul.com>
Bumps
[docker/setup-buildx-action](https://github.com/docker/setup-buildx-action)
from 3.3.0 to 3.4.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/setup-buildx-action/releases">docker/setup-buildx-action's
releases</a>.</em></p>
<blockquote>
<h2>v3.4.0</h2>
<ul>
<li>Throw error message instead of exit code by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/315">docker/setup-buildx-action#315</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.20.0 to 0.31.0 in
<a
href="https://redirect.github.com/docker/setup-buildx-action/pull/321">docker/setup-buildx-action#321</a>
<a
href="https://redirect.github.com/docker/setup-buildx-action/pull/338">docker/setup-buildx-action#338</a></li>
<li>Bump braces from 3.0.2 to 3.0.3 in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/329">docker/setup-buildx-action#329</a></li>
<li>Bump undici from 5.28.3 to 5.28.4 in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/312">docker/setup-buildx-action#312</a></li>
<li>Bump uuid from 9.0.1 to 10.0.0 in <a
href="https://redirect.github.com/docker/setup-buildx-action/pull/326">docker/setup-buildx-action#326</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/setup-buildx-action/compare/v3.3.0...v3.4.0">https://github.com/docker/setup-buildx-action/compare/v3.3.0...v3.4.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/4fd812986e6c8c2a69e18311145f9371337f27d4"><code>4fd8129</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/312">#312</a>
from docker/dependabot/npm_and_yarn/undici-5.28.4</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/3386dc42516ab92e4e24aa17dc95c75071fd997b"><code>3386dc4</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/d191aef416290b5242260e14c300ec8580d88361"><code>d191aef</code></a>
build(deps): bump undici from 5.28.3 to 5.28.4</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/f686054aab0113168a311abff6906d0d5c3cb621"><code>f686054</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/338">#338</a>
from docker/dependabot/npm_and_yarn/docker/actions-to...</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/78547859d74de62e8677dc04e91543d17e1cea3e"><code>7854785</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/830928c706778d4a2e4eac2a48b0d87031f061f6"><code>830928c</code></a>
fix builder type path</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/26d2aec17326d17abd5448ad10f89751b9fce5dc"><code>26d2aec</code></a>
build(deps): bump <code>@​docker/actions-toolkit</code> from 0.23.0 to
0.31.0</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/ab17e3ec80f3c97b179d7c93beff117fca4f43a8"><code>ab17e3e</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/339">#339</a>
from crazy-max/missing-types-jsyaml</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/d79cb80903cfc9136da759444b760f0a142ca231"><code>d79cb80</code></a>
missing types for js-yaml</li>
<li><a
href="https://github.com/docker/setup-buildx-action/commit/13cf78894f084afab128ef772a0a1eada7478170"><code>13cf788</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/setup-buildx-action/issues/326">#326</a>
from docker/dependabot/npm_and_yarn/uuid-10.0.0</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/setup-buildx-action/compare/v3.3.0...v3.4.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/setup-buildx-action&package-manager=github_actions&previous-version=3.3.0&new-version=3.4.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps
[docker/build-push-action](https://github.com/docker/build-push-action)
from 6.2.0 to 6.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/build-push-action/releases">docker/build-push-action's
releases</a>.</em></p>
<blockquote>
<h2>v6.3.0</h2>
<ul>
<li><code>DOCKER_BUILD_RECORD_UPLOAD</code> environment variable to
enable/disable build record upload by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/1172">docker/build-push-action#1172</a></li>
<li><code>DOCKER_BUILD_NO_SUMMARY</code> has been deprecated. Set
<code>DOCKER_BUILD_SUMMARY</code> to <code>false</code> instead by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/build-push-action/pull/1170">docker/build-push-action#1170</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1173">docker/build-push-action#1173</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.28.0 to 0.31.0 in
<a
href="https://redirect.github.com/docker/build-push-action/pull/1171">docker/build-push-action#1171</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1159">docker/build-push-action#1159</a>
<a
href="https://redirect.github.com/docker/build-push-action/pull/1169">docker/build-push-action#1169</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/build-push-action/compare/v6.2.0...v6.3.0">https://github.com/docker/build-push-action/compare/v6.2.0...v6.3.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/docker/build-push-action/commit/1a162644f9a7e87d8f4b053101d1d9a712edc18c"><code>1a16264</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1172">#1172</a>
from crazy-max/build-export-disable</li>
<li><a
href="https://github.com/docker/build-push-action/commit/9eea5481959e459ec651b7e822a59ca2589d7eeb"><code>9eea548</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/11c2faaa9eaca329b60ac7e06d5b0a39bb83ceee"><code>11c2faa</code></a>
rename DOCKER_BUILD_EXPORT_RETENTION_DAYS to
DOCKER_BUILD_RECORD_RETENTION_DAYS</li>
<li><a
href="https://github.com/docker/build-push-action/commit/de2365af33b297214817371552545c663ca68972"><code>de2365a</code></a>
opt to disable build record upload</li>
<li><a
href="https://github.com/docker/build-push-action/commit/bca5082da7f40c0685bc546726266df13a2f9f4b"><code>bca5082</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1173">#1173</a>
from crazy-max/build-summary-env-change</li>
<li><a
href="https://github.com/docker/build-push-action/commit/e7aab408d9276621021be0d58bf5cc6eefc65a64"><code>e7aab40</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/63eb7590c6ed8db55bbbcb073d24d65171303129"><code>63eb759</code></a>
switch DOCKER_BUILD_SUMMARY_DISABLE to DOCKER_BUILD_SUMMARY</li>
<li><a
href="https://github.com/docker/build-push-action/commit/53ec48606f270c370d678a3fbd9ab27117ba8cfd"><code>53ec486</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/build-push-action/issues/1171">#1171</a>
from docker/dependabot/npm_and_yarn/docker/actions-t...</li>
<li><a
href="https://github.com/docker/build-push-action/commit/fe9d9f1d0c920806ce6c73b48d1b95bc542ccbbb"><code>fe9d9f1</code></a>
chore: update generated content</li>
<li><a
href="https://github.com/docker/build-push-action/commit/ad37ba1ad00503d50aa7b3835d3ac83f4372c199"><code>ad37ba1</code></a>
chore(deps): Bump <code>@​docker/actions-toolkit</code> from 0.30.0 to
0.31.0</li>
<li>Additional commits viewable in <a
href="https://github.com/docker/build-push-action/compare/v6.2.0...v6.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/build-push-action&package-manager=github_actions&previous-version=6.2.0&new-version=6.3.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [golang.org/x/net](https://github.com/golang/net) from 0.26.0 to
0.27.0.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/golang/net/commit/e2310ae9eb6425ee6736cfc40f982f42e20f5850"><code>e2310ae</code></a>
go.mod: update golang.org/x dependencies</li>
<li><a
href="https://github.com/golang/net/commit/77708f716e46255944251965f8240a0eab01e099"><code>77708f7</code></a>
quic: skip tests which depend on unimplemented UDP functions on Plan
9</li>
<li><a
href="https://github.com/golang/net/commit/9617c6335bca5e4e80949a5b1dbe43273260e8a3"><code>9617c63</code></a>
http2: avoid Transport hang with Connection: close and AllowHTTP</li>
<li>See full diff in <a
href="https://github.com/golang/net/compare/v0.26.0...v0.27.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=golang.org/x/net&package-manager=go_modules&previous-version=0.26.0&new-version=0.27.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…3443)

Bumps
[github.com/minio/highwayhash](https://github.com/minio/highwayhash)
from 1.0.2 to 1.0.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/minio/highwayhash/releases">github.com/minio/highwayhash's
releases</a>.</em></p>
<blockquote>
<h2>Version v1.0.3</h2>
<p>Added support for ARM SVE instructions, resulting in performance
improvements over existing NEON implementation.</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/minio/highwayhash/commit/030a8b332625f1501d534324055b1de810fe9233"><code>030a8b3</code></a>
Disable SVE2 support until tested on real hardware (not just
emulator)</li>
<li><a
href="https://github.com/minio/highwayhash/commit/b2d40df9d11faf657708d4b24a24b7b92c5b23d9"><code>b2d40df</code></a>
Fix build on non-ARM architectures</li>
<li><a
href="https://github.com/minio/highwayhash/commit/ff8131595115a8e3d2af219b1ded0d11658baf2a"><code>ff81315</code></a>
Update function for SVE2</li>
<li><a
href="https://github.com/minio/highwayhash/commit/a48b3f20491775094a4cbb7d93da8ab945c7ecbf"><code>a48b3f2</code></a>
Add separate test case for Update function</li>
<li><a
href="https://github.com/minio/highwayhash/commit/3346a584da73836f01ab720398a8d61999ff35e4"><code>3346a58</code></a>
ARM SVE code for update method</li>
<li><a
href="https://github.com/minio/highwayhash/commit/6a9c19b1156f8704d73a73a2d8ba2ef653988f25"><code>6a9c19b</code></a>
Update ARM performance on Graviton3</li>
<li><a
href="https://github.com/minio/highwayhash/commit/1304c103e59f69c73f8b461d5c65a6bce0b11395"><code>1304c10</code></a>
&gt; Warning: 1 issue was detected with this workflow: git checkout
HEAD^2 is no...</li>
<li><a
href="https://github.com/minio/highwayhash/commit/b6f6ef7b89a1265fd1e2cf0ec1c513ec5027de0f"><code>b6f6ef7</code></a>
Upgrade CI versions</li>
<li><a
href="https://github.com/minio/highwayhash/commit/1a96f281b5c687cf18030f723e303c6093a3c3d0"><code>1a96f28</code></a>
Bump golang.org/x/sys from 0.0.0-20190130150945-aca44879d564 to
0.1.0</li>
<li><a
href="https://github.com/minio/highwayhash/commit/9cb37b8cb4e3ed1cf7e0fda944dce3e64c35bddc"><code>9cb37b8</code></a>
Fix build tags for newer Go.</li>
<li>Additional commits viewable in <a
href="https://github.com/minio/highwayhash/compare/v1.0.2...v1.0.3">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from
1.64.0 to 1.65.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/grpc/grpc-go/releases">google.golang.org/grpc's
releases</a>.</em></p>
<blockquote>
<h2>Release 1.65.0</h2>
<h1>Dependencies</h1>
<ul>
<li>Change support policy to cover only the latest TWO releases of Go,
matching the policy for Go itself. See <a
href="https://redirect.github.com/grpc/grpc-go/issues/7249">#7249</a>
for more information. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7250">#7250</a>)</li>
<li>Update x/net/http2 to address <a
href="https://nvd.nist.gov/vuln/detail/CVE-2023-45288">CVE-2023-45288</a>
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7282">#7282</a>)</li>
</ul>
<h1>Behavior Changes</h1>
<ul>
<li>credentials/tls: clients and servers will now reject connections
that don't support ALPN when environment variable
<code>GRPC_ENFORCE_ALPN_ENABLED</code> is set to &quot;true&quot; (case
insensitive). (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7184">#7184</a>)
<ul>
<li>NOTE: this behavior will become the default in a future
release.</li>
</ul>
</li>
<li>metadata: remove String method from MD to make printing more
consistent (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7373">#7373</a>)</li>
</ul>
<h1>New Features</h1>
<ul>
<li>grpc: add <code>WithMaxCallAttempts</code> to configure gRPC's retry
behavior per-channel. (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7229">#7229</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/imoore76"><code>@​imoore76</code></a></li>
</ul>
</li>
</ul>
<h1>Bug Fixes</h1>
<ul>
<li>ringhash: properly apply endpoint weights instead of ignoring them
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7156">#7156</a>)</li>
<li>xds: fix a bug that could cause xds-enabled servers to stop
accepting new connections after handshaking errors (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7128">#7128</a>)
<ul>
<li>Special Thanks: <a
href="https://github.com/bozaro"><code>@​bozaro</code></a></li>
</ul>
</li>
</ul>
<h2>Release 1.64.1</h2>
<h1>Dependencies</h1>
<ul>
<li>Update x/net/http2 to address <a
href="https://nvd.nist.gov/vuln/detail/CVE-2023-45288">CVE-2023-45288</a>
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7352">#7352</a>)</li>
<li>metadata: remove String method from MD to make printing consistent
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7374">#7374</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/grpc/grpc-go/commit/2da976983bbb33feb3e25b7daaa8f60b9769adb5"><code>2da9769</code></a>
Change version to 1.65.0 (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7306">#7306</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/ede96b776c9cea4ff2b06dfdedad841e53fb0c26"><code>ede96b7</code></a>
metadata: remove String method (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7373">#7373</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/64be203f7828d03224aa44944a84deacac54b72b"><code>64be203</code></a>
grpc: Readd pick first name (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7336">#7336</a>)
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7341">#7341</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/25e33a6c207464c6017d001255f9ac1297ba5d3e"><code>25e33a6</code></a>
examples: Add CSM Observability example (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7302">#7302</a>)
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7318">#7318</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/04a5f4604baa9297b7168543834e531cfb8858dc"><code>04a5f46</code></a>
xds/internal/xdsclient: Emit unknown for CSM Labels if not present in
CDS (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7">#7</a>...</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/cff5c3e3d0f104459af4f52e77fc1c49ef4cb6aa"><code>cff5c3e</code></a>
stats/opentelemetry: Add e2e testing for CSM Observability (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7279">#7279</a>)
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7316">#7316</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/9b970fdd173c1951a354630133273639e8acf00c"><code>9b970fd</code></a>
dns: fix constant 30s backoff for re-resolution (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7262">#7262</a>)
(<a
href="https://redirect.github.com/grpc/grpc-go/issues/7311">#7311</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/6d236200ea68ea644d78a164c4ad9952a765aed3"><code>6d23620</code></a>
documentation: on server, use FromIncomingContext for retrieving context
and...</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/7e5898e7c569b8cc32d6eee9bc8ad1393a8fcc61"><code>7e5898e</code></a>
xds: unify xDS client creation APIs meant for testing (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7268">#7268</a>)</li>
<li><a
href="https://github.com/grpc/grpc-go/commit/5d7bd7aacb0c35fc14bf144fa81ecbb61eec91de"><code>5d7bd7a</code></a>
interop/xds: Interop client and server changes for CSM Observability (<a
href="https://redirect.github.com/grpc/grpc-go/issues/7280">#7280</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/grpc/grpc-go/compare/v1.64.0...v1.65.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=google.golang.org/grpc&package-manager=go_modules&previous-version=1.64.0&new-version=1.65.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
)

Delete an expensive debug log that has already been slated for deletion.
On the osmosis fork (with many other debug logs removed), this debug log
ended up taking 1.5% of all CPU time when we had many large blocks. (All
from outbound gossip curiously enough) This caused 12GB of total memory
allocation over an hour in that benchmark (out of 180GB total. With
other optimizations in PR's / merged since that benchmark, would have
been 12GB / ~120GB total)

I am just making a PR to delete it, since it already had a code comment
indicating we should delete it later. (Rather than waiting for #2989

Note that under normal benchmarks (e.g. the last one I did), this is
fairly low impact. (68MB over an hour, out of 69 GB, so .1%)

---

#### PR checklist

- [x] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog) - didn't add one, since its just deleting a debug log
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
Closes #3401 

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Lockwarr <denislav66@gmail.com>
Closes #3296 

---

#### PR checklist

- [X] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
…han` methods (#3459)

Closes #3303 

This PR adds:
- the `Entry` interface, implemented by the existing `mempoolTx` data
type,
- the `Iterator` interface, with one method `WaitNextCh() <-chan Entry`.

On the routine that sends transactions to a peer, we can now use an
`Iterator` to select the next mempool entry to send, instead of the
methods `TxsFront` and `TxsWaitChan` in `CListMempool`. These two
methods leak implementation details about the CList and are now marked
as deprecated. Now all the logic needed to wait for and pick the next
available entry is implemented in `CListMempool.WaitNextCh`.

---

#### PR checklist

- [X] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Update the comment to be consistent with the code.
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec
<!--

Please add a reference to the issue that this PR addresses and indicate
which
files are most critical to review. If it fully addresses a particular
issue,
please include "Closes #XXX" (where "XXX" is the issue number).

If this PR is non-trivial/large/complex, please ensure that you have
either
created an issue that the team's had a chance to respond to, or had some
discussion with the team prior to submitting substantial pull requests.
The team
can be reached via GitHub Discussions or the Cosmos Network Discord
server in
the #cometbft channel. GitHub Discussions is preferred over Discord as
it
allows us to keep track of conversations topically.
https://github.com/cometbft/cometbft/discussions

If the work in this PR is not aligned with the team's current
priorities, please
be advised that it may take some time before it is merged - especially
if it has
not yet been discussed with the team.

See the project board for the team's current priorities:
https://github.com/orgs/cometbft/projects/1

-->
This PR addresses several optimization points for TxIndex.Search:

1. Remove expensive map access from sorting function
2. Replace sort.Slice to sort.Sort with sorter approach
3. Reduce heap allocations from extractEventSeqFromKey

ben
BD19
chstat result:
```
goos: darwin
goarch: amd64
pkg: github.com/cometbft/cometbft/state/txindex/kv
cpu: Intel(R) Core(TM) i9-10910 CPU @ 3.60GHz
                     │   old.txt    │              new.txt               │
                     │    sec/op    │   sec/op     vs base               │
TxSearchBigResult-20   3236.1m ± 7%   945.9m ± 9%  -70.77% (p=0.002 n=6)

                     │   old.txt    │               new.txt               │
                     │     B/op     │     B/op      vs base               │
TxSearchBigResult-20   426.1Mi ± 0%   311.6Mi ± 0%  -26.86% (p=0.002 n=6)

                     │   old.txt   │              new.txt               │
                     │  allocs/op  │  allocs/op   vs base               │
TxSearchBigResult-20   4.040M ± 0%   2.040M ± 0%  -49.51% (p=0.002 n=6)
```

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
…3423)

Closes #2951 

Remove p2p allocations for wrapping outbound packets. Every packet send
would require 3 new heap objects due to how we used pointers / did this
wrapping. This costs us: 13% of all system heap allocations, and 20% of
the CPU time of writing packets (under "normal" osmosis load. I don't
have big blocks benchmarks after the secret connection improvement got
in).

This should be a 25% speedup to `channel.writePacketMsgTo`, making
writing getting closer to the bound of just proto-marshalling a packet.

This solution is simple (just make a buffer in the struct) since these
packet sends are all single threaded.

---

#### PR checklist

- [X] Tests written/updated - N/A, existing tests cover safety here
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [X] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [X] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Closes #3151 

The broadcast routine in its entirely is the source of ~75% of all
created channels in the system, all coming from the `NewTimer` call in
Send. (and 75% of all NewTimer) Furthermore, the NewTimer call from
Broadcast is 2% of all CPU time across the system. However I think this
is actually more impact, due to the following.

We spend 11% of all CPU time in the scheduler, and 4% of all CPU time is
`CheckTimers` in the scheduler logic. I'd expect reducing most of the
Timer calls reduces this. We also reduce total `mallocgc` time here by
5% by removing NewTimer, which should hopefully reduce GC load as well.

---

#### PR checklist

- [x] Tests written/updated
- [x] Changelog entry added in `.changelog` (we use
[unclog](https://github.com/informalsystems/unclog) to manage our
changelog)
- [x] Updated relevant documentation (`docs/` or `spec/`) and code
comments
- [x] Title follows the [Conventional
Commits](https://www.conventionalcommits.org/en/v1.0.0/) spec

---------

Co-authored-by: Daniel <daniel.cason@informal.systems>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
@hvanz hvanz self-assigned this Jul 10, 2024
@hvanz hvanz marked this pull request as ready for review July 10, 2024 10:53
@hvanz hvanz requested review from a team as code owners July 10, 2024 10:53
@hvanz hvanz force-pushed the hvanz/feature-mempool-qos-merge-main branch from 5bb85d6 to c2d5de9 Compare July 10, 2024 14:22
Copy link
Contributor
@sergio-mena sergio-mena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hvanz hvanz force-pushed the hvanz/feature-mempool-qos-merge-main branch from 4858d20 to 28ff42b Compare July 11, 2024 08:09
@hvanz hvanz merged commit 28ff42b into feature/mempool-qos Jul 11, 2024
34 checks passed
@hvanz hvanz deleted the hvanz/feature-mempool-qos-merge-main branch July 11, 2024 08:19
jmalicevic pushed a commit to informalsystems/cometbft that referenced this pull request May 14, 2025
* Added votes to header + added secp256k1 + other changes

* updated import

* txHash fix+update canonical rep

* removed sig size

* docs: fix consensus spec formatting (cometbft#3804)

* abci/server: recover from app panics in socket server (cometbft#3809)

fixes cometbft#3800

* abci/client: fix DATA RACE in gRPC client (cometbft#3798)

* Remove go func {}()

closes cometbft#357

- Remove go func(){}() that caused race condiditon

- To reproduce
	- add -race in make file to `install_abci`
	- Remove `CGO_ENABLED=0` & add -race to `install`

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

* remove -race

* fix data race

also, reorder callbacks similarly to socket client

* docs: "Writing a built-in Tendermint Core application in Go" guide (cometbft#3608)

* docs: go built-in guide

* fix package imports, add badger db, simplify Query

* newTendermint function

* working example

* finish the first guide

* add one more note

* add the second Golang guide - external ABCI app

* fix typos

* libs: Remove db from tendermint in favor of tendermint/tm-cmn (cometbft#3811)

* Remove db from tendemrint in favor of tendermint/tm-cmn

- remove db from `libs`
- update dependancy, there have been no breaking changes in the updated deps
	- https://github.com/grpc/grpc-go/releases
	- https://github.com/golang/protobuf/releases

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

* changelog add

* gofmt

* more gofmt

* docs: add A TOC to the Readme.md of ADR Section (cometbft#3820)

* ADR TOC in readme.md

* Added A TOC to the Readme.md of ADR Section

- Added table of contents to the Readme of the architecture section.
	- Easier to traverse and when you know what is there.
	- If the Adr's become viewable online it would help guide the user

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

* add tm-cmn to subprojects

* normalize word

* rpc: make max_body_bytes and max_header_bytes configurable (cometbft#3818)

* rpc: make max_body_bytes and max_header_bytes configurable

* update changelog pending

* p2p/conn: Add Bufferpool (cometbft#3664)

* use byte buffer pool to decreass allocs

* wrap to put buffer in defer

* wapper defer

* add dependency

* remove Gopkg,*

* add change log

* rpc: /broadcast_evidence (cometbft#3481)

* implement broadcast_duplicate_vote endpoint

* fix test_cover

* address comments

* address comments

* Update abci/example/kvstore/persistent_kvstore.go

Co-Authored-By: mossid <torecursedivine@gmail.com>

* Update rpc/client/main_test.go

Co-Authored-By: mossid <torecursedivine@gmail.com>

* address comments in progress

* reformat the code

* make linter happy

* make tests pass

* replace BroadcastDuplicateVote with BroadcastEvidence

* fix test

* fix endpoint name

* improve doc

* fix TestBroadcastEvidenceDuplicateVote

* Update rpc/core/evidence.go

Co-Authored-By: Thane Thomson <connect@thanethomson.com>

* add changelog entry

* fix TestBroadcastEvidenceDuplicateVote

* mempool: make max_msg_bytes configurable (cometbft#3826)

* mempool: make max_msg_bytes configurable

* apply suggestions from code review

* update changelog pending

* apply suggestions from code review again

* rpc: return err if page is incorrect (less than 0 or greater than tot… (cometbft#3825)

* rpc: return err if page is incorrect (less than 0 or greater than total pages)

Fixes cometbft#3813

* fix rpc_test

* blockchain: Reorg reactor (cometbft#3561)

* go routines in blockchain reactor

* Added reference to the go routine diagram

* Initial commit

* cleanup

* Undo testing_logger change, committed by mistake

* Fix the test loggers

* pulled some fsm code into pool.go

* added pool tests

* changes to the design

added block requests under peer

moved the request trigger in the reactor poolRoutine, triggered now by a ticker

in general moved everything required for making block requests smarter in the poolRoutine

added a simple map of heights to keep track of what will need to be requested next

added a few more tests

* send errors to FSM in a different channel than blocks

send errors (RemovePeer) from switch on a different channel than the
one receiving blocks
renamed channels
added more pool tests

* more pool tests

* lint errors

* more tests

* more tests

* switch fast sync to new implementation

* fixed data race in tests

* cleanup

* finished fsm tests

* address golangci comments :)

* address golangci comments :)

* Added timeout on next block needed to advance

* updating docs and cleanup

* fix issue in test from previous cleanup

* cleanup

* Added termination scenarios, tests and more cleanup

* small fixes to adr, comments and cleanup

* Fix bug in sendRequest()

If we tried to send a request to a peer not present in the switch, a
missing continue statement caused the request to be blackholed in a peer
that was removed and never retried.

While this bug was manifesting, the reactor kept asking for other
blocks that would be stored and never consumed. Added the number of
unconsumed blocks in the math for requesting blocks ahead of current
processing height so eventually there will be no more blocks requested
until the already received ones are consumed.

* remove bpPeer's didTimeout field

* Use distinct err codes for peer timeout and FSM timeouts

* Don't allow peers to update with lower height

* review comments from Ethan and Zarko

* some cleanup, renaming, comments

* Move block execution in separate goroutine

* Remove pool's numPending

* review comments

* fix lint, remove old blockchain reactor and duplicates in fsm tests

* small reorg around peer after review comments

* add the reactor spec

* verify block only once

* review comments

* change to int for max number of pending requests

* cleanup and godoc

* Add configuration flag fast sync version

* golangci fixes

* fix config template

* move both reactor versions under blockchain

* cleanup, golint, renaming stuff

* updated documentation, fixed more golint warnings

* integrate with behavior package

* sync with master

* gofmt

* add changelog_pending entry

* move to improvments

* suggestion to changelog entry

* Renamed wire.go to codec.go (cometbft#3827)

* Renamed wire.go to codec.go

- Wire was the previous name of amino
- Codec describes the file better than `wire` & `amino`

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

* ide error

* rename amino.go to codec.go

* docs: add guides to docs (cometbft#3830)

* add staticcheck linting (cometbft#3828)

cleanup to add linter

    grpc change:
        https://godoc.org/google.golang.org/grpc#WithContextDialer
        https://godoc.org/google.golang.org/grpc#WithDialer
        grpc/grpc-go#2627
    prometheous change:
        due to UninstrumentedHandler, being deprecated in the future
    empty branch = empty if or else statement
        didn't delete them entirely but commented
        couldn't find a reason to have them
    could not replicate the issue cometbft#3406
        but if want to keep it commented then we should comment out the if statement as well

* types: move MakeVote / MakeBlock functions (cometbft#3819)

to the types package

Paritally Fixes cometbft#3584

* p2p: Fix error logging for connection stop (cometbft#3824)

* p2p: fix false-positive error logging when stopping connections

This changeset fixes two types of false-positive errors occurring during
connection shutdown.

The first occurs when the process invokes FlushStop() or Stop() on a
connection. While the previous behavior did properly wait for the sendRoutine
to finish, it did not notify the recvRoutine that the connection was shutting
down. This would cause the recvRouting to receive and error when reading and
log this error. The changeset fixes this by notifying the recvRoutine that
the connection is shutting down.

The second occurs when the connection is terminated (gracefully) by the other side.
The recvRoutine would get an EOF error during the read, log it, and stop the connection
with an error. The changeset detects EOF and gracefully shuts down the connection.

* bring back the comment about flushing

* add changelog entry

* listen for quitRecvRoutine too

* we have to call stopForError

Otherwise peer won't be removed from the peer set and maybe readded
later.

* p2p: Do not write 'Couldn't connect to any seeds' if there are no seeds (cometbft#3834)

* Do not write 'Couldn't connect to any seeds' if there are no seeds

* changelog

* remove privValUpgrade

* Fix typo in changelog

* Update CHANGELOG_PENDING.md

Co-Authored-By: Marko <marbar3778@yahoo.com>

I'm setting up all peers dynamically by calling dial_peers, so p2p.seeds in configs is empty, and I'm seeing error log a lot in logs.

* docs: add a footer to guides (cometbft#3835)

* docs: "Writing a Tendermint Core application in Kotlin (gRPC)" guide (cometbft#3838)

* add abci grpc kotlin guide

* Update docs/guides/kotlin.md

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

* Update docs/guides/kotlin.md

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

* Update docs/guides/kotlin.md

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

* Update kotlin.md

* node: allow replacing existing p2p.Reactor(s)  (cometbft#3846)

* node: allow replacing existing p2p.Reactor(s)

using [`CustomReactors`
option](https://godoc.org/github.com/tendermint/tendermint/node#CustomReactors).
Warning: beware of accidental name clashes. Here is the list of existing
reactors: MEMPOOL, BLOCKCHAIN, CONSENSUS, EVIDENCE, PEX.

* check the absence of "CUSTOM" prefix

* merge 2 tests

* add doc.go to node package

* gocritic (1/2) (cometbft#3836)

    Add gocritic as a linter

    The linting is not complete, but should i complete in this PR or in a following.

    23 files have been touched so it may be better to do in a following PR


Commits:

* Add gocritic to linting

- Added gocritic to linting

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

* gocritic

* pr comments

* remove switch in cmdBatch

* tm-cmn to tm-db (cometbft#3850)

* tm-cmn to tm-db

* go.mod changes

* go.mod changes

* more go.mod

* fix tm-db

* ci fix, pending change

* version tmdb (cometbft#3854)

* txindexer: Refactor Tx Search Aggregation (cometbft#3851)

- Replace the previous intersect call, which was called at each query condition, with a map intersection.
- Replace fmt.Sprintf with string()

closes: cometbft#3076

Benchmarks

```
Old
goos: darwin
goarch: amd64
pkg: github.com/tendermint/tendermint/state/txindex/kv
BenchmarkTxSearch-4   	     200	 103641206 ns/op	 7998416 B/op	   71171 allocs/op
PASS
ok  	github.com/tendermint/tendermint/state/txindex/kv	26.019s

New
goos: darwin
goarch: amd64
pkg: github.com/tendermint/tendermint/state/txindex/kv
BenchmarkTxSearch-4   	    1000	  38615024 ns/op	13515226 B/op	  166460 allocs/op
PASS
ok  	github.com/tendermint/tendermint/state/txindex/kv	53.618s
```

~62% performance improvement

Commits:

* Refactor tx search

* Add pending changelog entry

* Add tx search benchmarking

* remove intermediate hashes list

also reset timer in BenchmarkTxSearch
and fix other benchmark

* fix import

* Add test cases

* Fix searching

* Replace fmt.Sprintf with string

* Update state/txindex/kv/kv.go

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

* Rename params

* Cleanup

* Check error in benchmarks

* release for v0.32.2

* Merge PR cometbft#3860: Update log v0.32.2

* changelog updates

* pr comments

* Fix for panic in signature verification if a peer sends a nil public key.

* update version.go

* Changelog update

* Update CHANGELOG.md

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

* update changelog

* p2p: only allow ed25519 pubkeys when connecting

also, recover from any possible failures in acceptPeers

Refs cometbft#4030

* update changelog and bump version to v0.32.6

* set the date to today

* cs: panic only when WAL#WriteSync fails

- modify WAL#Write and WAL#WriteSync to return an error

* types: validate Part#Proof

add ValidateBasic to crypto/merkle/SimpleProof

* cs: limit max bit array size and block parts count

* cs: test new limits

* cs: only assert important stuff

* update changelog and bump version to 0.32.7

* fixes after Ethan's review

* align max wal msg and max consensus msg sizes

* fix tests

* fix test

* use bor

* add data in commit

* remove votes from header

* new: add proposal results in vote

* fix: go mod

* new: add sidechannel proto objects

* new: add begin side blocker and deliver side tx

* new: add side tx results in begin side block

* add: add side tx results into request begin side-block

* chg: add address in sig object

* chg: add events in side block

* chg: allow empty sig

* chg: add flag to execute side-tx while not syncing

* chg: remove data from vote

* fix: use last byte on bigendian bytes

* fix: call sidetx result for string method

* feat: add rollback feature

* Use bor version v0.2.16

* Change log level tag from a single character to a full word

This will change logging format from:

D[2016-05-02|11:06:44.322]

to:

DEBUG[2016-05-02|11:06:44.322]

The purpose is to unify the logging with bor.

* consensus,scripts,state,store,types: change PartSetHeader total to uint32

* libs/log: add warn log level (cometbft#27)

* libs/log: add warn log level

* mardizzone/POS-1609: dev: chg: bump btcd dep and solve related issues

* mardizzone/POS-1609: dev: chg: solve vulnerabilities associated with some packages

* mardizzone/POS-1609: dev: chg: update bor version and replace tm-db

* mardizzone/POS-1609: dev: chg: bump go version

* mardizzone/POS-1609: dev: chg: bump go version to latest patch

* Changed the value of default maxNumInboundPeers and maxNumOutboundPeers

* made Stopping peer for error log as debig (cometbft#30)

* made dialing failed log as debug (cometbft#31)

* Added log to print number of peers (cometbft#32)

* added log to print number of peers

* update

* peppermint: changes to crypto

* Modified NewFilePV to generate secp256k1

* (temporarily) allow both tendermint/P*KeySecp256k1 and comet/P*KeySecp256k1Uncompressed to ease migration

* Forward-port disabled `MaxSignatureSize` checks (+ new ones needed)

* cherry pick secp256k1 migration commits + go mod tidy

* blocksync,consensus,crypto,libs,types: fix tests and more conflicts

* consensus,libs,types: fix tests, vulns from govuln and some lint errors

* ci: bump go version to 1.21.4

* Fixed `TestPubKeySecp256k1Address`

* crypto: enforce curve group order checks in genPrivKey

* abci,crypto: fix conflicts and tests

* types: fix TestInvalidPrecommitExtensions

* fix lint

* Extend kvstore example add with with key types

* Fix `TestReactorValidatorSetChanges`

* Fix UTs in `execution_test.go`

* Fix `TestEvidencePoolBasic`

* Fix `TestVoteExtension`

* test/e2e: use go 1.21.4 in docker

* test/e2e: use secp256k1 as default key type in testnet setup

* p2p/conn: use secp256k1 for p2p authentication

* p2p/conn: allow both secp256k1 and ed25519 key types for authentication

* all: address PR comments

* types,blocksync: fix lint + tests + bump deps complained by govuln

* crypto,state,test: resolve conflicts from v0.38.5

* abci: resolve conflicts from v0.38.5

* resolve go mod deps

* Revert "Merge branch 'v0.38.5-upstream' into raneet10/peppermint-changes"

This reverts commit 2706fc9, reversing
changes made to e404e0f.

* Revert "Revert "Merge branch 'v0.38.5-upstream' into raneet10/peppermint-changes""

This reverts commit fc56973.

* all: fix issue from merge

* docs: remove Warn log definition from ADR

* state: remove outdated comments

* types: increase MaxSignatureSize to 65 and unskip related tests

* cmd: minor refactor

Co-authored-by: Sergio Mena <sergio@informal.systems>

* libs/protoio: minor refactor

Co-authored-by: Sergio Mena <sergio@informal.systems>

* libs/pubsub: minor refactor

Co-authored-by: Sergio Mena <sergio@informal.systems>

* state: minor refactor

Co-authored-by: Sergio Mena <sergio@informal.systems>

* state: minor restructure in test

Co-authored-by: Sergio Mena <sergio@informal.systems>

* types: fix TestMaxCommitBytes + lint

* state,types: fix TestTxFilter and TestBlockMaxDataBytes

* types: fix TestBlockMaxDataBytesNoEvidence

* types: fix TestInvalidPrecommitExtensions

* abci,types: address comments

* crypto,proto: add secp256k1_uncompressed oneof in PublicKey proto message type

* remove revive from .golangci.yml

* remove replace of go-ethereum dep with bor and go mod tidy

---------

Co-authored-by: vaibhavchellani <vaibhavchellani223@gmail.com>
Co-authored-by: Alex Dupre <sysadmin@alexdupre.com>
Co-authored-by: Roman Useinov <roman.useinov@gmail.com>
Co-authored-by: Marko <marbar3778@yahoo.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: Jun Kimura <junkxdev@gmail.com>
Co-authored-by: zjubfd <296179868@qq.com>
Co-authored-by: Anca Zamfir <ancazamfir@users.noreply.github.com>
Co-authored-by: folex <0xdxdy@gmail.com>
Co-authored-by: Ivan Kushmantsev <kushmantsev@gmail.com>
Co-authored-by: Alexander Bezobchuk <alexanderbez@users.noreply.github.com>
Co-authored-by: Ethan Buchman <ethan@coinculture.info>
Co-authored-by: Zaki Manian <zaki@manian.org>
Co-authored-by: Zaki Manian <zaki@tendermint.com>
Co-authored-by: Jaynti Kanani <jdkanani@gmail.com>
Co-authored-by: Sai Kumar <sai@vitwit.com>
Co-authored-by: Krishna Upadhyaya <krishnau1604@gmail.com>
Co-authored-by: Jerry <jerrycgh@gmail.com>
Co-authored-by: Anshal Shukla <53994948+anshalshukla@users.noreply.github.com>
Co-authored-by: marcello33 <marcelloardizzone@hotmail.it>
Co-authored-by: Vaibhav Jindal <vaibhavjindal29@gmail.com>
Co-authored-by: VaibhavJindal <74560896+VAIBHAVJINDAL3012@users.noreply.github.com>
Co-authored-by: Pratik Patil <pratikspatil024@gmail.com>
Co-authored-by: Sergio Mena <sergio@informal.systems>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

0