8000 privval: duplicate `SignerListener: Listening for new connection module=privval` during chain upgrades · Issue #3828 · cometbft/cometbft · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

privval: duplicate SignerListener: Listening for new connection module=privval during chain upgrades #3828

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

Closed
tony-iqlusion opened this issue Aug 21, 2024 · 5 comments · Fixed by #3830
Labels
bug Something isn't working needs-triage This issue/PR has not yet been triaged by the team.

Comments

@tony-iqlusion
Copy link
tony-iqlusion commented Aug 21, 2024

Bug Report

Setup

  • CometBFT version: v0.38.9
  • Have you tried the latest version: no
  • ABCI app: gaiad
  • Environment:
    • OS: Debian 12
    • Install tools:
    • Others:

Config

priv_validator_laddr = "X.X.X.X:Y"

What happened?

During a chain upgrade, CometBFT seemingly attempts to accept two privval connections. TMKMS only opens one such connection, which otherwise works/remains stable. But in the logs (see below), the node continues to print the following in a loop, which is confusing to users during a chain upgrade and spammy in logs during a time when people are trying to keep an eye on them to figure out what happened.

What did you expect to happen?

These lines do not appear in the logs, though they seem to be a symptom of a deeper problem.

How to reproduce it

This is the tough part: we only witness this during a chain upgrade. It has impacted several recent chain upgrades however, including today's gaia v19 upgrade as well as recent Neutron upgrades.

It seems to be happening with every recent chain upgrade, however, when TMKMS is being used as a remote signer.

The problem persists after the chain has started, but can be fixed after a chain upgrade has completed by restarting the node.

Logs

2:36PM INF SignerListener: Listening for new connection module=privval
2:36PM ERR SignerListener: Error accepting connection err="accept tcp [::]:<port>: i/o timeout" module=privval
2:36PM INF SignerListener: Listening for new connection module=privval
... [etc] ...

The TMKMS side shows a stable connection without problems:

