Comments (4)
/cc @warpfork @mikeal @daviddias @vmx
from cid.
It took me a while to understand this, so I'll rephrase it to make sure I understood it correctly.
We are just changing the definition, of what the first few bytes (a varint) means. Currently that's the version of the CID, this issue proposes making it a multicodec. This would make a CID not its own special thing, but just another multicodec. So systems like libp2p could be designed to use any multicodec they warnt as identifier for certain things. Though they will probably use the CIDv1 multicodec, which is the same bytes as the CIDv1 we know today.
If I understand it correctly I'm in favour of this change, but certainly want to hear what others think.
from cid.
This would make a CID not its own special thing, but just another multicodec.
Not quite. CIDs are still (multicodec, multihash)
tuples (although #26 is proposing to remove the "IPLD format" connotations from the multicodec part). They also still carry all string format, multibase, etc. concepts.
The proposal here is to redefine the 0x1 in CIDv1 to be a multicodec for CIDv1 instead of a version number. Currently, CIDv2 would start with 0x2, CIDv3 with 0x3, etc. After the proposed change, CIDv2 would start with an arbitrary multicodec (e.g., 0x40 (if unallocated)).
The motivation is to avoid conflicts. That is, if we eventually define a hash function with the multicodec 0x1, I may not be able to disambiguate between a CIDv1 and that multihash. We usually know what we should be expecting based on the context. This is just proposing to make it unambiguous, even without the context.
Note: The significant drawback here is that this would prevent us from ever choosing a CID version that conflicts with an existing multicodec. So, if we ever run out of single byte multicodecs and needed to create to change the CID format (bump the CID version), we'd need to use a two-byte (or more) multicodec.
from cid.
But yes, this is purely definitional. I'm not suggesting we change the representation, just that we:
- Allocate 0x1 in the multicodec table for CIDv1.
- If we ever need a CIDv2, we'd allocate a new multicodec instead of just using 0x2.
from cid.
Related Issues (20)
- Reproducible CID HOT 11
- Universal container format based on progressive specialization HOT 4
- Move CID spec to specs repo HOT 1
- Move CIDs to the "multiformats" project HOT 14
- Specify project status HOT 1
- Cite URI specification
- "identity" multibase CIDv1 binary HOT 4
- Implementations: should a v0 be equal to v1 HOT 3
- Defining CID without Multibase prefix
- Revisit language of the whole spec
- CID Decoding Algorithm does not define "string", and allows false positives HOT 4
- CID Specification does not define "base58btc" HOT 3
- Create cid from signature HOT 1
- Create a cid for exist files? HOT 1
- Comparison and relationship with W3C DID standard HOT 3
- Add types to appease mypy! HOT 2
- Link to py-cid is outdated HOT 4
- Specify CID without a specific binary encoding
- CIDv2 idea: include the heights of trees in the CID HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cid.