@@ -206,74 +206,6 @@ suite "Block pool processing" & preset():
206206 # Getting an EpochRef should not result in states being stored
207207 db.getStateRoot (stateCheckpoint.bid.root, stateCheckpoint.slot).isOk ()
208208
209- test " Randao skip and non-skip" :
210- process_slots (
211- dag.cfg, state[], getStateField (
212- state[], slot) + 1 , cache, info, {}).expect (" can advance 1" )
213-
214- let
215- proposer_index = get_beacon_proposer_index (
216- state[], cache, getStateField (state[], slot))
217- privKey = MockPrivKeys [proposer_index.get]
218- randao_reveal = get_epoch_signature (
219- getStateField (state[], fork),
220- getStateField (state[], genesis_validators_root),
221- getStateField (state[], slot).epoch, privKey).toValidatorSig ()
222- var bad_randao_reveal = randao_reveal
223- bad_randao_reveal.blob[5 ] += 1
224-
225- block : # bad randao + no skip = bad
226- let
227- tmpState = assignClone (state[])
228- message = makeBeaconBlock (
229- dag.cfg, tmpState[], proposer_index.get (),
230- bad_randao_reveal,
231- getStateField (tmpState[], eth1_data),
232- default (GraffitiBytes ), @ [], @ [], BeaconBlockExits (),
233- default (SyncAggregate ), default (ExecutionPayload ),
234- default (SignedBLSToExecutionChangeList ),
235- noRollback, cache)
236- check: message.isErr
237-
238- block : # bad randao + skip = bad
239- let
240- tmpState = assignClone (state[])
241- message = makeBeaconBlock (
242- dag.cfg, tmpState[], proposer_index.get (),
243- bad_randao_reveal,
244- getStateField (tmpState[], eth1_data),
245- default (GraffitiBytes ), @ [], @ [], BeaconBlockExits (),
246- default (SyncAggregate ), default (ExecutionPayload ),
247- default (SignedBLSToExecutionChangeList ),
248- noRollback, cache, {skipRandaoVerification})
249- check: message.isErr
250-
251- block : # infinity + no skip = bad
252- let
253- tmpState = assignClone (state[])
254- message = makeBeaconBlock (
255- dag.cfg, tmpState[], proposer_index.get (),
256- ValidatorSig .infinity (),
257- getStateField (tmpState[], eth1_data),
258- default (GraffitiBytes ), @ [], @ [], BeaconBlockExits (),
259- default (SyncAggregate ), default (ExecutionPayload ),
260- default (SignedBLSToExecutionChangeList ),
261- noRollback, cache, {})
262- check: message.isErr
263-
264- block : # Infinity + skip = ok!
265- let
266- tmpState = assignClone (state[])
267- message = makeBeaconBlock (
268- dag.cfg, tmpState[], proposer_index.get (),
269- ValidatorSig .infinity (),
270- getStateField (tmpState[], eth1_data),
271- default (GraffitiBytes ), @ [], @ [], BeaconBlockExits (),
272- default (SyncAggregate ), default (ExecutionPayload ),
273- default (SignedBLSToExecutionChangeList ),
274- noRollback, cache, {skipRandaoVerification})
275- check: message.isOk
276-
277209 test " Adding the same block twice returns a Duplicate error" & preset ():
278210 let
279211 b10 = dag.addHeadBlock (verifier, b1, nilPhase0Callback)
0 commit comments