Skip to content
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

Suggestion: Sugar syntax of (define-keyset ) should be deprecated #1210

Open
CryptoPascal31 opened this issue Apr 27, 2023 · 2 comments
Open

Comments

@CryptoPascal31
Copy link
Contributor

Currently, Pact allows to use this sugar syntax:

(define-keyset  `xxxx)

which is internally translated to:

(define-keyset 'xxxx (read-keyset 'xxxx))

IMHO, this should be removed or at least deprecated. Because this shortcut does not provide any functionality just confusion.

Think that for many people the differences between (read-keyset), (define-keyset) and (enforce-keyset) are not clear and confusing, and are source of many security issues.
Allowing to use the sugar syntax just makes things even harder to understand.

@jwiegley
Copy link
Contributor

Thank you for the report, @CryptoPascal31, Pact team will discuss.

@CryptoPascal31
Copy link
Contributor Author

Following the same philosophy, some other old keyset's related confusing syntax should be deprecated as well:

(enforce-guard "my-keyset")

Confusing because "my-keyset" is in fact not a guard.
and strictly internally translated to :

(enforce-guard (keyset-ref-guard "my-keyset"))

Module keyset governance should be deprecated:

(module my-mod "my-keyset"

Devs can replace it efficiently with capability governance. And moreover keyset governance is confusing because handled differently than capability governance (strict evaluation at first deployment time)

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

No branches or pull requests

2 participants