arnaucube
arnaucube/davinci-paperPublic Self-hosted repository
davinci-paper/v2/figures/blob-layout.drawio
v2/figures/blob-layout.drawioRaw
1<mxfile host="drawio"><diagram name="blob-layout" id="blob-layout"><mxGraphModel dx="1200" dy="800" grid="0" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="0" pageScale="1" pageWidth="1100" pageHeight="850" math="0" shadow="0"><root><mxCell id="0"/><mxCell id="1" parent="0"/><mxCell id="c3" value="" style="rounded=0;whiteSpace=wrap;html=1;fontSize=11;fillColor=none;strokeColor=#000000;fontFamily=Courier New;verticalAlign=top;align=center;spacingTop=4;spacingLeft=6;fontStyle=1;" vertex="1" parent="1"><mxGeometry x="0" y="0" width="1060" height="330" as="geometry"/></mxCell><mxCell id="c4" value="&lt;b&gt;cells&lt;/b&gt; (32-byte big-endian elements of the BLS12-381 scalar field), in order:" style="text;html=1;whiteSpace=wrap;fontSize=10;fontFamily=Courier New;align=left;verticalAlign=middle;fontColor=#000000;" vertex="1" parent="1"><mxGeometry x="16" y="8" width="1000" height="22" as="geometry"/></mxCell><mxCell id="c5" value="header&lt;br&gt;u + 2&lt;sup&gt;64&lt;/sup&gt;&amp;middot;m" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#f5f5f5;strokeColor=#666666;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="16" y="36" width="84" height="46" as="geometry"/></mxCell><mxCell id="c6" value="vote IDs (m) and updated slots (u),&lt;br&gt;4 per cell: &amp;lceil;(m+u)/4&amp;rceil; cells" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="100" y="36" width="216" height="46" as="geometry"/></mxCell><mxCell id="c7" value="ballot of slot 1&lt;br&gt;2&amp;middot;n&lt;sub&gt;f&lt;/sub&gt; point cells" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="316" y="36" width="176" height="46" as="geometry"/></mxCell><mxCell id="c8" value="ballot of slot 2&lt;br&gt;2&amp;middot;n&lt;sub&gt;f&lt;/sub&gt; point cells" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="492" y="36" width="176" height="46" as="geometry"/></mxCell><mxCell id="c9" value="&amp;hellip;" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffffff;strokeColor=#000000;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="668" y="36" width="50" height="46" as="geometry"/></mxCell><mxCell id="c10" value="ballot of slot u&lt;br&gt;2&amp;middot;n&lt;sub&gt;f&lt;/sub&gt; point cells" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="718" y="36" width="176" height="46" as="geometry"/></mxCell><mxCell id="c11" value="zero cells up to&lt;br&gt;4096 &amp;middot; nBlobs" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffffff;strokeColor=#000000;fontFamily=Courier New;align=center;verticalAlign=middle;dashed=1;" vertex="1" parent="1"><mxGeometry x="894" y="36" width="140" height="46" as="geometry"/></mxCell><mxCell id="c12" value="split into blobs of 4096 cells; T = 1 + &amp;lceil;(m+u)/4&amp;rceil; + 2&amp;middot;n&lt;sub&gt;f&lt;/sub&gt;&amp;middot;u cells in total; nBlobs = &amp;lceil;T / 4096&amp;rceil; &amp;le; 32" style="text;html=1;whiteSpace=wrap;fontSize=9;fontFamily=Courier New;align=left;verticalAlign=middle;fontColor=#333333;" vertex="1" parent="1"><mxGeometry x="16" y="84" width="1030" height="20" as="geometry"/></mxCell><mxCell id="c13" value="&lt;b&gt;packed cell&lt;/b&gt;: pack4(a, b, c, d) = a&amp;middot;2&lt;sup&gt;189&lt;/sup&gt; + b&amp;middot;2&lt;sup&gt;126&lt;/sup&gt; + c&amp;middot;2&lt;sup&gt;63&lt;/sup&gt; + d" style="text;html=1;whiteSpace=wrap;fontSize=10;fontFamily=Courier New;align=left;verticalAlign=middle;fontColor=#000000;" vertex="1" parent="1"><mxGeometry x="16" y="110" width="600" height="20" as="geometry"/></mxCell><mxCell id="c14" value="0" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffffff;strokeColor=#000000;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="16" y="132" width="40" height="28" as="geometry"/></mxCell><mxCell id="c15" value="a (63 bits)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="56" y="132" width="150" height="28" as="geometry"/></mxCell><mxCell id="c16" value="b (63 bits)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="206" y="132" width="150" height="28" as="geometry"/></mxCell><mxCell id="c17" value="c (63 bits)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="356" y="132" width="150" height="28" as="geometry"/></mxCell><mxCell id="c18" value="d (63 bits)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="506" y="132" width="150" height="28" as="geometry"/></mxCell><mxCell id="c19" value="vote IDs enter without their top bit (all lie in [2&lt;sup&gt;63&lt;/sup&gt;, 2&lt;sup&gt;64&lt;/sup&gt;)); slots are already below 2&lt;sup&gt;63&lt;/sup&gt;" style="text;html=1;whiteSpace=wrap;fontSize=9;fontFamily=Courier New;align=left;verticalAlign=middle;fontColor=#333333;" vertex="1" parent="1"><mxGeometry x="16" y="162" width="640" height="20" as="geometry"/></mxCell><mxCell id="c20" value="&lt;b&gt;point cell&lt;/b&gt;: (x, y) &amp;rarr; y + 2&lt;sup&gt;254&lt;/sup&gt;&amp;middot;(x mod 2)" style="text;html=1;whiteSpace=wrap;fontSize=10;fontFamily=Courier New;align=left;verticalAlign=middle;fontColor=#000000;" vertex="1" parent="1"><mxGeometry x="16" y="192" width="600" height="20" as="geometry"/></mxCell><mxCell id="c21" value="0" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffffff;strokeColor=#000000;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="16" y="214" width="40" height="28" as="geometry"/></mxCell><mxCell id="c22" value="x mod 2" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="56" y="214" width="40" height="28" as="geometry"/></mxCell><mxCell id="c23" value="y (254 bits, a BN254 field element)" style="rounded=0;whiteSpace=wrap;html=1;fontSize=9;fillColor=#ffe6cc;strokeColor=#d79b00;fontFamily=Courier New;align=center;verticalAlign=middle;" vertex="1" parent="1"><mxGeometry x="96" y="214" width="560" height="28" as="geometry"/></mxCell><mxCell id="c24" value="the identity (0, 1) encodes as 1; p&lt;sub&gt;BN254&lt;/sub&gt; + 2&lt;sup&gt;254&lt;/sup&gt; &amp;lt; q&lt;sub&gt;BLS&lt;/sub&gt;, so every cell is a valid field element" style="text;html=1;whiteSpace=wrap;fontSize=9;fontFamily=Courier New;align=left;verticalAlign=middle;fontColor=#333333;" vertex="1" parent="1"><mxGeometry x="16" y="244" width="640" height="20" as="geometry"/></mxCell><mxCell id="c25" value="&lt;b&gt;binding to the commitments&lt;/b&gt;&lt;br&gt;&lt;div style='text-align:left;font-size:9px;line-height:1.5;margin-top:4px'&gt;for each blob b with KZG commitment com&lt;sub&gt;b&lt;/sub&gt;:&lt;br&gt;&amp;nbsp;z&lt;sub&gt;b&lt;/sub&gt; = H(processID || stateRoot&lt;sup&gt;old&lt;/sup&gt; || com&lt;sub&gt;b&lt;/sub&gt;) mod q&lt;sub&gt;BLS&lt;/sub&gt;&lt;br&gt;&amp;nbsp;y&lt;sub&gt;b&lt;/sub&gt; = p&lt;sub&gt;b&lt;/sub&gt;(z&lt;sub&gt;b&lt;/sub&gt;) (computed in the program)&lt;br&gt;blobsDigest = H(com&lt;sub&gt;1&lt;/sub&gt; || y&lt;sub&gt;1&lt;/sub&gt; || &amp;hellip; || com&lt;sub&gt;nBlobs&lt;/sub&gt; || y&lt;sub&gt;nBlobs&lt;/sub&gt;)&lt;br&gt;&lt;br&gt;the registry opens each (com&lt;sub&gt;b&lt;/sub&gt;, z&lt;sub&gt;b&lt;/sub&gt;, y&lt;sub&gt;b&lt;/sub&gt;) with the&lt;br&gt;point-evaluation precompile against the&lt;br&gt;versioned hash of the published blob&lt;/div&gt;" style="rounded=0;whiteSpace=wrap;html=1;fontSize=10;fillColor=#dae8fc;strokeColor=#6c8ebf;fontFamily=Courier New;align=center;verticalAlign=top;spacingTop=6;" vertex="1" parent="1"><mxGeometry x="700" y="110" width="344" height="160" as="geometry"/></mxCell><mxCell id="c26" value="Slots are listed once, in increasing order, whether they hold a new vote, an overwrite, or a silent refresh. The results accumulator is not published; observers recompute it from the old and new ballots of the listed slots." style="text;html=1;whiteSpace=wrap;fontSize=9;fontFamily=Courier New;align=left;verticalAlign=middle;fontColor=#333333;" vertex="1" parent="1"><mxGeometry x="16" y="286" width="1030" height="34" as="geometry"/></mxCell></root></mxGraphModel></diagram></mxfile>