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

Principal namespaces #1507

Merged
merged 44 commits into from
Nov 18, 2022
Merged

Principal namespaces #1507

merged 44 commits into from
Nov 18, 2022

Conversation

emilypi
Copy link
Member

@emilypi emilypi commented Aug 17, 2022

This PR modifies the namespace contract ns to allow for autonomously-generated namespaces using principal account protocols. The schema is as follows:

  1. Users may create a principal namespace name using the new create-principal-namespace function added to the contract in this PR for the admin guard they might care to use to govern their namespace.
  2. Autonomously generated namespace names are of the format n_ + (160 bit truncations of Blake2b_256 hash of guard).
  3. When issuing define-namespaace and namespace in a Pact script, if the namespace name is the same as the created name (checked against the admin guard), then usage will succeed and otherwise fail.

@emilypi emilypi changed the base branch from master to feat/integrate-pact44 August 17, 2022 19:23
@emilypi emilypi changed the title WIP: Feat/principal namespaces Principal namespaces Aug 19, 2022
@emilypi emilypi marked this pull request as ready for review August 19, 2022 18:19
@emilypi emilypi changed the base branch from feat/integrate-pact44 to master August 19, 2022 18:19
sirlensalot and others added 4 commits September 20, 2022 20:49
* slp: move files around for better diff, get gas payer working

* don't use registry for principal namespaces

* remove dupe validate

* fix mainnet genesis yaml

* use previous install in repl

* move to hashes of principals

* prefix namespaces with "n"

* move to 160 bit hex namespaces

* use "n_" prefix

* update comment

Co-authored-by: Stuart Popejoy <[email protected]>
pact/namespaces/ns.pact Show resolved Hide resolved
pact/namespaces/ns.repl Show resolved Hide resolved
"tx failure on upgrade"
(try (enforce false "tx failure on upgrade") (load "ns.pact")))

(env-data
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need this?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed the env-data calls here - they were unnecessary

@emilypi emilypi merged commit b1ebd0b into master Nov 18, 2022
@emilypi emilypi deleted the feat/principal-namespaces branch November 18, 2022 19:49
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.

5 participants