Mined hash X1 injection
Last updated
Last updated
XenBlocks utilizes the X1 compressed rollup technology, allowing hashes to be bundled and integrated into the X1 Blockchain. This on-chain inscription of hashes via rollups leverages Layer 2 (L2) technology, the same used for ordinals and inscriptions. This process is fast, cost-effective, and enables highly efficient data verification.
The process is executed on a sequencer node, where inscribed data—compressed hashes—each receive a unique hash. The method involves organizing all hashes, creating a collective fingerprint, compressing the data using zlib, and then incorporating it into X1. Following this, network nodes undertake a verification process, reassessing the hashes to confirm their accuracy by casting votes for their correctness. After this validation, the network enables mints for XNM, ensuring that only verified transactions contribute to the cryptocurrency's circulation.
For every XenBlock discovered, a hash is generated and then aggregated into a virtual block through a roll-up process. This involves compressing the data before inscribing it onto the X1 blockchain. Sequencers associated with each node have the authority to write to the chain. Miners communicate with the sequencers of other nodes, sending a notification that a sealed block is available. This requires other nodes to download, unpack, verify the block, and then vote on its validity.
Approximately every 10 minutes, the system bundles about 600 hashes into a roll-up, aligning with the target block production rate of 60 blocks (hence 60 hashes) per minute. Over a 10-minute span, this equates to generating 600 hashes. Thanks to compression, these hashes occupy minimal gas and storage, allowing the entire operation to be completed in just 10 milliseconds. This efficiency translates to processing each hash in microseconds, specifically 1.7 milliseconds per hash (1000 milliseconds divided by 600), demonstrating the system's efficiency in handling and verifying transactions.
A compressed rollup inscription consisting of 600 hashes:
BlockStorage contract does the PoW mine hash injection. BlockStorage contract is part of the sequencer code that every node has.
Blob is the data being rolled up. Here showing 600 tx.
Previously, a block could accommodate 50 mining records. With the new compression solution, a block can now hold 1,000 hash records, marking a 20-fold increase in data storage efficiency. This enhancement also leads to a significant reduction in transaction time.
For instance, a block with index=895491, id=1218:405:2a7262, utilized 3,138,506 in gas, contained 1 transaction with no additional transactions pending, and was processed in just 1.532 seconds with a transaction time of 29.363 milliseconds. This particular block incorporated 1,000 hashes in just 29 milliseconds, demonstrating a capacity for 20 times more data and a processing speed 3 times faster, resulting in an overall efficiency improvement of 60 times.
Considering each hash represents a Proof of Work (PoW) transaction, the system's capability to handle 1,000 hashes every 30 milliseconds translates to an impressive throughput of 30,000 transactions per second (TPS).
The new method requires only 581,601 gas to process 600 Proof of Work (PoW) hashes. In contrast, the old method consumed 7.5 million gas for just 50 PoW hashes. This illustrates a dramatic increase in efficiency, reducing the gas cost significantly while processing a much larger number of hashes.