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

[v0.29] Remove requirement that weight > 0 in EpochSetup validation #3935

Merged
merged 1 commit into from
Feb 16, 2023

Conversation

jordanschalm
Copy link
Member

Backport of #3934

This PR removes the requirement that included nodes have non-zero weight, from EpochSetup service event validation.

This requirement, in combination with a Staking contract bug, caused EECC to be triggered on Mainnet Feb 15.

Service event validation is intended to ensure that service events contain valid data. Although it was largely working as designed in this case (a service event which had unexpected data due to a bug in the smart contract was rejected), since the protocol state does correctly handle nodes with zero weight already, removing this requirement will safely prevent any similar smart contract problem from triggering EECC in the future.

@codecov-commenter
Copy link

codecov-commenter commented Feb 15, 2023

Codecov Report

Merging #3935 (9799ea8) into v0.29 (94348de) will decrease coverage by 2.23%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##            v0.29    #3935      +/-   ##
==========================================
- Coverage   53.45%   51.22%   -2.23%     
==========================================
  Files         813      658     -155     
  Lines       76189    58591   -17598     
==========================================
- Hits        40726    30013   -10713     
+ Misses      32159    26147    -6012     
+ Partials     3304     2431     -873     
Flag Coverage Δ
unittests 51.22% <ø> (-2.23%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
state/protocol/badger/validity.go 53.58% <ø> (-0.70%) ⬇️
...s/hotstuff/timeoutaggregator/timeout_collectors.go 76.11% <0.00%> (-5.98%) ⬇️
...s/hotstuff/votecollector/staking_vote_processor.go 82.35% <0.00%> (-2.95%) ⬇️
fvm/environment/contract_updater.go 66.88% <0.00%> (-0.66%) ⬇️
engine/access/rest/middleware/request_attribute.go
engine/collection/message_hub/message_hub.go
engine/consensus/approvals/approval_collector.go
engine/execution/computation/committer/noop.go
...ngine/execution/computation/committer/committer.go
engine/collection/compliance/engine.go
... and 149 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@jordanschalm
Copy link
Member Author

bors merge

@bors bors bot merged commit ac3a8a9 into v0.29 Feb 16, 2023
@bors bors bot deleted the jordan/hf/v0.29-epoch-setup-weight branch February 16, 2023 17:04
This pull request was closed.
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.

4 participants