Pchain Code Review: Andre Cronje Revisits The Project
Share this article
In a comprehensive rebuttal to Andre Cronje’s Pchain Code Review earlier this week, Pchain released a statement explaining what they believed he had missed.
Since it’s our intent to be completely fair to both the business and our readers, we are publishing that rebuttal here. Following these comments, Andre went back into the repos discussed by the Pchain team, and took another very careful look at the code. His findings are below the image.
It isn’t easy to read a critical review: and Pchain has responded constructively to Andre’s initial comments. We do not intend for the Crypto Briefing website to become a conduit of conversation between project teams and our reviewers and writers (we have Telegram and Twitter for that), but on this occasion Andre felt strongly that it was important to check on the points raised by Pchain.
– Jon Rice, Managing Editor
Pchain statement regarding Crypto Briefing code review:
Pchain Code Review Part II
new_one_stack – Integrating PDBFT into Ethereum mining
No more tendermint, instead core ethereum. Version added, RPC still default. Code is cleaner and neater, that’s for sure. ChainID’s have become strings. No real changes in ethereum, just creating a node. cmd is neat. Main chain and child chain still the same setup, still a tendermint config. Joining a new child chain means you have to join as a validator and submit stake.
cross_chain.go seems to contain the bulk of the work, the rest is just to setup the ethereum chains. Let’s pay close attention to this file.
Creating a new sub-chain. Name has to be unique. Validators must be more than 1.
Main chain and childChain array. As mentioned in previous review. Tendermint consensus (BFT)
Vote epoch > Start vote > Reveal vote > Tally vote.
So, it is definitely better than what we saw in the master branch, it’s better organized, it’s better designed, but essentially it is still just a multi dimensional ethereum with tendermint BFT (ethermint or cybermiles essentially).
Better code than previous, but still nothing really unique. Let’s look at the BLS to VRF branch change.
one_stack_bls_merge – BLS consensus to VRF proposer selection, to one-step voting
Still BLS from what I can see, i’ll dig more, maybe utils. Can’t find the VRF proposer selection.
So…. I found where they are making the bulk of their changes.
…in the vendors folder. Guys, this is for dependency management, don’t edit files here…
Ok, so we need to look at commit logs now instead, since vendor files are being modified. That sounds incredibly tedious. But let’s have a look.
Ok, this is what they meant with they incorporated BFT into go-ethereum. They added tendermint consensus.
Still not seeing the VRF though. The next branch is said to improve it even more, let’s look at it.
run_tx_before_vote – more efficient run&vote order
9th we had new_one_stack merged in, so let’s track changes from here.
Vendor changes again, in go-ethereum. This hurts me to see. Code is good though.
Let’s jump back to TX3ProofData to see if it has the VRF
Not finding it. Think I’m looking in the wrong place.
Let’s go back to new_one_stack and look at the commits for the vendor changes.
TX3PRoofData broadcast, all validators. Nice addition.
Pchain Code Conclusion (Part II):
More going on here than in the master branch, I was not expecting the changes in vendor, I didn’t even bother to look there. The go-ethereum integration of tendermint is decent (although so is ethermint).
The cross-chain implementation is nice (I wanted to say cute), Child chains get their own validator sets, they can use the mainchain to facilitate cross-chain communication. This is technically what they promised they were going to build.
Bit unsatisfied still that it is just re-organized / modified / (improved?) ethereum / tendermint, and that the changes were made in vendor, but at the same time I guess I don’t really know what to expect anymore. How many projects have raised large sums of money off of he back of ethereum?
Do the multi / cross-chains & tendermint increase ETH scalability (while sacrificing some decentralization and security), yes it does. So does ethermint though, and everyone still uses Ethereum.
You can chat about Pchain in our Telegram group. We love a good rumble.
Disclaimer: Crypto Briefing code reviews are performed by auditing what is on display in the master branch of the repo’s made available. This was performed as an educational review and any comments in the article are the opinion of the writer. It is normal for code to change rapidly, hence we timestamp our code reviews so that they present a snapshot at a moment in time. Information contained herein should not be used as any comment or advice on the project as a whole.
Pchain Code Review Timestamp: November 20th 2018