-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Closed
Labels
C:consensusComponent: ConsensusComponent: ConsensusT:securityType: Security (specify priority)Type: Security (specify priority)
Milestone
Description
Summary
Validators should ensure that block size should not exceed MaxBytes defined in the consensus params
Problem Definition
This check was originally in place but was unfortunately inadvertently removed when migrating to protobuf. There is logic on the proposer side to ensure that the block is of the correct size but if the proposer were to bypass it, it allows them to create blocks of any size where the other validators would approve of it. This only applies for 0.34.
As a side note we should also check to make sure that none of the other validation logic was affected by the protobuf migration.
Proposal
Reimplement the check here:
Lines 1782 to 1792 in 99aea7b
| if added && cs.ProposalBlockParts.IsComplete() { | |
| bz, err := ioutil.ReadAll(cs.ProposalBlockParts.GetReader()) | |
| if err != nil { | |
| return added, err | |
| } | |
| var pbb = new(tmproto.Block) | |
| err = proto.Unmarshal(bz, pbb) | |
| if err != nil { | |
| return added, err | |
| } | |
| block, err := types.BlockFromProto(pbb) |
For Admin Use
- Not duplicate issue
- Appropriate labels applied
- Appropriate contributors tagged
- Contributor assigned/self-assigned
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C:consensusComponent: ConsensusComponent: ConsensusT:securityType: Security (specify priority)Type: Security (specify priority)