INFO tmkms::session: [cosmoshub-4@tcp://x.x.x.x:y] connected to validator successfully
WARN tmkms::session: [cosmoshub-4@tcp://x.x.x.x:y]: unverified validator peer ID! (ac9e6866a2b448a4444514b808f564bffe9d2b5d)
INFO tmkms::session: [cosmoshub-4@tcp://x.x.x.x:y]: signed Prevote:<nil> at h/r/s 21835201/0/1 (101 ms)

Anything else we need to know

This doesn't actually break anything, though it is very confusing during chain upgrades, and introduces a red herring when people are otherwise trying to debug TMKMS issues (e.g. people interpreted this error as potentially being a problem with enabling extension vote signing, even though everything was working)

@tony-iqlusion tony-iqlusion added bug Something isn't working needs-triage This issue/PR has not yet been triaged by the team. labels Aug 21, 2024
@tony-iqlusion
Copy link
Author

Several validators experienced this problem during the recent cosmoshub v19/gaiad upgrade.

If you're a validator who experienced this problem, 👍 this message.

We also experienced it on the most recent Neutron upgrade, and I believe the one before that.

If you've experienced it on other chain upgrades, please leave a comment and perhaps we can help narrow down the CometBFT version where this bug was introduced.

@Azeuh
Copy link
Azeuh commented Aug 21, 2024

Can confirm I had the same issue with recent Neutron upgrades

@cason
Copy link
Contributor
cason commented Aug 21, 2024

Are you upgrading from which version to which version?

@tony-iqlusion
Copy link
Author

Here's more logs of the full node startup:

2:16PM INF starting node with ABCI CometBFT in-process module=server
2:16PM INF service start impl=multiAppConn module=proxy msg="Starting multiAppConn service"
2:16PM INF service start connection=query impl=localClient module=abci-client msg="Starting localClient service"
2:16PM INF service start connection=snapshot impl=localClient module=abci-client msg="Starting localClient service"
2:16PM INF service start connection=mempool impl=localClient module=abci-client msg="Starting localClient service"
2:16PM INF service start connection=consensus impl=localClient module=abci-client msg="Starting localClient service"
2:16PM INF service start impl=EventBus module=events msg="Starting EventBus service"
2:16PM INF service start impl=PubSub module=pubsub msg="Starting PubSub service"
2:16PM INF service start impl=SignerListenerEndpoint module=privval msg="Starting SignerListenerEndpoint service"
2:16PM INF SignerListener: Blocking for connection module=privval
2:16PM INF SignerListener: Listening for new connection module=privval
2:16PM INF SignerListener: Connected module=privval
2:16PM INF SignerListener: Listening for new connection module=privval
2:16PM INF ABCI Handshake App Info hash=50C34F0029E8AF19A25FE2F6A17CC8CDDEFDA77576BC270BE5116F2AEE0B726F height=21835199 module=consensus protocol-version=0 software-version=v19.1.0
2:16PM INF ABCI Replay Blocks appHeight=21835199 module=consensus stateHeight=21835199 storeHeight=21835200
2:16PM INF Replay last block using real app module=consensus
2:16PM INF applying upgrade "v19" at height: 21835200 module=x/upgrade
2:16PM INF Starting module migrations... module=server
2:16PM INF adding a new module: 07-tendermint module=server
2:16PM INF migrating module feeibc from version 1 to version 2 module=server
2:16PM INF migrating module ibc from version 4 to version 5 module=server

8000
2:16PM INF successfully migrated client to self-manage params module=x/ibc/client
2:16PM INF successfully migrated connection to self-manage params module=x/ibc/connection
2:16PM INF migrating module ibc from version 5 to version 6 module=server
2:16PM INF successfully migrated ibc channel params module=x/ibc/channel
2:16PM INF migrating module interchainaccounts from version 2 to version 3 module=server
2:16PM INF successfully migrated ica/host submodule to self-manage params module=x/ibc-interchainaccounts
2:16PM INF successfully migrated ica/controller submodule to self-manage params module=x/ibc-interchainaccounts
2:16PM INF migrating module provider from version 6 to version 7 module=server
2:16PM INF starting provider legacy params migration module=server
2:16PM INF successfully migrated legacy provider parameters module=x/ibc-provider
2:16PM INF migrating module slashing from version 3 to version 4 module=server
2:16PM ERR SignerListener: Error accepting connection err="accept tcp [::]:5007: i/o timeout" module=privval
2:16PM INF SignerListener: Listening for new connection module=privval
2:16PM ERR SignerListener: Error accepting connection err="accept tcp [::]:5007: i/o timeout" module=privval
2:16PM INF SignerListener: Listening for new connection module=privval
2:17PM ERR SignerListener: Error accepting connection err="accept tcp [::]:5007: i/o timeout" module=privval
2:17PM INF SignerListener: Listening for new connection module=privval
2:17PM ERR SignerListener: Error accepting connection err="accept tcp [::]:5007: i/o timeout" module=privval

This part in particular seems a bit weird:

2:16PM INF SignerListener: Blocking for connection module=privval
2:16PM INF SignerListener: Listening for new connection module=privval
2:16PM INF SignerListener: Connected module=privval
2:16PM INF SignerListener: Listening for new connection module=privval

Right after it successfully accepts a privval connection, it seems to start listening for a new one.

@tony-iqlusion
Copy link
Author
tony-iqlusion commented Aug 21, 2024

Are you upgrading from which version to which version?

@cason this was upgrading to v0.38.9. I'm not sure what the previous release of gaiad was using. Will take a look.

Edit: I think the previous CometBFT version was v0.37.6

@melekes melekes added this to CometBFT Aug 22, 2024
@github-project-automation github-project-automation bot moved this to Todo in CometBFT Aug 22, 2024
@melekes melekes moved this from Todo to Ready for Review in CometBFT Aug 22, 2024
github-merge-queue bot pushed a commit that referenced this issue Aug 29, 2024
Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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

---------

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Daniel <daniel.cason@informal.systems>
@github-project-automation github-project-automation bot moved this from Ready for Review to Done in CometBFT Aug 29, 2024
mergify bot added a commit that referenced this issue Aug 29, 2024
Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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

---------

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Daniel <daniel.cason@informal.systems>
(cherry picked from commit 5562f11)
mergify bot pushed a commit that referenced this issue Aug 29, 2024
Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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

---------

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Daniel <daniel.cason@informal.systems>
(cherry picked from commit 5562f11)

# Conflicts:
#	privval/signer_listener_endpoint.go
mergify bot pushed a commit that referenced this issue Aug 29, 2024
Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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

---------

Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Co-authored-by: Daniel <daniel.cason@informal.systems>
(cherry picked from commit 5562f11)

# Conflicts:
#	.changelog/v0.38.3/bug-fixes/3828-privval-drop-duplicate-listen.md
mergify bot added a commit that referenced this issue Aug 29, 2024
…port #3830) (#3895)

Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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
<hr>This is an automatic backport of pull request #3830 done by
[Mergify](https://mergify.com).

Co-authored-by: Chill Validation <92176880+chillyvee@users.noreply.github.com>
mergify bot added a commit that referenced this issue Aug 30, 2024
…port #3830) (#3896)

Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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
<hr>This is an automatic backport of pull request #3830 done by
[Mergify](https://mergify.com).

---------

Co-authored-by: Chill Validation <92176880+chillyvee@users.noreply.github.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
mergify bot added a commit that referenced this issue Aug 30, 2024
…port #3830) (#3896)

Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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
<hr>This is an automatic backport of pull request #3830 done by
[Mergify](https://mergify.com).

---------

Co-authored-by: Chill Validation <92176880+chillyvee@users.noreply.github.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
(cherry picked from commit 221c744)
mergify bot added a commit that referenced this issue Aug 30, 2024
…port #3830) (backport #3896) (#3900)

Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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
<hr>This is an automatic backport of pull request #3830 done by
[Mergify](https://mergify.com).<hr>This is an automatic backport of pull
request #3896 done by [Mergify](https://mergify.com).

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
mergify bot added a commit that referenced this issue Aug 30, 2024
…port #3830) (#3897)

Resolve #3828

On cometbft startup, duplicate privval request can enter the channel
between the time listen begins and a send is attempted.

The duplicate listen request will timeout since there is not another
signer connecting, filling logs with errors. A duplicate listen request
is undesired.

---

#### 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
<hr>This is an automatic backport of pull request #3830 done by
[Mergify](https://mergify.com).

Co-authored-by: Chill Validation <92176880+chillyvee@users.noreply.github.com>
Co-authored-by: Anton Kaliaev <anton.kalyaev@gmail.com>
jmalicevic pushed a commit to informalsystems/cometbft that referenced this issue 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 (
6302
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
Labels
bug Something isn't working needs-triage This issue/PR has not yet been triaged by the team.
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants
0