Skip to content

[Experimental] Non-reentrancy special form #362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jmcardon
Copy link
Member

This PR is a proof of concept of an experimental feature for pact 5, which is module level non-reentrancy.

Syntax

For some syntactic term k,

(non-reentrant k)

Semantics

For any term k (in this example, (m::foo 1)) written within a module foo's definition (defcap, defun, defpact), e.g:

  (defun definitely-not-reentrant (m:module{foo-callable})
    (with-capability (SENSITIVE)
      ; NAME IS TENTATIVE
      (non-reentrant (m::foo 1))
      (called-internal)
      )
  )

(non-reentrant k) guarantees that k does not call back into foo during evaluation of k.

PR checklist:

  • Test coverage for the proposed changes
  • PR description contains example output from repl interaction or a snippet from unit test output
  • (If Relevant) Documentation has been (manually) updated at https://docs.kadena.io/pact

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

  • Benchmark regressions
  • Confirm replay/back compat (Ignore until core release)
  • (For Kadena engineers) Run integration-tests against a Chainweb built with this version of Pact (Ignore until core release)

@CryptoPascal31
Copy link

❤️ 👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants