Skip to content
New issue

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

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

Already on GitHub? # to your account

CIP 34: Network Registry #158

Merged
merged 7 commits into from
Jan 13, 2022
Merged

CIP 34: Network Registry #158

merged 7 commits into from
Jan 13, 2022

Conversation

SebastienGllmt
Copy link
Contributor

Currently Cardano has two easily-usable networks: "mainnet" and "testnet". However, in the future, we expect more networks to exist and so we need some way to refer to these networks to be able to write better multi-network applications and systems.

This will help with standards like CIP30 for the "getNetworkId" endpoint and having a standardized registry for networks allows easy integration into the broader crypto ecosystem via standards like CAIP-2

@SebastienGllmt SebastienGllmt self-assigned this Nov 24, 2021

When representing these networks in a human-readable string, the following format shall be used:

```
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Another option for the format could be bech32. The result would look something like this:

cipxx:1pugjyv6y3rn0jc

This is less human readable, but not that bad and has the checksum in it which is also nice (but the checksum is a little aggressive for the size of the payload. Checksum is 6 characters and so around half of the resulting string is just the checksum)

NetworkRegistry/NetworkRegistry.md Outdated Show resolved Hide resolved
NetworkRegistry/NetworkRegistry.md Outdated Show resolved Hide resolved
NetworkRegistry/schema.json Outdated Show resolved Hide resolved
NetworkRegistry/schema.json Outdated Show resolved Hide resolved

## Specification

We create a machine-readable registry of networks
Copy link
Contributor

Choose a reason for hiding this comment

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

Where will this be stored? How will the data be governed? Will it be decentralized?

Or is this proposal just about the format of the data, leaving the actual form of the registry unspecified?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It will be stored here in this CIP. The governance is that anybody who submits a chain ID for any actual network they launched gets it. Similar to other blockchains that have similar IDs with similar governance. This system will not be uniquely associating chain IDs to projects. It's just a way for people to declare they are using an ID in an agreed-upon place to avoid people accidentally colliding.
This is similar to the way other chains deal with chain IDs and similar to other registries like the metadata label registry (CIP10) and SLIP44.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, that makes sense. It would be good to have something about t hat in the text!

What about short-lived networks, e.g. networks spun up for testing and then spun down shortly afterwards? Is the idea that they should use the same format to identify themselves, but not bother to register here? Will that affect how e.g. wallets interact with such networks?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I guess short-lived networks could just pick a IDs to avoid any chance of collision and they can double-check this CIP to make sure they're not conflicting. We could reserve one of the network IDs for short-term networks and then have them pick a random network magic within it if that sounds like something useful

@SebastienGllmt SebastienGllmt changed the title Network Registry CIP 34: Network Registry Dec 7, 2021
@crptmppt crptmppt added the State: Last Check Review favourable with disputes resolved; staged for merging. label Dec 21, 2021
@SebastienGllmt SebastienGllmt merged commit cbf2be8 into master Jan 13, 2022
@SebastienGllmt SebastienGllmt deleted the NetworkRegistry branch January 13, 2022 18:46
@rphair rphair removed the State: Last Check Review favourable with disputes resolved; staged for merging. label May 2, 2023
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants