Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Add check for nil peer address map #134

Merged
merged 1 commit into from
May 4, 2023
Merged

Add check for nil peer address map #134

merged 1 commit into from
May 4, 2023

Conversation

philipsu522
Copy link
Contributor

Describe your changes and provide context

Validator reported following error:

panic: assignment to entry in nil map

goroutine 968 [running]:
github.com/tendermint/tendermint/internal/p2p.(PeerManager).Add(0xc0002b8000, {{0xc0d0557928, 0x28}, {0xc0d0557920, 0x5}, {0xc0d0557951, 0x1b}, 0x777d, {0x0, 0x0}})
        /root/go/pkg/mod/github.com/sei-protocol/[email protected]/internal/p2p/peermanager.go:435 +0x505
github.com/tendermint/tendermint/internal/p2p/pex.(Reactor).handlePexMessage(0xc002187040, {0x2bb9610, 0xc0005b88c0}, 0xc133f48800, 0x1?)
        /root/go/pkg/mod/github.com/sei-protocol/[email protected]/internal/p2p/pex/reactor.go:303 +0x72b
github.com/tendermint/tendermint/internal/p2p/pex.(Reactor).processPexCh(0xc002187040, {0x2bb9610?, 0xc0005b88c0}, 0xc0027064e0)
        /root/go/pkg/mod/github.com/sei-protocol/[email protected]/internal/p2p/pex/reactor.go:221 +0x528
created by github.com/tendermint/tendermint/internal/p2p/pex.(Reactor).OnStart
        /root/go/pkg/mod/github.com/sei-protocol/[email protected]/internal/p2p/pex/reactor.go:152 +0xd0

This adds a check to fix it

Testing performed to validate your change

unit tests, and will deploy

@philipsu522 philipsu522 changed the title Add check for nil map Add check for nil peer address map May 3, 2023
@philipsu522 philipsu522 requested a review from codchen May 3, 2023 22:17
@Ucboss
Copy link

Ucboss commented May 10, 2023

Nice

Timwood0x10 pushed a commit to Timwood0x10/sei-tendermint that referenced this pull request Jun 7, 2023
…ei-protocol#134)

## Describe your changes and provide context
Added back old proto definitions in `legacy.proto` to facilitate
migration.
Added a migration handler that iterates through wasm dependency
registrations, decode them with the legacy proto, and overwrite with the
new proto

## Testing performed to validate your change
unit tests
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants