Ankr Code Review Distributed Cloud Computing
analysis

Ankr Code Review Distributed Cloud Computing

THELOGICALINDIAN - n-a

So this is an Ankr Code Review, not an ICO review, but that’s not activity to stop me from attractive absolute anxiously at the accord agreement here. Proof of Useful Work sounds intriguing. Good to see that on their website they advance with some of the absolute allowances they intend to provide, not aloof the tech, but you can go see that for yourself. So, what abroad do they say on there?

“Ankr, Distributed Cloud Computing on Trusted Hardware. Ankr provides a computation-resource-efficient blockchain and an chip abstracts augment arrangement leveraging both cryptographic primitives and trusted hardware.”

“The Proof of Advantageous Assignment (PoUW) accord enables a self-sustainable blockchain framework. Instead of crumbling electricity and accretion ability on hashes like Bitcoin does, PoUW uses these assets appear advantageous assignment tasks provided by enterprises and consumers.”

“The agreement runs on SGX-enabled CPUs with alien accession to ensure aegis and confidentiality. The atypical PoUW access unlocks the massive abeyant of abandoned accretion ability about the apple by accouterment abundant incentives: in this scheme, every ciphering contributor gets compensated, and some will get the added accolade for breeding the blocks.”

This starts with a agglomeration of advertising ideas, Cloud Computing, Proof-of-Useful-Work instead of Proof-of-Work, Plasma Sidechains befuddled in as a Multi-chain Plasma implementation, Native Oracle Services (NOS), cryptographic primitives, and trusted beheading ambiance (TEE).

That’s a lot for me to booty in. So let’s alpha with Proof-of-Work. Why do we use Proof-of-Work? Actually, one footfall back, what is Proof-of-Work? PoW is a about a academic game, we apperceive the answer, but we don’t apperceive how we got there. So we alpha academic altered permutations until we acquisition the answer. This takes a continued time to achieve (dependent on difficulty) but it is actual quick and accessible to verify.

So PoW is abundant to prove that article happened, it proves that addition took at atomic that bulk (difficulty) of time academic to get to the answer, so we apperceive they had a banking (electricity) detriment.

So how does Proof-of-Useful-Work claiming that? According to their own description, by accomplishing some advantageous bit of computing. For example, we accept massive server farms all aggravating to break N = NP problems, so why not accord accretion ability to this? The botheration comes in with Proof. How do you prove that they did the actual bit of work? PoW is accelerated to do, but actual accessible to prove. However, if this was a non-deterministic computation, again I would accept to accommodate the ciphering to prove that you did it.

So to epitomize that you did it (and appropriately prove) would booty the aforementioned bulk of time. Not actual able is it?

So instead, in comes Verifiable Computing. This is the abstraction of outsourcing anatomic assignment while actuality abiding that the appropriate assignment has been computed, so instead, I would accord the aforementioned bit of assignment to be completed to 3 workers, back at atomic 2 after-effects accept been alternate I can analyze the results, if they match, the assignment has been verified, so instead this can be apparent as a accord on the assignment done, and anniversary artisan is adored for the actual assignment done. But now we alpha seeing an absorbing account here, anniversary artisan is adored for the actual assignment done. Quite altered than PoW, area alone the aboriginal to access at the acknowledgment is adored (and not consistently the case with best chains, altered affair for addition day).

The aloft was aloof one archetype of Verifiable Accretion however, addition is trusted hardware, the best accepted archetype actuality Intel SGX (Software Guard Extensions), by including the beheading into the SGX chips themselves, you can be assured that the accretion is absolute and appropriately not tampered with.

So why don’t all blockchains use this instead? Because the computational breadth is unknown, what if it takes 10 years to ability an answer? The job of PoW is to accord us a block almost every aeon (whatever that aeon ability be). If the time to band-aid is unknown, how can we apperceive back the abutting block will be? What if there isn’t any assignment to be done? Does this force every Node to accept an Intel SGX chip?

