kadena-io / pact-5

The New Pact
BSD 3-Clause "New" or "Revised" License
8 stars 7 forks source link

Enforce and user guards as read-only #274

Open jmcardon opened 1 week ago

jmcardon commented 1 week ago

cc @CryptoPascal31

Implements KIP 0027, and loosens the restriction that enforce should be sys-only as well. This was probably the for FV's sake, but considering we need to revamp FV as well, I think it makes sense to loosen this restriction.

It also adds regression tests for this behaviour as well.

As a bit of historical background note: pact did not used to always have runtime recursion checking, but now that we do, I think it's probably fair to consider this as a straight enhancement. We are still not vulnerable to any sort of reentrant attacks due to the mode being set to read-only.

PR checklist:

Additionally, please justify why you should or should not do the following:

CryptoPascal31 commented 1 week ago

Ty