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

chore(halo): addresses multiple info and low sec findings #2086

Merged
merged 9 commits into from
Oct 8, 2024
Merged
Prev Previous commit
Next Next commit
fix: check for strictly more than 1/3 of power
  • Loading branch information
chmllr committed Oct 7, 2024
commit 22dac87f39a6813caed676142678d68c15e0e3a5
2 changes: 1 addition & 1 deletion halo/valsync/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ func (k *Keeper) insertValidatorSet(ctx context.Context, vals []*Validator, isGe
// Log a warn if any validator has 1/3 or more of the total power.
// This is a potential attack vector, as a single validator could halt the chain.
for address, power := range powers {
if power >= totalPower/3 && len(powers) > 1 {
if power > totalPower/3 && len(powers) > 1 {
log.Warn(ctx, "🚨 Validator has 1/3 or more of total power", nil,
"address", address.Hex(),
"power", power,
Expand Down