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

consensus/clique: prevent 0 len extradata from panicing #23538

Merged
merged 5 commits into from Sep 21, 2021

Conversation

MariusVanDerWijden
Copy link
Member

closes #23522

@karalabe
Copy link
Member

karalabe commented Sep 7, 2021

This was a known bug that we deliberately didn't fix. Perhaps just crashing isn't ideal, but a network with 0 signers isn't meaningful either. Perhaps we should add a genesis validation vs. just silently make a non functional chain.

@MariusVanDerWijden
Copy link
Member Author

Moved the check to genesis.Commit()

@karalabe
Copy link
Member

karalabe commented Sep 7, 2021

Btw, I think with the genesis check, you can still shoot yourself in the foot if the signer outvotes itself. But :D, not sure we want to do all the fool-proofing :)

core/genesis_test.go Outdated Show resolved Hide resolved
core/genesis_test.go Outdated Show resolved Hide resolved
Co-authored-by: Martin Holst Swende <martin@swende.se>
Co-authored-by: Martin Holst Swende <martin@swende.se>
@fjl fjl merged commit b61ef24 into ethereum:master Sep 21, 2021
@MariusVanDerWijden MariusVanDerWijden deleted the clique-panic branch November 30, 2021 15:28
yongjun925 pushed a commit to DODOEX/go-ethereum that referenced this pull request Dec 3, 2022
Closes ethereum#23522

Co-authored-by: Martin Holst Swende <martin@swende.se>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

panic: runtime error: makeslice: len out of range
4 participants