Tritanium Hybird Architecture for Product Traceability

Tritanium Hybird Architecture for Product Traceability

Tritanium Labs

The Tritanium Traceability Blockchain is a public blockchain implementation of the traceability blockchain defined in the whitepaper “Foundations of the Traceability Blockchain”. The Tritanium blockchain is a hybrid blockchain supported by TTNZ coin and protected by miners using the Cryptonote-V7Lite algorithm. The Tritanium Traceability Blockchain achieves the benefits of a system capable of creating full end-to-end traceability necessary for product manufacturing and distribution with the protection of a public blockchain using Cryptonote technologies.

Non-monetary assets (NMAs) are defined as any asset that is tracked in the blockchain that is not a coin. NMAs tracked using the principles of the traceability blockchain are embedded into transactions protected by the Tritanium blockchain. Each transaction that transfers or transforms an asset is represented by a non-monetary asset block that is hashed into a Tritanium transaction and represented by a side-chain. A side chain is one or more blocks that are anchored to the main blockchain using cryptography. Since each side chain is hashed and embedded into transaction on the main chain, the side chain cannot be altered without chaining transactions on the main chain. Each side chain block only assets that were modified by a single transaction providing a link between public transaction and side chain blocks.

The fee companies pay to store traceability data on the blockchain is paid using the TTNZ coin that is transferred as part of the process initiating the transaction. A portion of the fee paid by each company for creating traceability transactions goes to the miners validating transactions and a portion is paid to operators of the master nodes supporting the API.

Public Blockchain Address vs. Physical Blockchain Address

Public Blockchain Address vs. Physical Blockchain Address

The public blockchain address is the address recognized by the Tritanium platform for currency transaction. The public blockchain address is generated using the public/private key algorithm supported by the public blockchain platform.

Companies using the Tritanium blockchain for traceability may interface with the blockchain directly or interface using a service provider that integrates the blockchain into a larger application. If a company interfaces with the blockchain directly, they must maintain their own public blockchain address to create transactions and pay transaction fees. This requires the company to support their own Tritanium RPC wallet to create transactions. If a company is use a service provider, the service provider may interface with the blockchain using a single public address to support multiple physical blockchain addresses.

A physical blockchain address is the blockchain representation of a physical address where product is located while it is tracked. A company may have multiple physical blockchain addresses if it has multiple locations where products are manufactured, stored, or shipped.

A physical blockchain address is created using the hash function:

A(longitude, latitude, [GLN])

The function outputs a 32 byte (64 character) identifier that represents the physical blockchain address. The optional GLN parameter represents the GS1 Global Location Number and is used when two or more companies share a physical location. The function allows traceability application users to calculate blockchain address representing where they ship and receive products without the necessity to communicate blockchain addresses.

Representation of a Non-Monetary Asset

Representation of a Non-Monetary Asset

The requirement for tracking non-monetary assets usually requires a product to be traceable by item and lot-number. If an item is represented by serial numbers instead of lot-numbers, the serial number replaces the lot-number for traceability indentification. Each non-monetary is identified by an asset identifier calculated using a hash function:

F(asset_type,asset_code,address)

In most industries asset_type and asset_code follow the standards created by GS1. GS1 is a non-profit organization that defines the worldwide numbering standards for products in many different industries. The Global Trade Identification Number (GTIN) is the number used to define items. GTIN is a 14 digit identifier that provides the asset type value. Asset code is the lot number of the batch of inventory or serial number for individually tracked products. The address variable is the blockchain address representing the location manufacturing, shipping, or receiving the product. The function returns a 32 byte (64 character) identifier.

Structure of a Non-Monetary Asset

Structure of a Non-Monetary Asset

Each non-monetary asset is uniquely identified by an asset identifier calculated from an asset type, asset code, and address. The asset must also maintain a list of inputs used to create the asset and a list of outputs where the asset was used. The data structure includes the following:

Address32 Byte blockchain address of the owner of the asset.Passed as a parameter from the application shipping, receiving, or transforming the asset.
Asset ID32 Byte unique identifier of the asset.Calculated from Address, Asset Type, and Asset Code.
Asset TypeVariable length (usually 14 digits) identifier of the item.Passed as a parameter from the application. Usually the GTIN.
Asset CodeVariable length identifier of the lot number or serial number of the item.Passed as a parameter from the application.
DataVariable length optional data stored in a JSON object.Optional data passed from the application.
InputsArray of 32 Byte Asset IdentifiersArray of other assets that are inputs to the asset.
OutputsArray of 32 Byte Asset IdentifiersArray of other assets that are outputs of the asset.

