@@ -329,7 +329,11 @@ proc makeBeaconBlock*(
329329 sync_aggregate: SyncAggregate ,
330330 execution_payload: ExecutionPayload ,
331331 rollback: RollbackHashedProc [phase0.HashedBeaconState ],
332- cache: var StateCache ): Result [phase0.BeaconBlock , cstring ] =
332+ cache: var StateCache ,
333+ # TODO :
334+ # `verificationFlags` is needed only in tests and can be
335+ # removed if we don't use invalid signatures there
336+ verificationFlags: UpdateFlags = {}): Result [phase0.BeaconBlock , cstring ] =
333337 # # Create a block for the given state. The latest block applied to it will
334338 # # be used for the parent_root value, and the slot will be take from
335339 # # state.slot meaning process_slots must be called up to the slot for which
@@ -342,7 +346,7 @@ proc makeBeaconBlock*(
342346 randao_reveal, eth1_data, graffiti, attestations, deposits,
343347 exits, sync_aggregate, execution_payload)
344348
345- let res = process_block (cfg, state.data, blck, {skipBlsValidation} , cache)
349+ let res = process_block (cfg, state.data, blck, verificationFlags , cache)
346350
347351 if res.isErr:
348352 rollback (state)
@@ -394,7 +398,11 @@ proc makeBeaconBlock*(
394398 sync_aggregate: SyncAggregate ,
395399 execution_payload: ExecutionPayload ,
396400 rollback: RollbackHashedProc [altair.HashedBeaconState ],
397- cache: var StateCache ): Result [altair.BeaconBlock , cstring ] =
401+ cache: var StateCache ,
402+ # TODO :
403+ # `verificationFlags` is needed only in tests and can be
404+ # removed if we don't use invalid signatures there
405+ verificationFlags: UpdateFlags = {}): Result [altair.BeaconBlock , cstring ] =
398406 # # Create a block for the given state. The latest block applied to it will
399407 # # be used for the parent_root value, and the slot will be take from
400408 # # state.slot meaning process_slots must be called up to the slot for which
@@ -407,7 +415,7 @@ proc makeBeaconBlock*(
407415 randao_reveal, eth1_data, graffiti, attestations, deposits,
408416 exits, sync_aggregate, execution_payload)
409417
410- let res = process_block (cfg, state.data, blck, {skipBlsValidation} , cache)
418+ let res = process_block (cfg, state.data, blck, verificationFlags , cache)
411419
412420 if res.isErr:
413421 rollback (state)
@@ -460,7 +468,11 @@ proc makeBeaconBlock*(
460468 sync_aggregate: SyncAggregate ,
461469 execution_payload: ExecutionPayload ,
462470 rollback: RollbackHashedProc [bellatrix.HashedBeaconState ],
463- cache: var StateCache ): Result [bellatrix.BeaconBlock , cstring ] =
471+ cache: var StateCache ,
472+ # TODO :
473+ # `verificationFlags` is needed only in tests and can be
474+ # removed if we don't use invalid signatures there
475+ verificationFlags: UpdateFlags = {}): Result [bellatrix.BeaconBlock , cstring ] =
464476 # # Create a block for the given state. The latest block applied to it will
465477 # # be used for the parent_root value, and the slot will be take from
466478 # # state.slot meaning process_slots must be called up to the slot for which
@@ -473,7 +485,7 @@ proc makeBeaconBlock*(
473485 randao_reveal, eth1_data, graffiti, attestations, deposits,
474486 exits, sync_aggregate, execution_payload)
475487
476- let res = process_block (cfg, state.data, blck, {skipBlsValidation} , cache)
488+ let res = process_block (cfg, state.data, blck, verificationFlags , cache)
477489
478490 if res.isErr:
479491 rollback (state)
@@ -497,7 +509,11 @@ proc makeBeaconBlock*(
497509 sync_aggregate: SyncAggregate ,
498510 executionPayload: ExecutionPayload ,
499511 rollback: RollbackForkedHashedProc ,
500- cache: var StateCache ): Result [ForkedBeaconBlock , cstring ] =
512+ cache: var StateCache ,
513+ # TODO :
514+ # `verificationFlags` is needed only in tests and can be
515+ # removed if we don't use invalid signatures there
516+ verificationFlags: UpdateFlags = {}): Result [ForkedBeaconBlock , cstring ] =
501517 # # Create a block for the given state. The latest block applied to it will
502518 # # be used for the parent_root value, and the slot will be take from
503519 # # state.slot meaning process_slots must be called up to the slot for which
@@ -514,8 +530,7 @@ proc makeBeaconBlock*(
514530 exits, sync_aggregate, executionPayload))
515531
516532 let res = process_block (cfg, state.`kind Data`.data, blck.`kind Data`,
517- {skipBlsValidation}, cache)
518-
533+ verificationFlags, cache)
519534 if res.isErr:
520535 rollback (state)
521536 return err (res.error ())
0 commit comments