Payments
Crypto
Cryptocurrency

How a Radius Transaction Works

Understanding the parallelization of the Radius system

Intro

A transaction processor, whether a conventional blockchain or the Radius platform, is responsible for handling a user’s request and making the appropriate updates to the data stored on the network, that is, updating the network’s state. While Radius employs some of the technical concepts used by conventional blockchains, Radius takes a unique approach which enables linear horizontal scalability and exceptionally low transaction costs. In this article, we will review the flow of a conventional blockchain transaction, then explore how transactions are executed on the Radius platform, and ultimately discuss the capabilities this design unlocks.

Reviewing Conventional Blockchains

Consider typical steps for transaction processing involved in a conventional blockchain:

  • Creation
    To initiate the transaction process, a user constructs a transaction. For a payment transaction, this would involve the sending/receiving addresses, the asset, and the amount being sent. To authorize the transaction, the user cryptographically signs the transaction using the private key stored in their wallet.
  • Transaction Submission
    The user then sends this transaction to one or more nodes responsible for verifying transactions, known as “broadcasting” the transaction. The pending transaction is stored in a “mempool” where it remains in a pending state until selected for inclusion in a block.
  • Block Creation and Proposal
    Via the blockchain’s consensus process, one validator node is selected to construct a block consisting of multiple transactions. For a transaction to be executed, it must be selected by a node and included in a block. This node executes all of the transactions in the block against its own local copy of the blockchain’s state and then forwards the block to other nodes in the network.
  • Validation
    While details vary based on the consensus mechanism used, other nodes, which each have a full copy of the network’s state, receive the block from the block proposer and execute all transactions included in the block against their own copy of the network’s state.
    When a transaction is included in a block and validated by a sufficient number of nodes, the transaction is complete.

The block creation and validation processes then continue for subsequent blocks. For conventional blockchains, one block is produced at a time no matter how many nodes are in a network, and each node is responsible for executing every transaction. The chain of blocks determines the order of each transaction in the network, and each block proposer determines the order of transactions within a block. Block proposers and validators receive rewards according to the blockchain protocol for performing these functions.

Radius Transaction Flow

Creation

To initiate a transaction, similar to a conventional blockchain, a user constructs a proposed transaction and signs it with their private key to authorize the transaction. In this example, let’s say that Alice is sending 10 USDx tokens to Bob.

Transaction Submission

Alice submits her transaction to the Radius platform where it is received by a component of the system called an agent. Radius agents are responsible for handling transaction execution, and numerous agents can operate simultaneously in parallel.

Preparation for Execution

The agent responsible for handling the particular transaction determines which parts of the system state are involved in the transaction.

  • Radius system state is stored as a key-value store across multiple data partitions with each partition being geographically distributed.
  • The key is the location of a particular piece of data in the system state, and the value is the data associated with the key.

After the agent determines which key will be impacted, it locks applicable keys in real-time to prepare the transaction’s execution. Keys may be located on the same partition or on separate partitions; this has no impact on the transaction flow. This locking mechanism ensures that no other transactions modify the values in the middle of transaction execution. In this example, Alice’s USDx balance and Bob’s USDx balance will be changed by the transaction, so the agent attempts to lock the key associated with Alice’s USDx balance and the key associated with Bob’s USDx balance in the database.

An agent cannot process a transaction until it receives confirmation from each applicable partition that it has locked all applicable keys, so if a key is currently locked by an earlier transaction, the transaction must wait until the key becomes unlocked to proceed.

Execution

Once the agent is informed that all applicable keys have been locked, it initiates a two-phase commit (2PC) process to execute the transaction. The 2PC process ensures that transactions are processed atomically. Either all keys are updated (that is, the transaction is processed), or none of the keys are updated (that is, the transaction is not processed). There are no partially executed transactions. In our example, 10 USDx is simultaneously subtracted from Alice’s balance and added to Bob’s balance.

When the partitions commit the changes to the relevant portions of state, the transaction is immediately final. Locks are removed from the keys involved in the transaction, freeing them up to be used in another transaction. Duration depends on the complexity of the transaction, but for many types of transactions including simple asset transfers, this whole process usually occurs well within two seconds.

Diagram of a Radius transaction flow

The Radius Difference

Certain key features of the Radius design differentiate it from conventional blockchains and enable throughput of over 2 million transactions per second at extremely low costs of 1/100,000 of a cent.

First, our platform does not materialize a global order for every transaction in the network. Unlike a conventional blockchain where every transaction proceeds through a non-parallelizable consensus mechanism, Radius maintains a fleet of agents operating simultaneously which each handle separate transactions. As long as transactions do not require conflicting locks for the same key, they can be executed in parallel by different agents.

Second, as opposed to conventional blockchains which update state at certain discrete intervals (that is, when each new block is added to the chain), the Radius locking mechanism allows agents to immediately access and lock data required to complete the transaction as long as there is no conflicting transaction in-process. This means that agents have a real-time view of the liveness of the platform’s data and can immediately begin processing a transaction without waiting for a particular blocktime. Selectively locking only the data relevant to the transaction also supports Radius’ parallel execution.

Crucially, these design choices give Radius its massive scalability at extremely low-cost.

Since transactions are processed in parallel, bringing additional agents and data partitions online gives the platform greater throughput for non-conflicting transactions. In benchmarking, Radius has demonstrated throughput of 2.8 million payment transactions per second in a geographically distributed system configuration which scales linearly with additional hardware. To-date, Radius has not identified an architectural bottleneck which would prevent the platform from even further scaling.

In addition, Radius’ parallel execution results in extremely low cost. Unlike conventional blockchains where full nodes store a full copy of the chain’s state and execute every transaction, Radius state is spread across multiple data partitions geographically distributed via Raft consensus, and execution is spread across a fleet of agents. This division of labor reduces redundancy, making transaction execution and data storage much cheaper. In testing, the Radius platform can process simple payment transactions for $0.0000001, or 1/100,000 of a cent.

Rethinking the Chain of Blocks

Conventional designs assume the need for a chain of blocks that organize all transactions into a single global order. However, when this assumption is removed, new low-cost, massively scalable system designs inspired by traditional distributed computing become possible.

At Radius, we are rethinking conventional blockchains to create the next generation of scalable, efficient and reliable onchain infrastructure.

Contact us to learn more and get started with Radius.