Numbers Protocol


In Numbers Protocol, "Commits" serve as a mechanism for tracking the evolution of a digital asset throughout its lifecycle. Similar to the design of Git, a widely-used version control system, Commits in Numbers Protocol allows developers to easily monitor changes made to Web3 assets and view their full history.
When a commit is created, it serves as a historical record of a specific alteration made to an asset, including information such as the updated assetTree file, the action performed, and the identity of the person who made the change. These changes may include modifications to the asset's metadata, the addition of new files, or any other type of update. By reviewing the commit logs, users can access important information about an asset, such as the date and time of the change, the user who made the change, and a detailed description of the change, allowing for full transparency and traceability.
Graph of Asset commit history

What is in a Commit?

A Commit includes
  • One immutable on-chain message and
  • An AssetTree pinned on IPFS
Creating a commit allows for the association of metadata with the asset and the ability to track the entire history of the asset.
It should be noted that the original asset, such as an image or video, is NOT stored on the blockchain, but is converted to a Nid and kept on IPFS. This allows for efficient storage and fast retrieval of the asset, while still maintaining a tamper-proof history of the asset on the blockchain.
The process of viewing this history is straightforward:
  • First, by querying the asset's Nid, which serves as a unique identity
  • By locating and viewing the associated Commits to see the changes made
  • Check AssetTree files linked to the Commits and finds changes of the assets over time.
By having a clear and transparent record of all modifications, changes, and other related activities, it is possible to understand the context of an asset and make informed decisions about its value and use.

Specification for Commit log:

  • assetCid: (string) The Nid of the asset file
  • assetTreeCid: (string) The Nid of the AssetTree file.
  • assetTreeSignature (signature): The EIP-191 signature signed by the asset's author.
  • committer: (string) The wallet address which sends the transaction.
  • abstract: (string) Commit message. This should describe the purpose of the commit and is different from the abstract in the AssetTree.
  • author: (string, optional) The wallet address of the person who writes the commit.
  • action: (string) The Cid/Nid of the IPFS file which describes the action been performed to the asset.
  • actionResult: (string, optional) The result URI of the performed action.
  • assetTreeSha256: (string, optional) The sha256sum of the AssetTree file.
  • provider: (string, optional) The Cid/Nid of the IPFS file which describe the information of the service provider.
  • attachment: (string, optional) The Cid/Nid of the attachment file.
The DBDiagram describes the relationship between Commit and AssetTree tables. More tools to create and read commits can be found on the Developer pages. You may also refer to the nit open-source project for more examples of how to create AssetTree and Commit.
  • The goal of the Commit is to ensure the integrity of the raw asset and its derivatives, such as metadata, and possibly the major asset.
  • One asset can have multiple commits and all of those commits will be tracked here. It will include the details of the asset tree file and the metadata, who created and registered this asset