Currently, details of the DAG implementation leak into the protocol specification.
Implies that protocol specs cannot be used with different DAG.
I want to play around with a persistent/immutable DAG implementation.
This can may enable forkable simulations in the future.
In this PR I do the first step in this direction. I hide the DAG implementation from the protocol specification API.
The better part of the work is done. But a few todos accumulated:
[x] In blockDAG, type key is not needed. We can compare blocks directly imo.
[x] In protocols, type state = block should be something like type state = Preferred block. This will improve error messages. Skipped, not necessary, increases diff, orthogonal.
[x] There was no good reason to renamemax|min_pow to max|min_hash in the spec API. Undo!
[x] tailstorm[ll] heuristic quorum uses hashtbl where it could use a Set.
[x] Is Ssz_tools.State8 used anywhere? If not, drop!
[x] I removed the distinction between localview and globalview. May be unwise. Revert? No. I like the new interface.
[x] In simulator we use 'prot_data type variable. This can now be 'a.
[x] Visually verify that tailstorm[ll] reward schemes are correct.
[x] Consider using simpler DAG implementation in ethereum_test.ml. Have no simpler implementation. Thus ignore.
[x] Align interface of old DAG implementation with new spec interface.
[x] Remove redundancy in old dag.ml implementation and new dagtools.ml
Currently, details of the DAG implementation leak into the protocol specification. Implies that protocol specs cannot be used with different DAG. I want to play around with a persistent/immutable DAG implementation. This can may enable forkable simulations in the future.
In this PR I do the first step in this direction. I hide the DAG implementation from the protocol specification API.
The better part of the work is done. But a few todos accumulated:
type key
is not needed. We can compare blocks directly imo.type state = block
should be something liketype state = Preferred block
. This will improve error messages. Skipped, not necessary, increases diff, orthogonal.max|min_pow
tomax|min_hash
in the spec API. Undo!tailstorm[ll]
heuristic quorum uses hashtbl where it could use a Set.Ssz_tools.State8
used anywhere? If not, drop!localview
andglobalview
. May be unwise. Revert? No. I like the new interface.'prot_data
type variable. This can now be'a
.tailstorm[ll]
reward schemes are correct.ethereum_test.ml
. Have no simpler implementation. Thus ignore.dag.ml
implementation and newdagtools.ml