NETSoon

Docs Protocol

Proposer

Algorithm 1. What each of a window's k proposers does in every slot, from ParentReady to its attestation.

A proposer is one of the k = 3 validators the schedule draws for a window. It is an equal of its co-proposers: none of them leads, and none of them sees the others' transactions before its own block is fixed. In every slot of its window, a proposer builds a block, streams it out encrypted, exchanges a signed hash of it with its co-proposers, and then attests which of them were on time, releasing its key with that attestation.

Window start

A proposer starts its window on the first of two events:

  • its own Alpenglow instance emits ParentReady for i0, the window's first consensus slot, or
  • its own validator has executed slot i0 − 1, the last slot of the previous window (fast handover, below).

Co-proposers start at about the same time. They are co-located, they receive the same certificates, and every proposer forwards the certificates that triggered its ParentReady directly to its co-proposers, so their ParentReady events differ by at most δlocal = 10 ms.

Every slot

From the window start, the proposer produces its blocks for all 16 slots back to back, one every δblock = 50 ms, without waiting for votes or certificates. In each slot s it:

  1. generates a fresh symmetric key K_s,
  2. packs the transactions users sent to it into block b, and encrypts the payload under K_s,
  3. streams the slices of b through Rotor during the next 50 ms,
  4. sends a signed Commit(s, p, h(b)) to every co-proposer, several times, with the last slice,
  5. waits for its co-proposers' commitments, for at most 2δlocal (see Hash exchange and attestations),
  6. sends a signed Attestation(s, p, π, K_s) to all validators.

In the last slot of the window it also sends its block directly to the next window's proposers.

Dissemination

Each slice is erasure coded into Γ = 64 shreds, any γ = 32 of which rebuild it, as in Alpenglow. With shreds of about 1.2 KB, a slice carries about 38 KB, so at least one slice goes out in every 50 ms slot. Every slice of a block is encrypted under the same key K_s. Rotor relays are sampled separately for each slot, each slice index and each co-proposer.

Acrux encrypts each block with ChaCha20-Poly1305 and writes H(K_s) into the block header, so the commitment binds the key as well as the ciphertext. The exact layout is in Wire formats.

The first slot of a window

Only the first block of a window depends on the parent. In slot i0 the proposer:

  • waits for ParentReady for i0 and the parent cblock c_j it names, and keeps streaming until δblock after it,
  • writes the parent reference (j, h(c_j)) into the block header, sent with the last slice.

Because the parent reference travels in the last slice, a proposer that started early never switches parents, and it still completes its first block exactly δblock after ParentReady. So the co-proposers complete their first blocks at most δlocal apart, however early each one started.

Fast handover

The proposers of a window send the full cblock of its last consensus slot directly to the proposers of the next window. These usually hold the previous window's last cblock before its certificate arrives, so they learn the latest transactions sooner and do not include them again. They start building their first block as soon as their own validator has executed it, without waiting for the certificate. Validators lose nothing by the early start: they cannot decrypt a block before its attestation anyway.

When the next window starts, each proposer of the window before also hands the transactions and fragments it holds but has not included to the proposer in the same role of the new window, which accepts them. A transaction sent for a slot of a skipped window is carried by the next window's proposers.

Algorithm 1

Proposer p of the window starting with consensus slot i0. ParentReady is the event of its own Alpenglow instance and validator.

text
 1: P ← proposers for consensus slot i0
 2: start[s] ← ∞, done[s] ← false                      for all slots s
 3: received[s][j] ← ∞, proposal[s][j] ← ⊥             for all slots s, proposers j ∈ P

 4: upon the first of ParentReady(i0, ·) or its validator executing slot i0 − 1 do
 5:   for i = i0, …, i0 + w/κ − 1 do                   back to back, no waiting for votes
 6:     for s = i, …, i + κ − 1 do                     back to back, no voting
 7:       K_s ← fresh symmetric key
 8:       b ← pack transactions, encrypt payload with K_s
 9:       stream the slices of b through Rotor during the next δblock
10:       if s = i0 then                               first slot of the window
11:         wait for ParentReady(i0, h(c_j)), keep streaming until δblock after it
12:         b.parent ← (j, h(c_j))                     in the last slice
13:       end if
14:       start[s] ← min(now, start[s])
15:       proposal[s][p] ← h(b)
16:       send signed Commit(s, p, h(b)) to all co-proposers, a few times
17:       if s is the last slot of the window then send b directly to the next proposers
18:     end for
19:   end for

20: upon receiving the first Commit(s, q, h) from a co-proposer q do
21:   start[s] ← min(now, start[s])
22:   received[s][q] ← now
23:   proposal[s][q] ← h

24: upon not done[s] and proposal[s][p] ≠ ⊥ and
       (received[s][q] ≠ ∞ for all q ≠ p, or now > start[s] + 2δlocal) do
25:   done[s] ← true
26:   π ← [⊥, …, ⊥]
27:   for q ∈ P do
28:     if q = p or received[s][q] ≤ start[s] + 2δlocal then    otherwise late
29:       π[q] ← proposal[s][q]
30:     end if
31:   end for
32:   send signed Attestation(s, p, π, K_s) to all validators

The line-by-line map from this listing to acrux-node's code is on /spec.

What a proposer must never do

A proposer equivocates if it signs two different proposer blocks, two different commitments or two different attestations for the same slot. Every one of them is signed, so two conflicting messages are a proof, and equivocation is slashable. See Guarantees and the Equivocation scenario.

A proposer never sends its attestation before it has sent its own commitment, even if every co-proposer's commitment arrived earlier. Its key leaves only inside that attestation.

What a proposer may include

A proposer includes transactions only once it has executed all slots before the previous window, and it includes transactions of one fee payer with inclusion fees of at most ρ/(2k) per window. A block that exceeds this rate is invalid. See Fees and the reserve rule.