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

Node Manifests #116

Merged
merged 8 commits into from
Jan 13, 2017
Merged

Node Manifests #116

merged 8 commits into from
Jan 13, 2017

Conversation

vyzo
Copy link
Contributor

@vyzo vyzo commented Jan 10, 2017

Adds support for manifests in mcnode [#14] [#99]

Protocol:

  • /mediachain/node/manifest protocol for peer manifest retrieval
  • include manifests in RegisterPeer

API:

  • /manifest api for getting/setting the node manifests
  • /manifest/self api for producing a node manifest body for signing with mcid
  • /manifest/{peerId} for retrieving peer manifests

Follow-up: Process manifests in mcdir and provide query interface

Example:

# Create and sign a manifest for our node
$ curl -s http://localhost:9002/manifest/self > /tmp/mf.json
$ mcid sign blockstack:vyzobot.id /tmp/mf.json > /tmp/smf.json
Enter passphrase: 

# Set the node manifests; accepts a list in ndjson
$ curl --data-binary @/tmp/smf.json http://localhost:9002/manifest
OK

# Get the node manifests
$ curl http://localhost:9002/manifest
{"entity":"blockstack:vyzobot.id","keyId":"Qmcvnd3Jn41DwSjaZcVXpTpX873czeSAAf3PcyyULdvFZc","body":{"node":{"peer":"QmeBkfxcaBfA9pvzivRwhF2PM7sXpp4HHQbp7jfTkRCWEa","publisher":"4XTTMADSKQUN3jkeZngbtuE35w9y5YnDTicVTeeji7N2Npkey"}},"timestamp":"1484079198","signature":"S+7EYCqiguyhT2oQf2BW6cRLR8xyBXb3tVqQBlSswDJQQs54gH1zEs6xBKHLqDhQzADSkAUFjBLkKQLDaNOBAg=="}

# Get manifests from a remote peer
$ curl http://127.0.0.1:9002/manifest/QmSbgwkKxtrBFDoGGwoKqH7soYiL64xpMK5oEYdiRnQGJp
{"entity":"blockstack:vyzobot.id","keyId":"Qmcvnd3Jn41DwSjaZcVXpTpX873czeSAAf3PcyyULdvFZc","body":{"node":{"peer":"QmSbgwkKxtrBFDoGGwoKqH7soYiL64xpMK5oEYdiRnQGJp","publisher":"4XTTMGkYEx5trQX5VV32S82gguRMtVFQL5UDnZNHzyNEHKBeZ"}},"timestamp":"1484151436","signature":"DLGU4cQtvv+2pOgDkwjocZgC66E9d5ckbdYRSFzt6Xdm4sN5Vuz0ZnbtGzAXZoh47QrDZCQS9YR4MWaR6momBA=="}

@vyzo vyzo changed the title Node Manifests [WIP] Node Manifests Jan 13, 2017
@vyzo vyzo merged commit 4ca49f8 into master Jan 13, 2017
@vyzo vyzo deleted the vyzo-manifests branch January 13, 2017 15:38
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.

None yet

2 participants