Skip to content

Commit 748be8b

Browse files
authored
Revert "accelerate getShufflingRef (#4911)" (#4958)
This reverts commit ea97e93.
1 parent a1cb31c commit 748be8b

12 files changed

+58
-789
lines changed

AllTests-mainnet.md

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,10 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
9999
OK: 2/2 Fail: 0/2 Skip: 0/2
100100
## BlockRef and helpers
101101
```diff
102-
+ commonAncestor sanity OK
103102
+ get_ancestor sanity OK
104103
+ isAncestorOf sanity OK
105104
```
106-
OK: 3/3 Fail: 0/3 Skip: 0/3
105+
OK: 2/2 Fail: 0/2 Skip: 0/2
107106
## BlockSlot and helpers
108107
```diff
109108
+ atSlot sanity OK
@@ -446,11 +445,6 @@ OK: 1/1 Fail: 0/1 Skip: 0/1
446445
+ RestErrorMessage writer tests OK
447446
```
448447
OK: 2/2 Fail: 0/2 Skip: 0/2
449-
## Shufflings
450-
```diff
451-
+ Accelerated shuffling computation OK
452-
```
453-
OK: 1/1 Fail: 0/1 Skip: 0/1
454448
## Slashing Interchange tests [Preset: mainnet]
455449
```diff
456450
+ Slashing test: duplicate_pubkey_not_slashable.json OK
@@ -682,4 +676,4 @@ OK: 2/2 Fail: 0/2 Skip: 0/2
682676
OK: 9/9 Fail: 0/9 Skip: 0/9
683677

684678
---TOTAL---
685-
OK: 387/392 Fail: 0/392 Skip: 5/392
679+
OK: 385/390 Fail: 0/390 Skip: 5/390

beacon_chain/consensus_object_pools/block_dag.nim

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -149,30 +149,6 @@ func get_ancestor*(blck: BlockRef, slot: Slot,
149149

150150
blck = blck.parent
151151

152-
func commonAncestor*(a, b: BlockRef, lowSlot: Slot): Opt[BlockRef] =
153-
## Return the common ancestor with highest slot of two non-nil `BlockRef`,
154-
## limited by `lowSlot` (`err` if exceeded).
155-
doAssert a != nil
156-
doAssert b != nil
157-
if a.slot < lowSlot or b.slot < lowSlot:
158-
return err()
159-
160-
var
161-
aa = a
162-
bb = b
163-
while aa != bb:
164-
if aa.slot >= bb.slot:
165-
aa = aa.parent
166-
doAssert aa != nil, "All `BlockRef` lead to `finalizedHead`"
167-
if aa.slot < lowSlot:
168-
return err()
169-
else:
170-
bb = bb.parent
171-
doAssert bb != nil, "All `BlockRef` lead to `finalizedHead`"
172-
if bb.slot < lowSlot:
173-
return err()
174-
ok aa
175-
176152
func atSlot*(blck: BlockRef, slot: Slot): BlockSlot =
177153
## Return a BlockSlot at a given slot, with the block set to the closest block
178154
## available. If slot comes from before the block, a suitable block ancestor

0 commit comments

Comments
 (0)