[Bitcoin-ml] Weakblocks / Subchains

Awemany awemany at protonmail.com
Sun Dec 10 17:17:39 UTC 2017


Hey folks,

for the BitcoinUnlimited implementation, I have made a proof-of-concept, pre-alpha stage implementation of the weakblocks idea, as Peter Rizun described it in his subchains paper.

The pull request for BitcoinUnlimited with the code is here:

https://github.com/BitcoinUnlimited/BitcoinUnlimited/pull/856

I would be glad if folks could have a peek into my code. Especially since I am not very familiar with main.cpp /  validation.cpp and the various modes of validation implemented therein.

My general idea is described in more detail in the PR as well as the commit messages (docs are still TBD, will of course do them when the general concept has been found to be sound), but in short, I am handling weak blocks just like strong blocks, except for marking them and preventing them to become part of the active chain, and can thus reuse most of the validation machinery already available.

I am very interested in feedback on this! I also likely need a helping hand, someone with a knowledgeable brain on main.cpp/validation.cpp to pick regarding changes in these code parts.

Here's a couple of ideas/questions/explorations that just came to my mind further thinking about this:

- I was wondering whether the weak blocks rate should be set by median miner voting or similar. I now wonder, given that this does NOT impact consensus rules (at least not directly), whether a different scheme that is per node, similar to minrelayfee, would be doable as well. As in, accept weak blocks only if they are at least 1/600th of the strong block difficulty, but then also only accept them with a configurable, maximum rate, per node.

- I wonder whether it is easily possible to deal with weakblocks just in memory and avoid the store to block machinery, assuming that this is likely a good idea in terms of storage bandwidth used? What would be the easiest/best way to do so?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxfoundation.org/pipermail/bitcoin-ml/attachments/20171210/f701ab19/attachment.html>


More information about the bitcoin-ml mailing list