linera-io / linera-protocol

Main repository for the Linera protocol
Apache License 2.0
119 stars 100 forks source link

Refactor WIT system API to match the host side traits #1977

Open jvff opened 4 months ago

jvff commented 4 months ago

Motivation

The guest side has three separate APIs: contract system API, service system API and view system API. This does not match the host side, which has a parent BaseRuntime trait and ContractRuntime and ServiceRuntime traits. Not only does this make maintenance a bit more complicated, but it also prevents moving the write_batch system API to be contract-specific.

Proposal

Refactor the WIT system APIs to follow the host layout, making use of the ability to include WIT interfaces in worlds so that the base runtime is only defined once, and also moving the write_batch system API to be contract specific.

ma2bd commented 4 months ago

See also #1976