THELOGICALINDIAN - n-a
Here goes with the NKN cipher analysis for the “New Kind of Network” connectivity agreement & ecosystem powered by blockchain for an open, decentralized, and aggregate Internet. But what is amiss with the adored Internet that we accept now?
I like to alpha off a analysis by compassionate what they are aggravating to achieve. So I’m branch over to the whitepaper. See you on the added side!
… MATH!
Those are my capital takeaways from the whitepaper. Let’s see if we can acquisition what NKN are accomplishing to accomplish those goals.
7 repositories. Let’s dig in! I’m activity to bang things off at the basal of the repo. Fortunetree.
This is a advanced end for a forum, congenital on vue.js. It has a wallet avenue in it. That’s about the alone affair that bent my eye that is not a accepted appointment layout. Accepted advanced end anatomy with a store, components, routers, etc. — good, but I don’t see the appliance of the repo. So I am activity to move on.
keytransparency — forked from Google to get p256 functionality. Skip!
vxeddsa — forked from Scratch-net to get added cryptography functionality.
coniks-go — forked from Coniks-sys. Still annihilation that is account reviewing.
Nice analysis apparatus to simulate their accord and cellular automata theories. The after-effects are declared in the README.md files for anniversary simulation. The aftereffect of the accord simulation is what is declared in the whitepaper beneath the section 5.2.7 Simulations of CA Accord Algorithm.
consensus.py -> Neat little python calligraphy to simulate the model. Nice documentation.
There is actual little accident in actuality in nkn-client-js, so not abundant to say. It creates a NKN applicant which sends an RPC alarm to get the webserver abode and again listens on the alternate web atrium for a brace of basal events. It’s aloof a ancestor to analysis some functionality, so not account activity in to.
Very nice! A detailed README.md with added advice in the Wiki! Build instructions, deployment instructions, alike a appearance adviser for coders. I’ve never absolutely apprehend this abundant affidavit in my life. I’m added of a get to coding and apprehend up if/when I get stuck. But this activity has me intrigued.
A quick bang through of the repo shows that are about no assemblage tests accounting for this yet. Not great, but it’s apparently still a prototypal project. It’s best to address tests during the dev aeon though.
From account the documentation, there should be a brace of subsystems that are maintained in here. They anniversary run apart of anniversary other, but amalgamate to anatomy the abounding ecosystem.
Distributed Data Transmission Network
Proof of Relay
Blockchain Consensus
I’m activity to hop into the accord folder. 2 kinds of consensus? dbft and ising.
relay -> a account that subscribes to broadcast events. Basically it aloof passes packets on to the abutting destination abode in the chain. Calls the Proof of Broadcast Account to assurance the packet to prove that it relayed it again moves it on. The Proof of Broadcast Service. Verifies SigChains that are anesthetized to it again adds its signature, application the bounded wallet to the SigChains to prove broadcast occurred.
Good absurdity handling, a brace of TODOs, but the cipher is able-bodied written.
core->the absolute functionality to handle validation of altered signatures, signing data, transaction article for creating and processing altered types of transactions. Ledger functionality for administration blocks and bookkeepers.
net->there is cipher actuality to afford a brace of altered types of messages. Consensus payloads, blocks, transactions. There is broadcast functionality, heartbeat/ping neighbour cachet updates, administration of neighbour nodes and syncing blocks from neighbours. They are application Chord Distributed Hash Table for their arrangement cartography to analyze nodes on the network. The net cipher is apple-pie and able-bodied separated. I like!
db -> LedgerStore, ChainStore, PersistBlock handler, Transaction Store, Block Store, Voting. All maintained in one file. I would like to see this bare out into abate pieces. Everything is stored in a leveldb. They are application a UTXO archetypal for transactions.
rpc -> they accept a JsonRPC API and RESTful API. The RPC calls are acclimated in their CLI tool. It’s nice that they added both JsonRPC and REST options, but not absolutely necessary. Perhaps for their developer toolkit eventually?
websocket -> accepted webservice to handle contest anesthetized to it. A lot of the aforementioned functionality that the RPC and REST interfaces contain, with some new, some removed.
They accept a cli apparatus for management, a vm to run assertive processes, a wallet acclimated for bounded signing and account. And that’s about all I’m activity to go through.
NKN absolutely accept the architecture blocks in abode for their Distributed Network. Nodes can ascertain anniversary other, address packets and appear to consensus. In agreement of the absolute achievement of the network, alone time will tell.
Their Proof of Broadcast system — they are signing packets and abacus it to the signature alternation in a absolute way back nodes broadcast them. I didn’t acquisition annihilation about accolade distribution, which is axiological to adoption, but not all-important for their POC.
I didn’t see abundant about their networking toolkit for developers, which is appointed to be alpha appear in August. I don’t apperceive what their abounding plan is, but that should aloof be wrapping up the absolute functionality into a apple-pie amalgamation and documenting it. I’m not too afraid about that.
NKN Code Review Conclusion
NKN has appear into the bold with an agitative angle. They aren’t attractive to re-create and advance on absolute platforms. Instead, they are attractive to ascertain a new leg of decentralization, a New Kind of Network. Their goals are backed by abstract models which, based on my basal understanding, accomplish sense.
The cipher isn’t absolutely assembly ready, with lots of TODOs, FIXMEs and comments of “add this later”, but that is accomplished for a assignment in progress. I’m aghast by the abridgement of assemblage tests accounting and inline comments. That said, it doesn’t beggarly their cipher doesn’t work. They appear their aboriginal leg of their alpha testnet advanced of agenda so article is absolutely activity appropriate in the camp. With optimizations and the alpha absolution of their SDK advancing out in August, this activity absolutely has potential.
Disclaimer: Crypto Briefing code reviews are performed by auditing what is on affectation in the adept annex of the repo’s fabricated available. This was performed as an educational analysis and any comments in the commodity are the assessment of the writer. It is accustomed for cipher to change rapidly, appropriately we timestamp our cipher reviews so that they present a snapshot at a moment in time. Information independent herein should not be acclimated as any animadversion or admonition on the activity as a whole.
NKN Code Review Timestamp: June 2024