File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
l1-contracts/src/core/libraries/rollup Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change @@ -182,8 +182,7 @@ library ProposeLib {
182182 emit IRollupCore.L2BlockProposed (blockNumber, _args.archive, v.blobHashes);
183183 }
184184
185- // @note: not view as sampling validators uses tstore
186- function validateHeader (ValidateHeaderArgs memory _args ) internal {
185+ function validateHeader (ValidateHeaderArgs memory _args ) internal view {
187186 require (_args.header.coinbase != address (0 ), Errors.Rollup__InvalidCoinbase ());
188187 require (_args.header.totalManaUsed <= FeeLib.getManaLimit (), Errors.Rollup__ManaLimitExceeded ());
189188
Original file line number Diff line number Diff line change @@ -143,18 +143,18 @@ library ValidatorSelectionLib {
143143 }
144144
145145 /**
146- * @notice Propose a pending block from the point-of-view of sequencer selection. Will:
147- * - Setup the epoch if needed (if epoch committee is empty skips the rest)
148- * - Validate that the signatures for attestations are indeed from the validatorset
149- * - Validate that the number of valid attestations is sufficient
146+ * Verifies the committee attestations for a given slot and epoch. Throws on validation failure.
150147 *
151- * @dev Cases where errors are thrown:
152- * - If the epoch is not setup
153- * - If the number of valid attestations is insufficient
148+ * - Computes the committee commitment for the epoch from storage as source of truth.
149+ * - Recomputes the commitment from the signatures and compares with the stored one.
150+ * - Sets the proposer in temporary storage.
151+ * - Validates the signatures for the attestations.
152+ * - Checks the number of valid attestations.
154153 *
155154 * @param _slot - The slot of the block
155+ * @param _epochNumber - The epoch of the block
156156 * @param _attestations - The signatures (or empty; just address is provided) of the committee members
157- * @param _digest - The digest of the block
157+ * @param _digest - The digest of the block that the attestations are signed over
158158 */
159159 function verifyAttestations (
160160 Slot _slot ,
You can’t perform that action at this time.
0 commit comments