← Back to team overview

mimblewimble team mailing list archive

Periodic Diffs: Fullly Validate with Reduced Bandwidth

 

==============================================================
=== Periodic Diffs: Fullly Validate with Reduced Bandwidth ===
==============================================================

Live synchronization could be expensive with a large block size per time. Potentially nodes with lower bandwidth could synchronize periodically in order to reduce their bandwidth usage. With MimbleWimble and nodes that support creating periodic diffs, periodically synchronizing nodes could still fully validate the transaction history.

=== Power of 2 Diffs ===

By keeping record of 11 diff databases, a node could provide two services:
- Diffs to quickly synchronization to tip from genesis.
- A choice to synchronize at a period of between 1.5 hours and 32 days.

Given 10 minute blocks, and the smallest diff interval happens every 90 minutes:

block #, which diffs get updated
0000 d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10 (genesis block)
0009 d0
0018 d0,d1
0027 d0
0036 d0,d1,d2
0045 d0
0054 d0,d1
0063 d0
0072 d0,d1,d2,d3
0081 d0
0090 d0,d1
0099 d0
0108 d0,d1,d2
0117 d0
0126 d0,d1
0135 d0
0144 d0,d1,d2,d3,d4
...
0288 d0,d1,d2,d3,d4,d5
...
0576 d0,d1,d2,d3,d4,d5,d6
...
1152 d0,d1,d2,d3,d4,d5,d6,d7
...
2304 d0,d1,d2,d3,d4,d5,d6,d7,d8
...
4608 d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10
...
9216 d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10
...
13824 d0,d1,d2,d3,d4,d5,d6,d7,d8,d9,d10

Update Frequency & number of 9xblocks included in diff
d0 1.5 hrs 1
d1 3 hrs 2
d2 6 hrs 4
d3 12 hrs 8
d4 1 day 16
d5 2 days 32
d6 4 days 64
d7 8 days 128
d8 16 days 256
d9 32 days 512
d10 from height 0 to last d9

Practically, I doubt a node would support so many diffs, because this is a lot of duplicated data. Its unlikely that there would be much market demand for all of these synchronization periods. Maybe most nodes would support d9 (last 32 days) and d10 (last diff from genesis). And then maybe some nodes would additionally support d0, d4, or d7 (1.5 hrs, 1 day, or 8 days).

=== Other Diff Periods ===

Maybe there is not much point in making each diff a power of two larger than another. 1 hr, 1 day, 7 day, and 30.4375 days might be more useful.

=== Supplement With Live Data ===

A person who normally synchs at a longer period could once in a while download/apply some smaller period diffs in order to more quickly verify the receipt of an important transaction.