Questions about ByzCoin implementation

37 views
Skip to first unread message

Amirhossein Khajehpour

unread,
Dec 1, 2020, 9:16:19 AM12/1/20
to Cothority Discussion
Hi everybody. 
It's been some days that I have been trying to hack around the ByzCoin source code, and regarding the ByzCoin paper, I have some questions about its implementation.

As it is stated in the paper, about every 10 minutes one party has to get chosen to be the next leader determined using PoW. The new leader, during the next 10 minutes, can insert some transaction blocks (micro blocks) into the ledger. However, I could not find any clue in the source code that shows the node performs any PoW. Additionally, there is nowhere that a new serverIdentity is added to the existing roster (in case of finding new leader by PoW), then how is this update rule applied if the protocol is the one explained in the paper?

In the paper, it has been mentioned that in byzcoin, despite Bitcoin-NG, there are separate chains for micro blocks and key blocks. However, in the source code, as long as I could figure out, there is only one chain containing both micro and key blocks. According to the paper, the micro blocks have to refer to their parent key blocks, but there is no such field in the skipblock structure. Could you please help me understand what the structure of the chain (or chains) is? And, if the two chains have been compacted in one chain, what happens to the structure mentioned in the paper?

Thanks for your time.

Gasser Linus

unread,
Dec 2, 2020, 10:34:28 AM12/2/20
to Amirhossein Khajehpour, Cothority Discussion
Hi there,

Thanks for your email.

As it is stated in the paper, about every 10 minutes one party has to get chosen to be the next leader determined using PoW. The new leader, during the next 10 minutes, can insert some transaction blocks (micro blocks) into the ledger. However, I could not find any clue in the source code that shows the node performs any PoW. Additionally, there is nowhere that a new serverIdentity is added to the existing roster (in case of finding new leader by PoW), then how is this update rule applied if the protocol is the one explained in the paper?

The current ByzCoin implementation is a blockchain system based on the Chainiac, Byzcoin, and OmniLedger papers, and has been used as the consensus in the Calypso paper. The following parts are implemented:
- Chainiac: skip chain structure with log(n) sized proofs, identity management of the nodes
- ByzCoin: signed micro blocks
- OmniLedger: the ByzcoinX protocol for consensus of new blocks
- Calypso: LongTermShards to store secrets on the blockchain and selectively decrypt them, Decentralized Access Rights Control (DARC)

Instead of PoW, we implemented a Proof-of-Authority, which should eventually be replaced by Proof-of-Personhood. 

A lot of work has been done to do the following, “trivial” things, in the implementation:
And many more...

In the paper, it has been mentioned that in byzcoin, despite Bitcoin-NG, there are separate chains for micro blocks and key blocks. However, in the source code, as long as I could figure out, there is only one chain containing both micro and key blocks. According to the paper, the micro blocks have to refer to their parent key blocks, but there is no such field in the skipblock structure. Could you please help me understand what the structure of the chain (or chains) is? And, if the two chains have been compacted in one chain, what happens to the structure mentioned in the paper?

As we don’t use the PoW, we didn’t implement the macro blocks, but only the micro blocks, and there will ever be only one epoch. Also, instead of separating the identity chain, it is directly part of the “Configuration Contract” as a list of participating nodes. There is some proof-of-concept for the sharding described in the OmniLedger paper, but it never found its way into the main branch, as we focussed on an actually usable implementation.

We’re currently using it in a small network for a bit more than a year, and have some explorers and statistics available:
And some explorers:

I think there are around 10-20 regular users of the system, and about 100 stored in the blockchain…

Please don’t hesitate to write if you have more questions.

Sincerely,

Linus Gasser


C4DT
- Mr. Linus Gasser Lead Developer
- +41 21 693 6770 linus....@epfl.ch
 

EPFL – C4DT | Station 14
CH – 1015 Lausanne
www.c4dt.org


Reply all
Reply to author
Forward
0 new messages