Proof-of-AI in blockchain technology

Background

Blockchain technology is based on a distributed ledger system allowing secure, transparent, and tamper-proof transactions recorded as blocks. Each block contains a hash of the previous block, a timestamp, and transaction data. Hence, the blocks form a chain, as each block depends on the previous block.

One feature of blockchain technology is that no centralized authority determines the validity of transactions and adds them to the blockchain; instead, a consensus mechanism is required by which nodes in a blockchain network add blocks to the blockchain. The consensus mechanism should be resistant to spoofing, in which a bad actor seeks to add blocks containing fraudulent or inaccurate information.

In conventional blockchain technology, one type of consensus mechanism is Proof of Work (PoW) in which appending entities must expend significant computational effort to add blocks to the blockchain. One example of a PoW mechanism is the mining process, using, for example, Bitcoin, in which miners compete to mine tokens (e.g., cryptocurrency) and append blocks. By design, this type of consensus mechanism demands computational power and is, therefore, wasteful of energy.

Another type of conventional consensus mechanism is Proof of Stake (PoS), in which appending entities must hold a minimum number of blockchain tokens to add blocks to the blockchain. PoS is less energy-intensive than PoW but can lead to centralization in which a few entities holding many tokens come to control the network. PoS is also vulnerable to attack because of the low computational cost of spoofing.

Introducing Proof-of-AI (PoAI)

An alternative solution to common consensus mechanisms is a novel patent-pending consensus mechanism known as Proof-of-AI (PoAI), invented by Jonathan MacDonald. This document introduces the PoAI concept and describes the invention.

At its core, every part of PoAI drives efficiency by removing human interference and establishing the objective of the AI to fulfil its task in the most useful way. This is distinctly opposite to PoW (which is inefficient due to the mechanical computing involved) and PoS (which is increasingly centralized and therefore increasingly inefficient).

PoAI is based on the work of the following three algorithms that carry out their work independently, enabling blockchain consensus to be achieved.


An overview of the PoAI architecture is shown here:

Proof of AI (PoAI) blockchain consensus mechanism

AI-Block Builder Algorithm

Block builders are full blockchain nodes that store ready-made blocks of the blockchain and participate in forming and packaging new blocks. The block builder's basis is a Machine Learning (ML) model, which has the initial, specified parameters of the methodology for forming effective blocks from existing mempool transactions.

The model can also learn and improve the efficiency of its work in selecting transactions. The block builder considers transactions from the mempool for the block in the following priority (n - number of transactions in the block):

  1. Highest price (>0.2n transactions)
  2. Lowest price (>0.2n transactions) - to compensate highest prices
  3. Average price (>0.5n)
  4. Oldest transactions (>0.1n)


One essential aspect of PoAI is making transactions optimized for affordability. This is why the block builder packs the blocks as much as possible and why the blockchain includes a halving algorithm that drives the reliance on transaction efficiency. Due to the dynamic nature of PoAI, the mechanism can sense and respond to attack vectors and attempts at manipulation and adjust accordingly to mitigate threats.

Each block requires a certain volume of Points to be created (this is known as the PointPrice). The goal is to align the number of points for each block with the number of coins generated. For example, 1 point equals 0.001 coins. If the block requires a PointPrice of 10,000, the blockchain generates 10 new coins. When the blockchain reaches a certain amount of total PointPrice spent (for example, 30,000,000,000 points), each point becomes equal to 0.0005 coins. After reaching the second milestone (for example, 60,000,000,000), each point equals 0.00025 coins.

An effective block is any block assembled so that the average PointPrice is close to the actual PointPrice. It includes transactions with the maximum useful information that can be entered into the block. For clarification, ‘useful informationʼ is PointData (the volume of Points). The goal is for the maximum amount of PointData to be included. A limited number of transactions with a higher-than-average PointPrice should reduce the number of users in the system who set a high PointPrice but still favor and compensate them with a limited number of transactions with a low PointPrice. Most of the average PointPrice transactions will be validated, incentivising users not to set high PointPrices.

In contrast, other networks choose the highest gas fees, leading to a negative user experience. The alternative version provided by PoAI is illustrated below, where the vertical axis is the PointPrice, and the horizontal is the data length. The center of the target is the chosen price by the algorithm:

