-
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
FlyDAG - FlyClient adaptation for GHOSTDAG #2
Comments
Looking now at https://eprint.iacr.org/2021/623.pdf which is a new alternative to FlyClient, and which enables additionally pruning of headers. From initial inspection with @someone235, it seems that the technique we suggested above wrt FlyClient can be applied to this work as well |
One caveat with pruning headers in the context of kaspa: This can be solved by having a chain of finality points (adding for each block the hash of its finality point), and saving all of the finality points headers. This adds a storage of |
I referred to this paper here #3 |
I think this light client is help to implement ibc protocol for this protocol ics02 light client. |
Preliminaries on GHOSTDAG
Preliminaries on FlyClient
FlyClient, by Benedikt Bünz, Lucianna Kiffer, Loi Luu, and Mahdi Zamani, is “a novel transaction verification light client for chains of variable difficulty. Flyclient is efficient both asymptotically and practically and requires downloading only a logarithmic number of block headers while storing only a single block header between executions. Using an optimal probabilistic block sampling protocol and Merkle Mountain Range (MMR) commitments, Flyclient overcomes the limitations of NIPoPoWs and generates shorter proofs over all measured parameters.”
The protocol requires each block header to commit to the MMR of all blocks in its chain. The protocol receives the FlyClient commitment from the syncer peer whose chain is claimed to have highest accumulated work, and verifies this claim as follows: It samples blocks in the committed set, verifies their inclusion in the set (via an MMR inclusion proof, which is similar to a Merkle branch), and checks that the MMR of the tip of the chain is indeed an extension of the MMR committed in the sampled block. This guarantees that, if an honest block was sampled, an attacker will not be able to utilize honest blocks to increase its (claimed) accumulated work, unless these blocks are indeed legitimate members of its chain. By resampling multiple rounds, the probability that the proof is fraudulent decreases exponentially.
FlyDAG
Rationale
The strawman approach for adapting FlyClient to a DAG/GHOSTDAG would be to sample the (claimed) set of blue blocks, thereby generalizing over the notion of sampling the (claimed) set of longest chain blocks; and to have an MMR commitment to each block’s blue past, rather than to its (longest) chain. However, this is problematic. FlyClient relies on the fact that every block’s MMR is a subtree of the MMR of the last block in the chain, which holds true since the chain of the former is a subchain of the latter. Albeit, with blue blocks in GHOSTDAG, this property does not hold: the blue past of a blue block B need not be contained in the blue past of the last blue block. Therefore, its MMR commitment may not be a subtree of the T’s MMR.
To circumvent this, we check the MMR commitments against C, the nearest chain block to B. The blue past size of C is guaranteed to be very similar to that of B. With chains blocks, GHOSTDAG too satisfies the property that the MMR of a higher block is an extension of that of a lower one, which recovers the ability of the verifier to check that the inclusion proof of the lower block contains the MMR commitment of the lower one.
Protocol:
We now formalize this solution.
The text was updated successfully, but these errors were encountered: