gno icon indicating copy to clipboard operation
gno copied to clipboard

Namespace support for package paths

Open moul opened this issue 2 years ago • 4 comments

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

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: https://github.com/gnolang/gno/pull/384#issuecomment-1329879556. Related with #336.

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

moul avatar Sep 08 '23 07:09 moul

I've talked about a similar idea before :-) https://github.com/gnolang/gno/issues/709

anarcher avatar Sep 08 '23 10:09 anarcher

Related too: https://github.com/gnolang/hackerspace/issues/30

ajnavarro avatar Mar 23 '24 17:03 ajnavarro

Could this work in testnets by associating a GitHub username?

thehowl avatar Apr 11 '24 15:04 thehowl

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

Kouteki avatar May 15 '24 07:05 Kouteki

Steps:

  • GnoSDK MVP #2205
  • Link with r/demo/users

Bonus:

  • Refactor r/demo/users and move it to r/sys/users
  • Add support for teams #2184

moul avatar May 26 '24 20:05 moul

Blocks #2342

Kouteki avatar Jun 14 '24 09:06 Kouteki

Closed with #2471

zivkovicmilos avatar Jul 09 '24 21:07 zivkovicmilos