@@ -130,15 +130,10 @@ library ValidatorSelectionLib {
130
130
setCachedProposer (_slot, proposer, proposerIndex);
131
131
}
132
132
133
- // If the proposer is who sent the tx, we're good
134
- if (proposer == msg .sender ) {
135
- return ;
136
- }
137
-
138
133
// Check if the proposer has signed, if not, fail
139
134
bool hasProposerSignature = _attestations.isSignature (proposerIndex);
140
135
if (! hasProposerSignature) {
141
- revert Errors.ValidatorSelection__InvalidProposer (proposer, msg . sender );
136
+ revert Errors.ValidatorSelection__MissingProposerSignature (proposer, proposerIndex );
142
137
}
143
138
144
139
// Check if the signature is correct
@@ -358,7 +353,10 @@ library ValidatorSelectionLib {
358
353
}
359
354
}
360
355
361
- function canProposeAtTime (Timestamp _ts , bytes32 _archive ) internal returns (Slot, uint256 ) {
356
+ function canProposeAtTime (Timestamp _ts , bytes32 _archive , address _who )
357
+ internal
358
+ returns (Slot, uint256 )
359
+ {
362
360
Slot slot = _ts.slotFromTimestamp ();
363
361
RollupStore storage rollupStore = STFLib.getStorage ();
364
362
@@ -373,9 +371,7 @@ library ValidatorSelectionLib {
373
371
require (tipArchive == _archive, Errors.Rollup__InvalidArchive (tipArchive, _archive));
374
372
375
373
(address proposer ,) = getProposerAt (slot);
376
- require (
377
- proposer == msg .sender , Errors.ValidatorSelection__InvalidProposer (proposer, msg .sender )
378
- );
374
+ require (proposer == _who, Errors.ValidatorSelection__InvalidProposer (proposer, _who));
379
375
380
376
return (slot, pendingBlockNumber + 1 );
381
377
}
0 commit comments