Yesmem: a memory-hard PoW variant and a UTXO temperature-tiering scheme — feedback welcome

Yesmem: a memory-hard PoW variant and a UTXO temperature-tiering scheme — feedback welcome

I’ve been working on an experimental BCHN-derived research fork (codebase: Bitcoin Cash Node v29.0.0) exploring two changes I’d like technical feedback on. This isn’t a launch announcement — I’m interested in whether the underlying design reasoning holds up under scrutiny from people who know the BCHN internals well.

1. Yesmem: memory-hard PoW with a serial mix chain

Problem: Most memory-hard PoW algorithms (Yespower, Argon2, etc.) are memory-bound but still leave room for ASIC/FPGA advantage once the memory-access pattern becomes predictable enough to pipeline or prefetch around.

Approach: Yesmem extends Yespower 1.0 by inserting a 100-round serial bit-manipulation chain after each random memory access in smix2 . Each round’s output determines the address of the next memory access, so:

  • The mix chain cannot begin before the previous memory read completes, and the next memory address is unknown until the chain finishes — this removes the prefetch window entirely.
  • The chain is strictly serial ( x(n+1) = f(x(n), v0(n), v1(n)) ), so SIMD/multi-core/FPGA pipelining collapses to single-core serial throughput within one hash.
  • Every 10 rounds the chain reloads two words from a data-dependent address across the full working set, re-coupling the “compute” and “memory” phases repeatedly rather than once per outer iteration.

Core parameters:

N (cost factor)     2^21
r (block size)       32
Memory per thread    128 × N × r = 8 GiB exactly
ISA baseline         x86-64-v3 (SSE4.2/AVX2/BMI2/FMA) / ARMv9.0-A (SVE2/BITPERM)

The consensus build explicitly excludes AVX-512/AVX-10/XOP at compile time to guarantee bit-identical hashes across validators. PEXT/PDEP (or SVE2 BITPERM on ARM) are used for the bit-scattering step in each round.

Open question I’d like scrutiny on: whether the 10-round reload interval is the right tradeoff between closing the pipelining window and keeping per-hash latency low enough for 8 GiB/thread to remain practical on consumer RAM at a 600s block time. I chose it empirically rather than from a formal proof and would value pushback.

2. UTXO temperature tiering (Normal → Cold → Ice)

Problem: Full in-memory chainstate doesn’t scale indefinitely; most long-lived UTXOs are never touched again but still cost RAM/disk to keep fully indexed.

Approach: a deterministic, consensus-level demotion schedule moves outputs through three tiers based on value and confirmation height:

temperature(h) = value − COOLING_RATE × (h − heightAnchor)
demotionBlock  = heightAnchor + floor(value / COOLING_RATE) + 1
  • Normal : full in-memory chainstate.
  • Cold : compressed, address-level index on disk — spending needs no block read.
  • Ice : block-height pointer only — spending triggers a block read to reconstruct output data on demand (handled via a point-to-point UTXO_REQUEST / UTXO_RESPONSE exchange with the node that last relayed the spend, not a network broadcast).

The demotion formula and Normal→Cold schedule are consensus rules (every node computes them identically); the Cold protection period and Ice index depth are node-operator configuration, not consensus.

Open question: whether the point-to-point Ice-reconstruction request ( utxofall ) introduces a DoS surface if a node systematically requests data for outputs it could otherwise derive locally, and whether that needs a rate limit at the consensus layer rather than just at the P2P layer.

Happy to share the full spec (block header layout, ASERT anchoring, the TX1/TX2 CLTV-based instant-payment scheme) if there’s interest in a specific part. Mainly looking for holes in the reasoning above from people who’ve actually worked with BCHN’s mempool/chainstate code.

1 Like

Allowing this post but keep it to BCH. The core of this sounds like a complete consensus change which is not being proposed as a CHIP and not on the table realistically anyway. So please feel free to contact directly if anyone would like to talk about those aspects, but please don’t hash out the non-BCH parts here.

2 Likes

I don’t know enough about this to add any detail, but I will say I strongly support research into this area of UTXO soft-archiving on nodes. Along with UTXO commitments, semi-archived inactive UTXOs is a huge key to making BCH operate at enormous scale.

I had previously only thought of having 2 tiers: Active & Archived, but I like the concept that maybe there is room for an intermediate tier as well. Normal > Cold > Ice is also very evocative branding - I’d call a proposal around this something like “Cryosleep” or “Snowstorm” or “Ice Age Prehistory”. Something that gets to the idea of super cold frozen in ice relics or fossils. Fits nicely and it will add a lot of punch to the discussion. Once things have a name, they start gaining a lot better traction.

This naming would also be powerful because it combines well with “Sunlight”, which is the proposal for dealing with incoming UTXOs at the unmined tip. And then “Snowstorm” can take care of “burying” the “cold” UTXOs into the past. Makes sense no?

I asked Grok for some ideas. “Glacier” is the word I was looking for. So then you have “Glacial” UTXOs which have been “frozen” under increasing levels of ice - that can be thawed out if they ever become “hot” and active again. And the “Sunlight” shining on the new UTXOs means of course they are the opposite of glacial.

Glaciers are also known for being large and accumulated piece by piece over time.

So I recommend to name this proposal “Glacier”.

It’s not really clear what benefits would a memory-hard algorithm achieve. Attempts to disadvantage ASICs have generally failed to yield any meaningful impact in terms of distribution or security.

UTXO archiving algorithms are more interesting, and will likely eventually be employed in some capacity in the scenario of a coin’s success. Pointing to blocks is likely a particularly bad way to do it, though, as that’ll prevent straightforward pruning. It might be better to pair with some UTXO commitment schemes that allows proof-of-membership, and simply require users of archived outputs to provide the proof.

3 Likes