We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The header hash was generated with a missing hash of the validateset's priorities information. A malicious user could modify the priorities without causing a state hash validation error. Remarkably this is a known issue in Cometbft that breaks the state hash validation for priorities. https://github.com/polynetwork/poly/blob/master/native/service/header_sync/polygon/types/heimdall_validator_set.go#L325-L334
/types/validator.go type Validator struct { Address Address `json:"address"` PubKey crypto.PubKey `json:"pub_key"` VotingPower int64 `json:"voting_power"` ProposerPriority int64 `json:"proposer_priority"` } ... types/validator_set.go func (vals *ValidatorSet) Hash() []byte { bzs := make([][]byte, len(vals.Validators)) for i, val := range vals.Validators { bzs[i] = val.Bytes() } return merkle.HashFromByteSlices(bzs) } ... /types/validator.go func (v *Validator) Bytes() []byte { pk, err := ce.PubKeyToProto(v.PubKey) if err != nil { panic(err) } pbv := cmtproto.SimpleValidator{ PubKey: &pk, VotingPower: v.VotingPower, }//missing ProposerPriority bz, err := pbv.Marshal() if err != nil { panic(err) } return bz }
Polynetwork implemented its own consensus protocol using cometbft's fork project, but many of the flaws that were fixed in cometbft were not fixed by that project, and this issue is one of them. More information is shown below: Other Unsolved issues' Fix PR and Commits: cometbft/cometbft#3984 cometbft/cometbft#3369 cometbft/cometbft@d766d20 cometbft/cometbft#890 cometbft/cometbft#865
The text was updated successfully, but these errors were encountered:
@tanZiWen @siovanus
Sorry, something went wrong.
No branches or pull requests
The header hash was generated with a missing hash of the validateset's priorities information. A malicious user could modify the priorities without causing a state hash validation error. Remarkably this is a known issue in Cometbft that breaks the state hash validation for priorities.
https://github.com/polynetwork/poly/blob/master/native/service/header_sync/polygon/types/heimdall_validator_set.go#L325-L334
Polynetwork implemented its own consensus protocol using cometbft's fork project, but many of the flaws that were fixed in cometbft were not fixed by that project, and this issue is one of them.
More information is shown below:
Other Unsolved issues' Fix PR and Commits:
cometbft/cometbft#3984
cometbft/cometbft#3369
cometbft/cometbft@d766d20
cometbft/cometbft#890
cometbft/cometbft#865
The text was updated successfully, but these errors were encountered: