Skip to content

Commit

Permalink
[workaround]: count federated power into collateral ignoring `permiss…
Browse files Browse the repository at this point in the history
…ionMode` (#812)
  • Loading branch information
cryptoAtwill authored Mar 17, 2024
1 parent fdd24c8 commit e85f4d2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions contracts/src/gateway/router/TopDownFinalityFacet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,7 @@ contract TopDownFinalityFacet is GatewayActorModifiers {
ValidatorInfo storage info = s.validatorsTracker.validators.validators[addr];

// Extract the consensus weight for validator.
uint256 weight = info.confirmedCollateral;
if (s.validatorsTracker.validators.permissionMode == PermissionMode.Federated) {
// Use the explicit federated power for power accounting if in Federated permissioning mode.
// Sum it to the confirmedCollateral (which was locked pre-bootstrap and can no longer be adjusted after genesis)
weight += info.federatedPower;
}
uint256 weight = info.confirmedCollateral + info.federatedPower;

vs[i] = Validator({weight: weight, addr: addr, metadata: info.metadata});
unchecked {
Expand Down

0 comments on commit e85f4d2

Please sign in to comment.