Skip to content

Commit

Permalink
chore: rename lastFinalizedCheckpoint to lastCheckpointTimestamp
Browse files Browse the repository at this point in the history
  • Loading branch information
wadealexc committed Apr 24, 2024
1 parent 28540d9 commit a4615b7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/contracts/pods/EigenPod.sol
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ contract EigenPod is
* @dev Verify one or more validators have their withdrawal credentials pointed at this EigenPod, and award
* shares based on their effective balance. Proven validators are marked `ACTIVE` within the EigenPod, and
* future checkpoint proofs will need to include them.
* @dev Withdrawal credential proofs MUST NOT be older than the `lastFinalizedCheckpoint` OR `currentCheckpointTimestamp`.
* @dev Withdrawal credential proofs MUST NOT be older than the `lastCheckpointTimestamp` OR `currentCheckpointTimestamp`.
* @dev Validators proven via this method MUST NOT have an exit epoch set already.
* @param beaconTimestamp the beacon chain timestamp sent to the 4788 oracle contract. Corresponds
* to the parent beacon block root against which the proof is verified.
Expand Down Expand Up @@ -265,7 +265,7 @@ contract EigenPod is
);

require(
beaconTimestamp > lastFinalizedCheckpoint && beaconTimestamp > currentCheckpointTimestamp,
beaconTimestamp > lastCheckpointTimestamp && beaconTimestamp > currentCheckpointTimestamp,
"EigenPod.verifyWithdrawalCredentials: specified timestamp is too far in past"
);

Expand Down Expand Up @@ -593,7 +593,7 @@ contract EigenPod is
* @dev If the checkpoint has no proofs remaining, it is finalized:
* - a share delta is calculated and sent to the `EigenPodManager`
* - the checkpointed `podBalance` is added to `withdrawableRestakedExecutionLayerGwei`
* - `lastFinalizedCheckpoint` is updated
* - `lastCheckpointTimestamp` is updated
* - `currentCheckpoint` and `currentCheckpointTimestamp` are deleted
*/
function _updateCheckpoint(Checkpoint memory checkpoint) internal {
Expand All @@ -606,7 +606,7 @@ contract EigenPod is
withdrawableRestakedExecutionLayerGwei += uint64(checkpoint.podBalanceGwei);

// Finalize the checkpoint
lastFinalizedCheckpoint = currentCheckpointTimestamp;
lastCheckpointTimestamp = currentCheckpointTimestamp;
delete currentCheckpointTimestamp;
delete currentCheckpoint;

Expand Down
2 changes: 1 addition & 1 deletion src/contracts/pods/EigenPodStorage.sol
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ abstract contract EigenPodStorage is IEigenPod {
uint256 public activeValidatorCount;

/// @notice The timestamp of the last checkpoint finalized
uint64 public lastFinalizedCheckpoint;
uint64 public lastCheckpointTimestamp;

/// @notice The timestamp of the currently-active checkpoint. Will be 0 if there is not active checkpoint
uint64 public currentCheckpointTimestamp;
Expand Down

0 comments on commit a4615b7

Please sign in to comment.