Physical Architecture of the Tritanium Traceability Blockchain

Physical Architecture of the Tritanium Traceability Blockchain

The physical architecture of the blockchain contains blocks validated by miners using the CryptoNight-V7 algorithm. Each block is cryptographically linked to the prior block and contains an undefined number of transactions. A block may contain a single transaction or hundreds of transactions depending on the timing of when transactions were created.

Transactions involving non-monetary assets and traceability contain metadata and a hash linking to a side-chain block that contains data related to the assets involved in the transaction. Since the size of a transaction increases the amount of processing power required to mine blocks, side chains blocks are not involved in the proof of work transaction.

Side Chain Blocks

Side Chain Blocks

Adding non-monetary asset data transactions on the main chain directly affects the effort required by miners to validate blocks. In order to maintain an efficient network, side chain blocks are hashed into transaction using a block hash and meta-data. The data added to transactions includes,

  • A list of Physical Blockchain Addresses that have assets affected by the transaction.
  • A sha-256 hash of the side chain block.

The link to the side chain block is 106 bytes per transaction which has a nominal effect on effort required to perform the proof-of-work algorithm. Side chain blocks are replicated to each master node and can be downloaded to side-chain wallets of each participant of the transactions.

The identifier of the site chain block is the transaction identifier of the transaction on the main chain. This provides a two-way link between the main chain and the side chain. The side chain block is a base 64 representation of a JSON array:

{"address":" public address of account creating transaction ", "timestamp":12938129381293812, "assets":[ {asset object},{asset object},{asset object} ] }

Side Chain Wallets / Smart Wallets

Side Chain Wallets / Smart Wallets

Side-chain wallets are used by traceability users to process blocks and transactions related to physical addresses. Side-chain wallets are based on the Tritanium RPC wallet that includes the cryptographic elements required to form transactions and read blocks on the main chain. Side chain wallets are used to:

  • Create side chain blocks.
  • Create transactions that hash side chain blocks to the main chain and pay transaction fees to the network.
  • Scan the blockchain searching for transaction that a physical address is a participant and download and read a side chain.

Side chain wallets are developed using the Tritanium-Izzy API. The Food Ledger Application created by txtSchedules LLC provides an example side chain wallet designed for food processing and distribution.

Block Representation of a Transaction

Each transaction results in a set of assets that were either input assets and have a new state, or an output asset that was either created, or changed by the asset. All output assets that are created by a transaction are stored in a side-chain block that is hashed into the Tritanium main chain. The side chain block contains:

  • A timestamp representing when the block was created.
  • An array of physical addresses that participated in the transaction. (1 or 2 addresses)
  • An array of asset states that are result of the transaction.
    • Address
    • Asset Identifier
    • Asset Type
    • Asset Code
    • Optional Data
    • Array of Input Assets
    • Array of Output Assets

The resulting block is stored as a base 64 binary representation of the data.

Non-Monetary Asset Key/Value Store

Non-Monetary Asset Key/Value Store

A key value store is an indexed data structure that contains two values, the key used the find the record, and the value that is returned when the key is searched. Key value stores are used widely in blockchain wallets and are used by the Tritanium Traceability Blockchain to efficiently find the location of non-monetary assets in the blockchain.

The location of an asset on the blockchain is the transaction where the asset was last used. The key value store maintains the latest transaction for each asset and the block where each transaction is location.

Reading an asset from the blockchain requires three steps:

1: Search the KVS using the Asset ID to return the latest transaction for the asset.
2: Search the KVS using the transaction ID from step 1 to return the side chain block where the transaction is stored.
3: Read the asset from the side chain block.

Non-Monetary Asset Transfer Process

Non-Monetary Asset Transfer Process

The transfer of an asset from one owner affects two assets.

Step 1: Calculate Asset Identifier for Sender and Receiver.
Step 2: Query Current State of both assets.
Step 3: Add new output identifier to Sender Asset.
Step 4: Create receiver asset if it does not exist and add sender asset to the input list.
Step 5: Form the block containing transaction and assets.
Step 6: Hash the block using SHA-256.
Step 7: Create the TTNZ transaction using storing the hash from Step 6 inside the TTNZ transaction.
Step 8: Identify the side chain block using the TTNZ transaction identifier.
Step 9: Update the Key/Value store with new Asset, Transaction, and Block information.