Easy way to synchronise AEC across nodes

Hi everyone,

I wrote this on Discord but feel it is worth putting here for long term and further focused discussion.

It seems to me to be a very very simple way to ensure the AEC is largely sync'd between nodes during saturation, although it does still require PoW (personally I like PoW as at least it's not free to spam to infinity).

So here we go.

  1. Keep the buckets.
  2. Order by PoW within the buckets (easy to beat the spammers PoW or just use a different bucket)
  3. Anything with the same PoW is ordered alphabetically by block hash, still within the bucket.
  4. RR carries on as normal.

All nodes will agree on PoW and all nodes will agree on the alphabet. Therefore AEC should largely consist of the same blocks across all nodes.

Nothing fancy, should be quick to implement to get V22 off the ground.

Also has the added benefit of clearing the existing backlog on mainnet as LRU for that backlog doesn't properly exist, but alphabetical ordering will work so simply.

Once a better solution comes about change it for sure but to me I see this is the simplest way to keep nodes sync'd. LRU is too vague and nodes can disagree ever so slightly causing desync.

Cheers everyone
Raf

3 Likes

"use a different bucket" is meaning you'll beat the spammer if you happen to be in a different bucket.
So you can beat them by upping PoW if you land in the same bucket.

AEC should therefore contain high pow blocks from spammers bucket, some spam (sorted alphabetically), and transactions in other buckets.

You could implement this ordering temporarily in bucket 1 (alphabetical blockhash only, ignore pow priority and LRU) just to begin clearing the current backlog.