Difference between revisions of "Metanet Protocol"
Jack Davies (talk | contribs) |
|||
(11 intermediate revisions by 5 users not shown) | |||
Line 1: | Line 1: | ||
[[File:Metanet_graph.png|thumb|A typical Metanet graph.]] | [[File:Metanet_graph.png|thumb|A typical Metanet graph.]] | ||
− | The '''Metanet Protocol''' is a layer-2 overlay protocol that defines a method for creating data structure over Bitcoin SV. The protocol utilises [[Metanet_Protocol#Node and Edge Structure|nodes and edges]] to specify | + | The '''Metanet Protocol''' is a layer-2 overlay protocol that defines a method for creating data structure over Bitcoin SV. The protocol utilises [[Metanet_Protocol#Node and Edge Structure|nodes and edges]] to specify directed acyclic graph (DAG) data structures on the Bitcoin SV ledger. The Metanet protocol can be used to construct diverse systems such as file systems, internet domains, ownership structures and code repositories. |
− | There are | + | There are tools available to write and read Metanet graphs, and a growing range of projects that use the Metanet protocol to structure their application data. |
==Node and Edge Structure== | ==Node and Edge Structure== | ||
− | The Metanet Protocol is a protocol for creating graph structures comprising nodes and edges on the | + | The Metanet Protocol (MNP) is a protocol for creating graph structures comprising nodes and edges on the ledger. In the Metanet protocol the following definitions of node and edge are used: |
* '''Metanet Node''' - A transaction using the Metanet protocol format. | * '''Metanet Node''' - A transaction using the Metanet protocol format. | ||
* '''Metanet Edge''' - An input signature linking two Metanet nodes. | * '''Metanet Edge''' - An input signature linking two Metanet nodes. | ||
− | A Metanet node is a transaction that conforms to the Metanet transaction format specified in [https:// | + | A Metanet node is a transaction that conforms to the Metanet transaction format specified in [https://www.bitcoinsv.io/files/metanet.pdf Metanet technical summary] document produced by nChain. The basic components of a Metanet transaction include a protocol flag, Metanet-specific data attributes, and any content data that is to be stored by a Metanet node transaction. |
− | The protocol flag is a 4-byte hexadecimal prefix that signifies that a transaction is using the format of the Metanet protocol. The hexadecimal value of the prefix was chosen to be the hexademical encoding 0x4d455441 of the string 'meta' by [https://twitter.com/BitcoinAssn/status/1136232235798016001?s=20 public poll] on June 5th 2019. | + | The protocol flag is a 4-byte [[hexadecimal]] prefix that signifies that a transaction is using the format of the Metanet protocol. The hexadecimal value of the prefix was chosen to be the hexademical encoding 0x4d455441 of the string 'meta' by [https://twitter.com/BitcoinAssn/status/1136232235798016001?s=20 public poll] on June 5th 2019. |
The Metanet-specific data attributes of a Metanet node transaction include the following: | The Metanet-specific data attributes of a Metanet node transaction include the following: | ||
Line 22: | Line 22: | ||
* '''<math>P_{parent}</math>''' - the public key defining a parent of the node. | * '''<math>P_{parent}</math>''' - the public key defining a parent of the node. | ||
* '''<math>SigP_{parent}</math>''' - a signature created using the private key associated with the public key defining a parent of the node. | * '''<math>SigP_{parent}</math>''' - a signature created using the private key associated with the public key defining a parent of the node. | ||
− | * '''<math>TxID_{parent}</math>''' - the unique transaction ID of the | + | * '''<math>TxID_{parent}</math>''' - the unique transaction ID of the parent of the node. |
The Metanet-specific data attributes listed above are used collectively to define a Metanet node and its position within a larger graph structure of multiple Metanet nodes, known as a ''Metanet graph''. | The Metanet-specific data attributes listed above are used collectively to define a Metanet node and its position within a larger graph structure of multiple Metanet nodes, known as a ''Metanet graph''. | ||
Line 37: | Line 37: | ||
In order to qualify as a Metanet-valid node, the transaction must also be signed by the public key corresponding to its parent '''<math>P_{parent}</math>'''. | In order to qualify as a Metanet-valid node, the transaction must also be signed by the public key corresponding to its parent '''<math>P_{parent}</math>'''. | ||
− | Any content data and its encoding can be included following these core Metanet attributes in the OP_FALSE OP_RETURN payload. The Metanet protocol does not specify the use of any one scheme for content data and additional attributes, and any | + | Any content data and its encoding can be included following these core Metanet attributes in the OP_FALSE OP_RETURN payload. The Metanet protocol does not specify the use of any one scheme for content data and additional attributes, and any valued usage of the Metanet protocol attributes above constitute a Metanet node transaction. |
A basic example of a Metanet node transaction that conforms to this format is shown in the diagram on the right. | A basic example of a Metanet node transaction that conforms to this format is shown in the diagram on the right. | ||
Line 43: | Line 43: | ||
The Metanet graph is formed by creating edges between parent Metanet nodes and child Metanet nodes. An edge is created between a parent and child by the creation and insertion of the signature '''<math>SigP_{parent}</math>''' in the child node, using the parent public key. [[File:Metanet_edge.png|thumb|The creation of a Metanet edge.]] | The Metanet graph is formed by creating edges between parent Metanet nodes and child Metanet nodes. An edge is created between a parent and child by the creation and insertion of the signature '''<math>SigP_{parent}</math>''' in the child node, using the parent public key. [[File:Metanet_edge.png|thumb|The creation of a Metanet edge.]] | ||
− | The fact that | + | The fact that this signature is in a transaction input means that the signature itself may be validated by Miners. This means that attempts to spoof a Metanet node can be mitigated either by validating the signature explicitly or by confirming that the node is spending an appropriate previous output. |
− | |||
== Rules of the Metanet Protocol== | == Rules of the Metanet Protocol== | ||
Line 57: | Line 56: | ||
The unique node identifier for a node is defined mathematically as '''<math>H(P_{node}||TxID_{node})</math>''', where '''<math>H()</math>''' is a cryptographic hash function. | The unique node identifier for a node is defined mathematically as '''<math>H(P_{node}||TxID_{node})</math>''', where '''<math>H()</math>''' is a cryptographic hash function. | ||
− | Metanet graph structures may be created using this base rule set alone. It is also possible to impose additional rules to Metanet graph structures | + | Metanet graph structures may be created using this base rule set alone. It is also possible to impose additional rules to Metanet graph structures to achieve different properties for data structures. |
− | A simple extension of the rule set is to impose the following | + | A simple extension of the rule set is to impose the following [[constraint]]s: |
[[File:Metanet_rules.png|thumb|A simple Metanet rule set.]] | [[File:Metanet_rules.png|thumb|A simple Metanet rule set.]] | ||
− | * The in-degree of a node should be 0 (no parent) or 1 (one parent). | + | * The [[in-degree]] of a node should be 0 (no parent) or 1 (one parent). |
− | * The out-degree of a node should be a free parameter. | + | * The [[out-degree]] of a node should be a free parameter. |
− | These additional rules allow domain-like structures to emerge as Metanet DAGs, which can be used to structure websites and file systems which inherit the | + | These additional rules allow domain-like structures to emerge as Metanet DAGs, which can be used to structure websites and file systems which inherit the permission structure of a Metanet graph. |
Latest revision as of 12:39, 27 July 2022
The Metanet Protocol is a layer-2 overlay protocol that defines a method for creating data structure over Bitcoin SV. The protocol utilises nodes and edges to specify directed acyclic graph (DAG) data structures on the Bitcoin SV ledger. The Metanet protocol can be used to construct diverse systems such as file systems, internet domains, ownership structures and code repositories.
There are tools available to write and read Metanet graphs, and a growing range of projects that use the Metanet protocol to structure their application data.
Node and Edge Structure
The Metanet Protocol (MNP) is a protocol for creating graph structures comprising nodes and edges on the ledger. In the Metanet protocol the following definitions of node and edge are used:
- Metanet Node - A transaction using the Metanet protocol format.
- Metanet Edge - An input signature linking two Metanet nodes.
A Metanet node is a transaction that conforms to the Metanet transaction format specified in Metanet technical summary document produced by nChain. The basic components of a Metanet transaction include a protocol flag, Metanet-specific data attributes, and any content data that is to be stored by a Metanet node transaction.
The protocol flag is a 4-byte hexadecimal prefix that signifies that a transaction is using the format of the Metanet protocol. The hexadecimal value of the prefix was chosen to be the hexademical encoding 0x4d455441 of the string 'meta' by public poll on June 5th 2019.
The Metanet-specific data attributes of a Metanet node transaction include the following:
- - the public key defining the node.
- - the unique transaction ID of the node.
- - the public key defining a parent of the node.
- - a signature created using the private key associated with the public key defining a parent of the node.
- - the unique transaction ID of the parent of the node.
The Metanet-specific data attributes listed above are used collectively to define a Metanet node and its position within a larger graph structure of multiple Metanet nodes, known as a Metanet graph.
It is possible that a node does not have any parents and such a node is termed a root node. A root node will have null values for any , , and attributes, and can therefore use a valid signature from any public key in its input(s).
A Metanet transaction is defined as a transaction that contains an OP_FALSE OP_RETURN payload containing:
- The Metanet flag
- A node public key
- A parent transaction ID (null if a root node).
In order to qualify as a Metanet-valid node, the transaction must also be signed by the public key corresponding to its parent .
Any content data and its encoding can be included following these core Metanet attributes in the OP_FALSE OP_RETURN payload. The Metanet protocol does not specify the use of any one scheme for content data and additional attributes, and any valued usage of the Metanet protocol attributes above constitute a Metanet node transaction.
A basic example of a Metanet node transaction that conforms to this format is shown in the diagram on the right.
The Metanet graph is formed by creating edges between parent Metanet nodes and child Metanet nodes. An edge is created between a parent and child by the creation and insertion of the signature in the child node, using the parent public key.
The fact that this signature is in a transaction input means that the signature itself may be validated by Miners. This means that attempts to spoof a Metanet node can be mitigated either by validating the signature explicitly or by confirming that the node is spending an appropriate previous output.
Rules of the Metanet Protocol
The Metanet protocol specifies a simple and extensible rule set for creating Metanet graphs and data structures. The base rule set is the following:
- Nodes are transactions.
- Edges are created by signatures.
- Each node is uniquely identified by the pair of attributes: , .
- Each node must specify the node ID of itself and its parent: , .
The unique node identifier for a node is defined mathematically as , where is a cryptographic hash function.
Metanet graph structures may be created using this base rule set alone. It is also possible to impose additional rules to Metanet graph structures to achieve different properties for data structures.
A simple extension of the rule set is to impose the following constraints:
- The in-degree of a node should be 0 (no parent) or 1 (one parent).
- The out-degree of a node should be a free parameter.
These additional rules allow domain-like structures to emerge as Metanet DAGs, which can be used to structure websites and file systems which inherit the permission structure of a Metanet graph.