essential-contributions / essential-base

Core items shared by both the intent language and protocol.
https://essential.builders
Apache License 2.0
4 stars 2 forks source link

Effects #191

Open freesig opened 1 month ago

freesig commented 1 month ago

Idea

Functions indicate which effects they need access to in a bitmap. This allows the VM to run them in the correct context and combine the multiple VMs into one. If an op is hit that the effect isn't enabled for then the predicate will panic.

Effects

Some potential effects

Implementation

Use a byte at the start of any function and have bit flags for each effect. Max 8 effects

mitchmindtree commented 3 weeks ago

Just noting that effects analysis has since been implemented in #196, but we don't yet make use of this in essential-check.