freecoding.school100% FREE · NO SIGNUP
The EVM CoreISSUE #3 of 48

sync committees · light-client support

SoliaVSThe Reentrancy Reaper
Solia saysA 512-validator sync committee rotates every ~27 hours and signs block headers — letting light clients follow the chain without downloading every attestation.

Light clients want to follow Ethereum without storing state or replaying every attestation. The sync committee is the answer: a randomly-selected set of 512 validators per ~27-hour period that sign every block header. A light client verifies those 512 BLS signatures per block and knows the head it can trust.

Each sync committee serves 256 epochs (~27 hours), then rotates. The per-period odds of any individual validator being on sync duty are tiny (512 / ~1M ≈ 0.05%), so it is a rare but well-rewarded duty. The demo computes the period and selection odds.

Power-ups you unlock

The Reentrancy Reaper attacks — common mistakes

Boss battleCompute the sync-committee period in hours and a validator’s expected number of sync periods per year for a 1M-validator active set.

Example code

<!doctype html><html><head><meta charset="utf-8"></head>
<body style="background:#06040d;color:#e6e0ff;font-family:monospace;padding:20px"><pre id="o"></pre>
<script>
const SYNC_COMMITTEE_SIZE = 512;
const EPOCHS_PER_SYNC_PERIOD = 256;
const slotsPerEpoch = 32, slotSec = 12;
const periodSec = EPOCHS_PER_SYNC_PERIOD * slotsPerEpoch * slotSec;
const periodHours = periodSec / 3600;
const periodsPerYear = (365 * 24) / periodHours;
const N = 1000000;
const probPerPeriod = SYNC_COMMITTEE_SIZE / N;
const expectedPeriodsPerYearPerValidator = periodsPerYear * probPerPeriod;
document.getElementById('o').textContent = [
  'sync committee period: ' + EPOCHS_PER_SYNC_PERIOD + ' epochs ≈ ' + periodHours.toFixed(1) + ' hours',
  'sync committee size:   ' + SYNC_COMMITTEE_SIZE + ' validators',
  'periods per year:      ' + Math.round(periodsPerYear),
  '',
  'odds a given validator is on sync duty:',
  '  per period:   ' + (probPerPeriod * 100).toFixed(4) + '% (' + SYNC_COMMITTEE_SIZE + ' of ' + N.toLocaleString() + ')',
  '  per year:     ~' + expectedPeriodsPerYearPerValidator.toFixed(3) + ' sync periods expected',
  '',
  'sync committees sign block headers → light clients follow with just 512 sigs'
].join('\n');
</script></body></html>
▶ Open the interactive comic issue
‹ Attestations · Committees · AggregationFork Choice · Lmd-Ghost In Practice ›