Cardano Proposes Removing Plutus Scope Check
CIP-0205 go komot one separate check we dem dey run before script execution, make validation work reduce through change we go need new language version and hard fork.
By SongMarketCap
Updated:
Cardano proposal CIP-0205 wan remove one step we dem dey use prepare Plutus scripts before execution. Author Jacco Krijnen propose make dem handle unbound variable errors during execution instead of to check the whole program beforehand. Dem submit am on September 25, and the proposal still dey under review.
The Cost of Preparing Plutus Scripts
Before node go execute script, e dey check whether the variables dey properly defined inside the program. Dem dey call am scope check, and e dey happen for the second phase of transaction validation.
Earlier benchmarks wey the proposal cite show say the check account for roughly 20% of script preparation time, including decoding and version checking. For full validation benchmarks, e represent approximately 3% of total validation time. These figures dey measure how much share of processing time the check dey take for those test workloads.
To remove am go reduce processing work for scripts we qualify. Any reduction wey fit happen for transaction fees go depend on later adjustments to fee parameters, according to the proposal.
How Plutus Would Handle Variable Errors
Plutus Core na the language we dem dey use run smart contract scripts for Cardano. The execution engine, the CEK machine, don already dey handle attempts to use variables we no get bound value.
For the proposal review discussion, developer Seungheon Oh note say CEK no depend on the preliminary scope check. If person try evaluate unbound variable, e go result in ordinary execution failure.
Under the rules wey dem propose, program fit succeed if unbound variable appear only inside code we no ever run. Programs wey scope correct go still keep the same execution results.
Development languages like Aiken, Plinth and Plutarch don already enforce variable scoping through their type checkers before scripts reach the blockchain, na so the proposal talk.
A New Language Version and Hard Fork
The draft tie the change to Plutus Core language version 1.2.0, we go require hard fork. Implementation go include updates to the specification, execution code, formal model and conformance tests.
The proposal receive the number CIP-0205 on September 29. CIP editor Robert Phair request make dem circulate am wider among working groups before review continue, because the change wide.
Under the current draft, existing scripts wey dey use language versions 1.0.0 and 1.1.0 go retain their behavior. After activation, new scripts wey declare version 1.2.0 fit execute without the separate preliminary scope check.