2024-08-23
· 2 min read
Core Developers discussed the latest proposals to advance Stellar Core in this week's Protocol Meeting.
- The proposal for addition of a constructor to Soroban’s flavor of Rust was introduced in a previous protocol meeting (previous meeting), documented in CAP-58. A constructor is a function that will only be executed the first time the contract is created.
- In this meeting, Dima discussed the updates made since the last meeting:
- Default constructor - if a constructor is not defined explicitly, the contract is treated as if it has a constructor
- Semantics of the return value - if the transactions succeeds, it is required to return a valid value
- Constructor interaction with custom accounts - custom accounts must be aware of the context that they are authorizing.
- Graydon discussed the upgrade to the Wasmi virtual machine, documented in CAP-60. Wasmi works by translating WebAssembly code to to an Internal Representation (IR) and then executing it. The upgrade is impactful in two ways.
- Translating from WebAssembly to IR takes longer but the execution of the resulting IR is performant.
- The upgrade introduces lazy compilation. Of all functions in a contract, only ones that are called in a given transaction will translated thus reducing both latency and fees.
- Jay discussed addition of BLS12-381 cryptographic curve, documented in CAP-59.
- Addition of pairing-friendly elliptic curves enables zk-based applications. 11 host functions have been added to expose mapping, pairing, and arithmetic on the BLS12-381 curve.
- Examples case of BLS signature verification was presented. It consumed 26M instructions (running natively), which is promising given the per-transaction limit is 100M.
- There was general agreement that the interface is the right one as it allows a contract developer to implement a wide variety of use cases. Discussion continues in discord.
- Jay requested that developers should build applications against the function and give feedback.