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

Namespace support for package paths #1107

Closed
moul opened this issue Sep 8, 2023 · 7 comments
Closed

Namespace support for package paths #1107

moul opened this issue Sep 8, 2023 · 7 comments

Comments

@moul
Copy link
Member

moul commented Sep 8, 2023

The feature we're discussing will be active on gno.land but might not be available on other tm2/gnovm blockchains.

Our objective is to emulate GitHub's user and organization structure, allowing contracts to be published either under an individual's or a team's namespace.

The process for registration is contract-based. This implies that the AddPkg command on the blockchain would need to reference a contract for filtering.

Note that namespaces (r/system/names) are distinct from r/demo/users and may have a unique registration mechanism. One proposal is to have a fee-based registration system, although we can consider flexibility during testnet phases.

While r/demo/users is envisioned as an open social feature with possible extensions, namespaces on the main chain might be more stringent. This might even include KYC requirements, especially for concise usernames or organizations, but this remains to be decided. It's essential to ensure the independence of r/demo/users.

Our intention isn't to limit contract publishing to only approved users. Rather, we want to provide preferred URLs for these users, and the option for teams to share a namespace. However, we still want to offer everyone the opportunity to publish contracts. Non-official contracts can be published under {p,r}/anon/{std.Address}/*.

graph TD

A{User Types}
B["{p,r}/manfred/* (Personal)"]
C["{p,r}/myorg/* (Team)"]
D["{p,r}/anon/g12345 (Anonymous)"]

A --> B
A --> C
A -->|Unofficial contracts| D

subgraph "Personal"
B --> E[Individual's Contracts]
B --> F[Personal Projects]
end

subgraph "Team"
C --> G[Team's Contracts]
C --> H[Shared Projects]
end

subgraph "Anonymous"
D --> I[Anonymous Contracts]
end
Loading

For team functionalities, initial support is necessary. Presently, any namespace is created by an admin. The status can shift to a team when the admin brings in other members, who can either be promoted to admin or remain as members.

I recommend we proceed with the original effort in #375. There's a promising implementation in #384 that might be adapted to complete the task.

More context: #384 (comment).
Related with #336.

Edit: I've added this to the 'test4' milestone for extra testing and documentation updates.

@moul moul added this to the 🏗4️⃣ test4.gno.land (next) milestone Sep 8, 2023
@anarcher
Copy link
Contributor

anarcher commented Sep 8, 2023

I've talked about a similar idea before :-)
#709

@ajnavarro
Copy link
Contributor

Related too: gnolang/hackerspace#30

@thehowl
Copy link
Member

thehowl commented Apr 11, 2024

Could this work in testnets by associating a GitHub username?

@Kouteki
Copy link
Contributor

Kouteki commented May 15, 2024

This item will be a workshop topic on the Belgrade retreat. We'll know the priority and whether it's a post test4 launch milestone

Update (24/5): nice to have for Test4, but not a blocker

This was referenced May 25, 2024
@moul
Copy link
Member Author

moul commented May 26, 2024

Steps:

Bonus:

@Kouteki
Copy link
Contributor

Kouteki commented Jun 14, 2024

Blocks #2342

moul added a commit that referenced this issue Jul 6, 2024
This package demonstrates a new access control pattern relying on
package paths.

It considers that the #1107 feature is already implemented to rely on
the built-in security.

You can see an ongoing usage in #2334.

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
@zivkovicmilos
Copy link
Member

Closed with #2471

gfanton pushed a commit to gfanton/gno that referenced this issue Jul 23, 2024
This package demonstrates a new access control pattern relying on
package paths.

It considers that the gnolang#1107 feature is already implemented to rely on
the built-in security.

You can see an ongoing usage in gnolang#2334.

---------

Signed-off-by: moul <94029+moul@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 🚀 Needed for Launch
Development

No branches or pull requests

7 participants