Prime-Mesh Compute Architecture

Abstract

Retium is a prime-driven blockchain that encodes block structure using combinations of natural primes. Early visualizations of blocks show extremely large integers, which could raise concerns about integer overflow, computational complexity, and long-term scalability.

However, Retium does NOT store or manipulate huge integers in runtime.
Instead, Retium uses:

The giant numbers seen in the UI are purely decorative and produced by the Explorer for humans, not by the blockchain engine.

This paper explains the mathematical and technical guarantees ensuring that Retium remains safe, scalable, and efficient for millions of ticks—even beyond cosmological timescales.

1. Prime-Based Block Model

Each Retium block is defined by a set of primes, selected according to deterministic linking rules.

Example prime sets in early ticks:

[2, 3, 5]

[5, 7, 11]

[2, 13, 19]

Higher ticks include other primes:

Even at tick = 10,000,000, the new prime is only 9 digits, well within u32 range.



2. Runtime Block Representation

Retium never stores the composite number (product of primes).
Instead, a block internally looks like:

struct Block {

id: u64, // compact, hashed ID

primes: Vec<u32>, // prime factor set

parents: Vec<u64>, // compact parent links

merkle_root: [u8; 32], // cryptographic state

status: BlockStatus,

tick: u64,

}

Key Guarantees:



3. How Block IDs Are Actually Created

Step 1 — Convert prime list to bytes

primes = [2, 3, 5, 7, 11, 13]

bytes = serialize(primes)

Step 2 — Hash it with BLAKE3

hash = blake3(bytes)

Step 3 — Take first 8 bytes as block ID

id = u64::from_le_bytes(hash[0..8])

✔ Always a 64-bit number
Fast
Impossible to overflow
Collisions astronomically unlikely

This is the true block ID inside Retium.



4. Why Explorer Shows Huge Numbers

Explorer’s job is to help humans visualize the math.

So instead of showing:

Block #9238172323891234

Prime set: [2,3,5,7]

…it sometimes shows:

Block ID = 2 × 3 × 5 × 7 × 11 × 13 × 17 = 510510

This extremely large composite is:

It is only for human display, produced by Explorer's JavaScript using BigInt.

If you delete the entire giant-number display code,
the blockchain continues working identically.



5. Keeper Computation: What It Actually Does

Keepers DO NOT compute:

Keepers DO compute:

Their CPU load comes from:

NOT from giant integer arithmetic.



6. Why Retium Never Reaches “Dangerous Prime Sizes”

Mathematically impossible.

Size of the Nth prime:

p n log n

This grows slowly.

Examples:

Tick (n)

Approx Prime (p)

Digits

10⁶

~15,485,863

8 digits

10⁷

~179,424,673

9 digits

10⁹

~21,603,383,497

11 digits

10¹²

~27,631,021,760,000

14 digits

10²¹

~4.8 × 10²²

23 digits

Even at n = 10²¹

(practically impossible to reach in the life of the universe)
the prime is 23 digits — not hundreds, not thousands.

This means:



7. Why Retium Is Mathematically Safe

✔ No big integers in runtime

All internal values remain small:

✔ No overflow risk

Because composite numbers are never computed.

✔ No memory explosion

Primes stay small; vectors stay compact.

✔ No computational explosion

Hashing and set operations remain constant-time relative to vector length.

✔ No need for big-integer libraries

Retium never touches arbitrary-precision math.

✔ Future-proof

Even with trillions of ticks, primes remain < 20 digits.



8. Why Big Human-Visible Numbers Are Harmless

Explorer takes a prime vector:

[2,3,5,7,11]

and shows:

2 × 3 × 5 × 7 × 11 = 2310

Or, for larger sets:

13 × 19 × 23 × 29 × 31 × 37 × 41 × 43 × 47 × 53 × ... = HUGE_NUMBER

But this multiplication happens ONLY:

The blockchain engine never sees these numbers.



9. Proof That Giant Numbers Never Enter the Engine

✔ No struct field exists to store a big integer

Block has no BigInt, no big-number type at all.

✔ Everything is serialized as small values

Borsh/JSON only encode u32/u64 and byte arrays.

✔ Keeper factorization works on u64

Impossible with thousand-digit numbers.

✔ Merkle trees accept bytes, not integers

They hash small input sizes.

✔ Deleting the Explorer’s “big number display” does not affect consensus

Block IDs remain hashes.



10. Conclusion

Retium’s prime-mesh architecture is fundamentally safe because:

The giant block numbers in Explorer are an illusion made for humans —
not part of the actual blockchain.

Retium is, mathematically and computationally, future-proof.