-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mining in Logarithmic Space - adaptations for variable difficulty and DAG #3
Comments
To be precise, when we refer here to the GHOST chain we mean an iterative procedure that traverses the DAG from past (genesis) to future (virtual) and at every step picks the child-block with maximum future size |
This comment is also relevant here |
One problem with the said protocol is that it should be relatively easy for an attacker to build P blocks with very low (and fake) difficulty on top of the DAG's selected tip, and then the attacker proof will be chosen by the verifier.
|
The finality violation detection that is mentioned here has some flaws:
Solutions:
|
Note: unlike mentioned above, the final implementation does implement GHOSTDAG and not GHOST. Although block rate of super levels does drop exponentially, we can still use the same K for each level since K is an upper-bound (and confirmation times are irrelevant when discussing pruning proof). |
I don't know if this is useful but the total chain work using the MLS paper notation is 2m * 2^u with stdev error 1/sqrt(2m). It's interesting that max target isn't needed. It cancels out from this: = (2^256 -1) * 2m / 2^(256-u). 2m is the total count of hashes below target 2^(256-u). This is for any varying difficulty algorithm as long as there are no difficulty targets below 2^(256-u) which is the case for their suggested 2m = 6k = 36 hashes unless the difficulty target has an extremely fast decrease (an increase in difficulty). Specifically, a difficulty would have to be D > chain_work/36. My thinking is based on single chains but I think the same equations may apply to DAGs. |
Mining in Logarithmic Space (MLS) is a work by Kiayias et al. that enables pruning headers by saving a logarithmic amount of super blocks. Super blocks are divided to levels: a level-1 super block is a block with
hash < target/2
, level-2 super block is a block withhash < target/4
, level-3 super block is a block withhash < target/8
and so on.We propose two changes to MLS:
MLS with variable difficulty
The idea is very simple: instead of considering a level μ super block as block with
hash < target/2^μ
, we define it ashash < max_target/2^μ
(max target can be 2256-1, or any other smaller number defined by the protocol). The rest of the protocol will work exactly the same, and the proof size will belog(accumulated_work)
, instead oflog(chain_length)
in MLS.MLS for DAG
Instead of having a chain for each μ, we're maintaining a
DAG ↑ μ
for each μ. Each block has to point to all level tips in its past.We'll have some minor changes in the notation proposed in the paper:
Our
Dissolve
function will now look like this:Every other aspect of the protocol will look exactly the same.
Rationale
Our first approach was to run GHOSTDAG for each
DAG ↑ μ
and to use the GHOSTDAG selected chain as an alternative to the block chain in MLS. This works well on constant hashrate, but it breaks when we apply "MLS with variable difficulty". Because the super block level is defined bylog(hash/max_target)
and notlog(hash/target)
the number of super blocks on each level is not regulated by the DAA, so we can't use GHOSTDAG, because it requires the network block rate as an argument.Instead of that we chose to use the GHOST chain. The GHOST protocol doesn't require the block rate as an argument, and although it doesn't guarantee liveness, it does guarantees that the honest majority respects the given chain.
The text was updated successfully, but these errors were encountered: