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

rename namespaces and remove "ipfs" alias for "p2p" #283

Merged
merged 1 commit into from
Aug 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions table.csv
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ md4, multihash, 0xd4, draft,
md5, multihash, 0xd5, draft,
decred-block, ipld, 0xe0, draft, Decred Block
decred-tx, ipld, 0xe1, draft, Decred Tx
ipld-ns, namespace, 0xe2, draft, IPLD path
ipfs-ns, namespace, 0xe3, draft, IPFS path
swarm-ns, namespace, 0xe4, draft, Swarm path
ipns-ns, namespace, 0xe5, draft, IPNS path
ipld, namespace, 0xe2, draft, IPLD path
ipfs, namespace, 0xe3, draft, IPFS path
swarm, namespace, 0xe4, draft, Swarm path
ipns, namespace, 0xe5, draft, IPNS path
Comment on lines +84 to +87
Copy link
Member

@lidel lidel Nov 8, 2022

Choose a reason for hiding this comment

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

cc @makoto – fysa in case this impacts ENS (i know you use ipfs-ns and ipns-ns codes for identifying /ipfs/ and /ipns/ content paths, but not sure if you ever rely on their string labels)

zeronet, namespace, 0xe6, draft, ZeroNet site address
secp256k1-pub, key, 0xe7, draft, Secp256k1 public key (compressed)
dnslink, namespace, 0xe8, permanent, DNSLink path
Expand All @@ -109,7 +109,6 @@ utp, multiaddr, 0x012e, draft,
unix, multiaddr, 0x0190, permanent,
thread, multiaddr, 0x0196, draft, Textile Thread
p2p, multiaddr, 0x01a5, permanent, libp2p
ipfs, multiaddr, 0x01a5, draft, libp2p (deprecated)
https, multiaddr, 0x01bb, draft,
onion, multiaddr, 0x01bc, draft,
onion3, multiaddr, 0x01bd, draft,
Expand Down
15 changes: 0 additions & 15 deletions validate.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,10 @@
import sys
import re

# We have some duplicates
ALIAS_TABLE = [
{"ipfs", "p2p"},
]

def check(fname='table.csv'):
class CheckError(Exception):
pass

aliases = {}
for nameset in ALIAS_TABLE:
for name in nameset:
aliases[name] = nameset

success = True
with open(fname) as table:
tablereader = csv.reader(table, strict=True, skipinitialspace=False)
Expand Down Expand Up @@ -84,11 +74,6 @@ class CheckError(Exception):
names[name] = code

if code in codes:
dup = codes[code]
if name in aliases:
if dup in aliases[name]:
# Skip aliased names
continue
raise CheckError(
f"found duplicate for code {hex(code)} "
f"for '{codes[code]}' and '{name}'"
Expand Down