All palms are on deck within the core tech and Scilla groups, as we gear up for the activation of sensible contracts on 10 June. We’re very excited for today, which delivers on the promise we made two years in the past. As we go into the next week, you’ll hear extra from us on why that is vital. Keep tuned!
For additional data, join with us on one among our social channels:
In the meantime, we take you thru the important thing core tech and scilla updates.
Readers of our earlier weblog posts might recall that Zilliqa Analysis bootstrapped and hosts a fraction of the mainnet by deploying AWS-powered situations by means of Kubernetes. This week we’re taking a break from the standard format of detailing the most recent updates to the core C++ Zilliqa code base to spotlight a few of the more moderen developments to our mainnet infrastructure.
Lookup API availability enchancment. With the neighborhood’s assist, we recognized a problem the place a defective lookup node was not de-registered from our load-balancer in a well timed method, inflicting some service degradation on the API endpoint. An enhanced monitoring mechanism has since been put into motion to alleviate such points.
Metadata persistence enhancement. We found one potential situation in our service discovery system which can trigger metadata loss that requires human intervention. Though this has not led to any substantial downside to date, we had been capable of rapidly repair the problem by upgrading the persistent storage.
Infrastructure isolation reinforcement. The isolation of a number of vital programs in our infrastructure has been bolstered at a number of layers, from the underlying cloud companies to software deployment. This creates fault domains to guard high-priority workload if sure vulnerabilities are found in our infrastructure.
Formal verification: Overflows and underflows in integer arithmetic inside sensible contracts has all the time been an actual concern. The neighborhood has witnessed a number of incidents within the current previous, essentially the most notable one being the batchOverflow assault, the place attackers had been capable of create overflows at runtime resulting in unexpectedly giant switch of funds to the attacker’s pockets.
The usual integer library in Scilla implements overflows and underflows checks and throws error at runtime when required. And therefore, builders would not have to depend on any exterior secure math like library. We just lately determined to go a step additional and formalize secure integer arithmetic and show correctness of the Scilla integer capabilities in Coq.
To this finish, we have to have library help for bit arithmetics in Coq, together with definitions of bitwise operations and proofs of their properties. The same old representations are tailor-made to ease proving slightly than present computational effectivity. The
coq-bits library gives us with the instruments to modify between representations for environment friendly symbolic manipulation and environment friendly calculation. As well as, the library’s designers have fastidiously approached extraction, which suggests we are able to put it to use to get OCaml code from the continuing formalization.
Procedures: We now have completed implementing procedures in Scilla in time for the discharge of sensible contracts on the Zilliqa mainnet.
The first use of procedures is the sharing of code that accesses the contract’s state. This might be significantly useful if completely different elements of the state (e.g., completely different maps) must be saved synchronised, as a standard process will be capable of replace the maps constantly. One other use case is the standardisation of error messaging.
Procedures include a couple of limitations:
- Recursive or mutually recursive procedures usually are not allowed, as they will doubtlessly trigger non-termination. Sooner or later we plan to increase Scilla with a
foreachassemble to permit the appliance of a process to every component of an inventory
- A process can not settle for a map as a parameter, nor a parameter whose sort comprises a sort variable. Maps are disallowed for effectivity causes, as a result of all the map would must be copied if handed to a process
- Procedures don’t return values. Procedures are supposed to be run as a result of for his or her side-effects, so if a price must be computed, one ought to use a library operate as a substitute (if the contract state must be up to date earlier than the worth might be computed, use a process to replace the state, then name a library operate to compute the worth)