Proof of AI (PoAI) blockchain consensus mechanism

The effectiveness of the ML model depends on the server's technical resources and the frequency of block assembly. A block builder's ML model is trained based on its work in selecting transactions for a block, comparing its results with those of other block builders, and the final voting result, which determines whose block will be sent to the chain.

The more often a block builder forms a block, and the more mempool transactions it manages to sort through during the assembly of a new block, the more efficient the block is and the greater the chance that this particular block will be chosen for inclusion in the chain at the next stage. After the generation of the current block is completed and entered into the chain, a timer is started to assemble a new block. During the timer, all block builders are sorting through mempool transactions and selecting the best transactions to form a block. At the end of the timer, all block builders put their blocks forward to a voting process. The voting application includes the following information:

The below figure illustrates how PoAI selects which block builders can participate in the round:

Proof of AI (PoAI) blockchain consensus mechanism

Voting Algorithm

The PoAI mechanism organises voting and cannot directly influence its results or participate in voting. It will have an identical ML model internally to that of the block builder and generate its own version of the block with each new round of assembly.

PoAI and block builders review transactions from the mempool and build an efficient block for the round. The block generated by PoAI is considered as the reference block and is compared with the blocks generated by the builders. If the newly generated block is more efficient than the current reference block, it becomes the new reference block.

Proof of AI (PoAI) blockchain consensus mechanism

PoAI removes block builders who have successfully submitted blocks to the chain during the last N-block period from the voting list. Implementing such a timeout allows all block builders to receive a reward for assembling a block and reduces the risk of unfair assemblies from one of the participants. The PoAI mechanism participates in all block assemblies from the very beginning of the chain. It will also have information about all voting results, and the block collected by the PoAI mechanism will be considered the reference block.

The chosen reference block is vital and ensures that, despite users' choices, manipulating the mechanism is improbable, as it removes manual interference. For each block builder admitted to voting, the PoAI mechanism will check the accuracy of the efficiency coefficient based on the percentage of the block filled with useful information, assess its quality, comparing it with its reference block.

The coefficient is the numeric value based on the efficiency (Input minus Output) of the amount of block creation. So, two objectives are required:

If the useful efficiency coefficient is higher than that of the reference block, the PoAI mechanism will give such a block builder the highest score and, after double-checking, consider its block the reference block for the current round of assembly. Block quality is an additional parameter, not the main one for voting, but one that the AI-validator model algorithm can use when making a decision.

AI-Validator Algorithm

AI validators are lite blockchain nodes that store network wallet addresses and color markers. Color markers are a key part of validation and connecting a block to the blockchain:

Lite nodes can also send and receive transactions to power the blockchain wallet application. For a wallet address to become an AI validator, it must satisfy the following conditions:

The figure below illustrates how PoAI determines which validators are eligible to vote in the round:

Proof of AI (PoAI) blockchain consensus mechanism

Validation Process

AI validators participate in every vote to determine the block builder with each new round of block assembly. The AI validator votes independently, without user intervention, in the background. The AI validator's artificial intelligence model is being trained based on the results of previous voting and analysis of the participants' block builders' parameters, as well as the requested manual votes of the AI validator's owner.

Validators admitted to the voting process select the block for the round as illustrated below:

Proof of AI (PoAI) blockchain consensus mechanism

After the voting is completed and the winning block builder is determined, the PoAI mechanism selects one from the active AI validators. The validators additionally double-check the collected block before placing it on the blockchain. The AI validator for color-marker validation of block transactions is selected according to the following parameters:

Among the validators who voted, one validator is randomly selected from those who did not vote for the block that won the round. This validator will use color validation to check all transactions in the block.

Proof of AI (PoAI) blockchain consensus mechanism

Based on the formula for calculating the random value, the serial number of the AI validator is determined from the list of voters, which will perform color-marker validation of block transactions. The following image illustrates these concepts.

Proof of AI (PoAI) blockchain consensus mechanism

The Incentive

The reward for participation is generated as a native coin, earned by helping to assemble a new block among participants in the consensus process. An example reward distribution is as follows:

These percentages can be revised to reflect each consensus participant's labor costs and contribution to its implementation. The example above is illustrated below:

Proof of AI (PoAI) blockchain consensus mechanism
© Jonathan MacDonald | 12th April 2024