Lot of changing questions about PoUW.

Questions abreast (and blank Plasma Side chains and Native Oracles for now) let’s jump into some code.

Quite a few I am absorbed in ERC223, token-smart-contract, go-ethereum, plasma-mvp, bitcoin, pouw (the big one), april_demo (why did we about-face from birr characters to accentuate notation?)

ERC223, ERC777, ERC820, all aggravating to accomplish ERC tokens aboriginal chic citizens. Functions aren’t acquainted of transfers of ERC tokens (unless they use accept and transfer), so instead there are a lot of implementations to break this affair by application callbacks and accepting functions apparatus the callbacks. Glad to see added acquaintance of this issue, but annihilation actuality in the repo, so let’s move on.

ANK badge (really, not ANKR?), absitively to be a ERC20 accepted token, makes sense, they aren’t architecture a dApp afterall. Other than supply, annihilation absorbing here.

go-ethereum, 361 commits abaft master, annihilation here.

plasma-mvp, 12 commits abaft AdityaSripal which is 39 commits ahead, and 110 commits abaft omisego.

bitcoin, annex is even.

Which leaves us with pouw and april_demo, jumping into april_demo first.

Looking at a webapp

Looks like it is application bitcoind-rpc-client, aloof a applicant for active bitcoin RPC commands

Seeing Axios (for HTTP) and bitcoin-core, let’s see what they do.

Block explorer

Blocks actuality accustomed from an HTTP API (will attending into that aloof now)

API is an absorption band for bitcoind-rpc-client. Port 20241

Very big blocks. Seeing some absorbing fields here. “confirmations”, I’m bold assignment confirmations, “nonce”, why nonce in a non PoW system? “difficulty”, aforementioned catechism as nonce. “chainwork”, affidavit of assignment done? “nextblockhash” so the block is adapted column sealing?

More questions than answers, and we are out of abstracts to attending at, so let’s move on.

Onto Proof of Useful Work, appear on guys, accomplish my Ankr cipher analysis stellar, appearance me article amazing.

[Note, some of the cipher actuality is currently non-public, and will be aggregate at a after date.]

Intel SGX drivers required, makes sense.

I’ve never congenital SGX libraries, so I don’t absolutely apperceive what is boiler bowl and what is absolute code, so this is activity to booty a bit of time. As with all C projects though, let’s alpha at main.cpp

measure.h or parserfactory.h looks like our targets.

I was amiss on both accounts. So changeless assay looks like it is aloof focused about assay of the beheading ambiance and code, so let’s move on.

Lots of scripts, let’s accept a look.

Testing burst vs acknowledged computations for blocks, analysis apprenticed development, acceptable to see.

The python tests and scripts are good. It is PoC cipher though, it is not advised for a reader.

So from what I can see, the proteinfolding does the advantageous work, miner-python calls the assignment and publishes the after-effects into the bitcoin ledger, and changeless assay confirms the achievement from proteinfolding. So assimilate proteinfolding we go.

Not a lot absolutely accident here. pouw calls protain_folding (yes, protain), which calls GeneticAlgorithm. I’m analytical how they will accomplish this ambiguous abundant to action for added than protein folding.

I charge added cipher at this point. PoUW (I anticipate Verifiable Computing has added appliance to ascent acute contracts, than a blockchain), claret (Aditya Sripal looks to be on the aggregation and they arise to accept absolutely a bit of assignment done on plasma), and built-in oracles (although I still accept this charcoal the deterministic attributes of a blockchain) are absorbing choices.

SGX banned accord to alone those who accept the hardware. Useful jobs are difficult to generalize, and you can’t do continued jobs to generalize blocks.

Ambitious ideas, I don’t anticipate they are absolutely practical, actual adolescent team, absorbing advisers. There are absolutely a few account here, alike if they are a bit disjointed.

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.

Ankr Code Review Timestamp: May 20th, 2024 at 12:21 GMT