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

Base of IPNS #19

Closed
wants to merge 5 commits into from
Closed

Base of IPNS #19

wants to merge 5 commits into from

Conversation

Bren2010
Copy link
Contributor

Adds the ability to express paths as either a base58 hash, a proquint id, or as a domain name (through a DNS TXT record).

b58Exp := "^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]*$"
pqExp := "^([abdfghijklmnoprstuvz]{5}-)*[abdfghijklmnoprstuvz]{5}$"

isB58, err := regexp.MatchString(b58Exp, name)
Copy link
Member

Choose a reason for hiding this comment

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

youre losing this error here, you should probably check it before calling match string a second time.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you! Should be better now.

@jbenet
Copy link
Member

jbenet commented Jul 31, 2014

Cool stuff! Glad to get started on this part.

One problem: name resolution (/ipns) and immutable path resolution (/ipfs) are different. Note that /ipns/<hash> and /ipfs/<hash> are different. The latter returns the object whose content hashes to <hash>. The former returns the latest object published + signed by the public key at /ipfs/<hash>.

Beyond this fundamental difference, there are other strong reasons to keep mutable and immutable paths completely separate. Certain applications may opt to operate entirely on immutable objects, and we can optionally upgrade the naming system without altering the immutable objects at all. The importance of making mutable and immutable data clearly distinct -- and the importance of separating the subsystems -- became clear when studying the designs of systems like git (objects and refs) and plan9 (fossil and venti), and the usage patters the support. Even the http/https distinction is in-line with separating the name spaces clearly (designing for most humans).


So yeah, let's revert back to having path resolution as just immutable data, and doing name solution on top (names resolve to the top level object, and pass along resolution to path) whole the naming (can we call the module namesys or ipns? name isn't obviously about just objects. Other things will have names too.

@Bren2010
Copy link
Contributor Author

The latest commit will require resetting your .go-ipfs folder for IPFS to work, because there was a commit change.

@jbenet
Copy link
Member

jbenet commented Jul 31, 2014

Cool! Let's rebase this branch on top of new master -- rather than merging master in. Are you comfortable with rebases? Took me a while, so happy to walk you through it on IRC.

@jbenet
Copy link
Member

jbenet commented Aug 2, 2014

For future ref, these were rebased from: 794dc10...48665af

@@ -7,7 +7,7 @@ import (

// Identity tracks the configuration of the local node's identity.
type Identity struct {
PeerID string
Curve uint16
Copy link
Member

Choose a reason for hiding this comment

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

Hey, why is the PeerID removed here? PeerIDs will survive beyond each launch (we don't generate them every time). Identities matter in BitSwap.

@Bren2010 Bren2010 closed this Aug 5, 2014
longfeiWan9 pushed a commit to longfeiWan9/go-ipfs that referenced this pull request Nov 18, 2021
@aschmahmann aschmahmann mentioned this pull request Dec 1, 2021
80 tasks
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Feb 25, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Feb 25, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Mar 4, 2022
laurentsenta pushed a commit to laurentsenta/kubo that referenced this pull request Mar 4, 2022
ariescodescream pushed a commit to ariescodescream/go-ipfs that referenced this pull request Apr 7, 2022
Wait for all go routines to finish before function returns
Jorropo pushed a commit that referenced this pull request May 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants