Metanet Protocol

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 nodes and edges to specify directed acyclic graph (DAG) data structures on the Bitcoin SV blockchain. The Metanet protocol can be used to replicate file systems, internet domains, ownership structures and code repositories on the blockchain.

There are tools available to write and read Metanet graphs, and a growing a range of projects that use the Metanet protocol to structure their application data.

Node and Edge Structure

The Metanet Protocol is a protocol for creating graph structures comprising nodes and edges on the blockchain. In the Metanet protocol the following definitions of node and edge are used:

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:

  • {\displaystyle P_{node}} – the public key defining the node.
  • {\displaystyle TxID_{node}} – the unique transaction ID of the node.
  • {\displaystyle P_{parent}} – the public key defining a parent of the node.
  • {\displaystyle SigP_{parent}} – a signature created using the private key associated with the public key defining a parent of the node.
  • {\displaystyle TxID_{parent}} – the unique transaction ID of the a 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 {\displaystyle P_{parent}}{\displaystyle SigP_{parent}}, and {\displaystyle TxID_{parent}} 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:

A Metanet node transaction.

  • A node public key {\displaystyle P_{node}}
  • A parent transaction ID {\displaystyle TxID_{parent}} (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 {\displaystyle P_{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 {\displaystyle SigP_{parent}} in the child node, using the parent public key.

The creation of a Metanet edge.

The fact that the appearance of this signature is in a transaction input means that the signature itself is validated by miners. This means that only valid Metanet child nodes can appear on the blockchain, and any spoofing attempts will be considered invalid.

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: {\displaystyle P_{node}}{\displaystyle TxID_{node}}.
  • Each node must specify the node ID of itself and its parent: {\displaystyle ID_{node}}{\displaystyle ID_{parent}}.

The unique node identifier for a node is defined mathematically as {\displaystyle H(P_{node}||TxID_{node})}, where {\displaystyle H()} 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 in order to achieve different properties for data structures.

A simple extension of the rule set is to impose the following constraints:

A simple Metanet rule set.

https://wiki.bitcoinsv.io/index.php/Metanet_Protocol

« Back to Glossary Index

Written by Ramon Quesada

Passionate about Blockchain & Bitcoin technology since 2013, Co- Founder of https://avalbit.org, Team Manager in the CoinTelegraph Spain franchise (2016-2017 years) Co. Organizer of the Blockchain Boot camp Valencia 2018, Co. Organizer of the mini Hackathon BitcoinSV Barcelona, in August 2019, current coordinator of the BSV Valencia Meetup. https://telegra.ph/Ramon-Quesada---Links-01-10

Merchant API

MinerID