Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
doc
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
nodes
common
doc
Commits
02bf452d
Commit
02bf452d
authored
6 years ago
by
Éloïs
Browse files
Options
Downloads
Patches
Plain Diff
[ref] rework human-readable format for peers & heads
parent
43ef56ba
No related branches found
No related tags found
1 merge request
!8
WIP: WS2P v2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
rfc/0006_ws2p_v2.md
+10
-6
10 additions, 6 deletions
rfc/0006_ws2p_v2.md
with
10 additions
and
6 deletions
rfc/0006_ws2p_v2.md
+
10
−
6
View file @
02bf452d
...
@@ -393,15 +393,17 @@ Signed document declaring all the endpoints of a peer.
...
@@ -393,15 +393,17 @@ Signed document declaring all the endpoints of a peer.
The document is represented by an array of bytes containing (peer_card_size + 2) bytes.
The document is represented by an array of bytes containing (peer_card_size + 2) bytes.
to sign the document it is necessary to calculate the hash sha256 of this bytes array then to sign the hash obtained with the issuer's private key.
to sign the document it is necessary to calculate the hash sha256 of this bytes array then to sign the hash obtained with the issuer's private key.
### Peer card BMA JSON format
### Peer card JSON format
This human-readable format will be used by all APIs that wish to provide peer cards in a human-readable format. For example, Client APIs.
{
{
"version": Number(VERSION),
"version": Number(VERSION),
"currency": Number(CURRENCY_CODE),
"currency": Number(CURRENCY_CODE),
"node_id": String(NODE_ID in base16),
"node_id": String(NODE_ID in base16),
"algorithm":
Number(ALGORITHM),
"algorithm":
String(name of pubkey/sig algorithm)
"pubkey": String(ISSUER_PUBLIC_KEY in base58),
"pubkey": String(ISSUER_PUBLIC_KEY in base58),
"block": String(BLOCK_NUMBER ++ "-" ++ BLOCK_HASH in base16),
"block
stamp
": String(BLOCK_NUMBER ++ "-" ++ BLOCK_HASH in base16),
"endpoinds": Array([
"endpoinds": Array([
String(ENDPOINT_1 in endpoint utf8 format),
String(ENDPOINT_1 in endpoint utf8 format),
String(ENDPOINT_2 in endpoint utf8 format),
String(ENDPOINT_2 in endpoint utf8 format),
...
@@ -416,9 +418,9 @@ Example :
...
@@ -416,9 +418,9 @@ Example :
"version": 11,
"version": 11,
"currency": 1,
"currency": 1,
"node_id": "15af24db",
"node_id": "15af24db",
"algorithm":
1
,
"algorithm":
"Ed25519"
,
"pubkey": "D9D2zaJoWYWveii1JRYLVK3J4Z7ZH3QczoKrnQeiM6mx"
"pubkey": "D9D2zaJoWYWveii1JRYLVK3J4Z7ZH3QczoKrnQeiM6mx"
"block": "128310-000002A569DCEED62227CAC0ABDFE6B2647B21B3193A40398CD12BC2A95C24D9",
"block
stamp
": "128310-000002A569DCEED62227CAC0ABDFE6B2647B21B3193A40398CD12BC2A95C24D9",
"endpoinds": [
"endpoinds": [
"WS2P 2 1 TLS 3 DEF LOW ABF 443 g1.durs.info ws2p"
"WS2P 2 1 TLS 3 DEF LOW ABF 443 g1.durs.info ws2p"
],
],
...
@@ -771,13 +773,15 @@ step := Number of head rebounds (unsigned field).
...
@@ -771,13 +773,15 @@ step := Number of head rebounds (unsigned field).
#### HEAD v3 JSON format
#### HEAD v3 JSON format
This human-readable format will be used by all APIs that wish to provide HEADs v3 in a human-readable format. For example, Client APIs.
{
{
"api_outgoing_conf": Number,
"api_outgoing_conf": Number,
"api_incoming_conf": Number,
"api_incoming_conf": Number,
"free_mirror_rooms": Number,
"free_mirror_rooms": Number,
"low_priority_rooms": Number,
"low_priority_rooms": Number,
"node_id": Number,
"node_id": Number,
"algorithm":
Number(
pubkey
.
algorithm)
"algorithm":
String(name of
pubkey
/sig
algorithm)
"pubkey": String(pubkey.pubkey_content in base58),
"pubkey": String(pubkey.pubkey_content in base58),
"blockstamp": String(BlockId-BlockHash in base16),
"blockstamp": String(BlockId-BlockHash in base16),
"software_name": String,
"software_name": String,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment