Skip to main content

layout_rounds

Function layout_rounds 

Source
pub fn layout_rounds(
    schedule: &OracleSchedule,
    n_test_queries: usize,
) -> Vec<RoundLayout>
Expand description

Lays out every round of a schedule.

Constituents are placed in nonincreasing order of ℓ_i, each at the lowest multiple of 2^ℓ_i whose block avoids every extent already placed. An extent is the first len_j entries of a placed block, so a constituent may nest in the slack above another’s content:

[ private: 98332 of 2^17 | mask 2^9 | precommit 2^10 | unused | pad ]
  0                        98816      99328            100352   2^17 - q   2^17

A zero-knowledge round reserves its top q = n_test_queries coordinates as the ZK pad. The round oracle is the least power of two holding every block with the pad above every extent. With every len_i a full power of two, the blocks lie end to end, and a zero-knowledge round whose blocks fill a power of two grows to the next one to make room for its pad.