Skip to content

Commit

Permalink
deploy: e5ad641
Browse files Browse the repository at this point in the history
  • Loading branch information
ajsutton committed Feb 27, 2024
1 parent 31c2748 commit f4074c8
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 38 deletions.
34 changes: 16 additions & 18 deletions experimental/fault-proof/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h1 id="fault-proof"><a class="header" href="#fault-proof">Fault Proof</a></h1>
<li><a href="#type-3-global-generic-key">Type <code>3</code>: Global generic key</a></li>
<li><a href="#type-4-global-sha2-256-key">Type <code>4</code>: Global SHA2-256 key</a></li>
<li><a href="#type-5-global-eip-4844-point-evaluation-key">Type <code>5</code>: Global EIP-4844 Point-evaluation key</a></li>
<li><a href="#type-6-global-eip-4844-point-evaluation-precompile-key">Type <code>6</code>: Global EIP-4844 Point-evaluation precompile key</a></li>
<li><a href="#type-6-global-precompile-key">Type <code>6</code>: Global Precompile key</a></li>
<li><a href="#type-7-128-reserved-range">Type <code>7-128</code>: reserved range</a></li>
<li><a href="#type-129-255-application-usage">Type <code>129-255</code>: application usage</a></li>
</ul>
Expand All @@ -217,7 +217,7 @@ <h1 id="fault-proof"><a class="header" href="#fault-proof">Fault Proof</a></h1>
<li><a href="#l1-block-header-blockhash"><code>l1-block-header &lt;blockhash&gt;</code></a></li>
<li><a href="#l1-transactions-blockhash"><code>l1-transactions &lt;blockhash&gt;</code></a></li>
<li><a href="#l1-receipts-blockhash"><code>l1-receipts &lt;blockhash&gt;</code></a></li>
<li><a href="#l1-kzg-point-evaluation-inputbytes"><code>l1-kzg-point-evaluation &lt;inputbytes&gt;</code></a></li>
<li><a href="#l1-precompile-precompile--inputbytes"><code>l1-precompile &lt;precompile ++ inputbytes&gt;</code></a></li>
<li><a href="#l2-block-header-blockhash"><code>l2-block-header &lt;blockhash&gt;</code></a></li>
<li><a href="#l2-transactions-blockhash"><code>l2-transactions &lt;blockhash&gt;</code></a></li>
<li><a href="#l2-code-codehash"><code>l2-code &lt;codehash&gt;</code></a></li>
Expand Down Expand Up @@ -319,22 +319,21 @@ <h4 id="type-5-global-eip-4844-point-evaluation-key"><a class="header" href="#ty
<li><code>commitment</code> is a bytes48, representing the KZG commitment.</li>
<li><code>z</code> is a big-endian <code>uint256</code></li>
</ul>
<h4 id="type-6-global-eip-4844-point-evaluation-precompile-key"><a class="header" href="#type-6-global-eip-4844-point-evaluation-precompile-key">Type <code>6</code>: Global EIP-4844 Point-evaluation precompile key</a></h4>
<p>An EIP-4844 point-evaluation precompile result. It maps directly to the EIP-4844
point-evaluation precompile introduced in Cancun.</p>
<p>This preimage key can be used to avoid running expensive point-evaluation routine in
a program.</p>
<p>Key: <code>6 ++ keccak256(input)[1:]</code>, where:</p>
<h4 id="type-6-global-precompile-key"><a class="header" href="#type-6-global-precompile-key">Type <code>6</code>: Global Precompile key</a></h4>
<p>A precompile result. It maps directly to precompiles on Ethereum.</p>
<p>This preimage key can be used to avoid running expensive precompile operations in the program.</p>
<p>Key: <code>6 ++ keccak256(precompile ++ input)[1:]</code>, where:</p>
<ul>
<li><code>6</code> is the type byte</li>
<li><code>++</code> is concatenation</li>
<li><code>input</code> is the 192 byte input to the KZG point evaluation precompile</li>
<li><code>precompile</code> is the 20-byte address of the precompile contract</li>
<li><code>input</code> is the input to the precompile contract</li>
</ul>
<p>The result has two possible 1-byte values:</p>
<p>The result is identical to that of a call to the precompile contract, prefixed with a revert indicator:</p>
<ul>
<li><code>0</code> if the point evaluation precompile fails</li>
<li><code>1</code> - otherwise</li>
<li><code>reverted ++ precompile_result</code>.</li>
</ul>
<p><code>reverted</code> is a 1-byte indicator with a <code>0</code> value if the precompile reverts for the given input, otherwise it's <code>1</code>.</p>
<h4 id="type-7-128-reserved-range"><a class="header" href="#type-7-128-reserved-range">Type <code>7-128</code>: reserved range</a></h4>
<p>Range start and end both inclusive.</p>
<p>This range of key types is reserved for future usage by the core protocol.
Expand Down Expand Up @@ -529,10 +528,10 @@ <h4 id="l1-transactions-blockhash"><a class="header" href="#l1-transactions-bloc
<h4 id="l1-receipts-blockhash"><a class="header" href="#l1-receipts-blockhash"><code>l1-receipts &lt;blockhash&gt;</code></a></h4>
<p>Requests the host to prepare the list of receipts of the L1 block with <code>&lt;blockhash&gt;</code>:
prepare the RLP pre-images of each of them, including receipts-list MPT nodes.</p>
<h4 id="l1-kzg-point-evaluation-inputbytes"><a class="header" href="#l1-kzg-point-evaluation-inputbytes"><code>l1-kzg-point-evaluation &lt;inputbytes&gt;</code></a></h4>
<p>Requests the host to prepare the result of the L1 KZG point evaluation precompile given
<h4 id="l1-precompile-precompile--inputbytes"><a class="header" href="#l1-precompile-precompile--inputbytes"><code>l1-precompile &lt;precompile ++ inputbytes&gt;</code></a></h4>
<p>Requests the host to prepare the result of an L1 call to the <code>precompile</code> address given
<code>&lt;inputbytes&gt;</code> as the input. The host also prepares a <a href="#type-2-global-keccak256-key">global keccak256 preimage</a>
of the input.</p>
of the hint data <code>&lt;precompile ++ inputbytes&gt;</code>.</p>
<h4 id="l2-block-header-blockhash"><a class="header" href="#l2-block-header-blockhash"><code>l2-block-header &lt;blockhash&gt;</code></a></h4>
<p>Requests the host to prepare the L2 block header RLP pre-image of the block <code>&lt;blockhash&gt;</code>.</p>
<h4 id="l2-transactions-blockhash"><a class="header" href="#l2-transactions-blockhash"><code>l2-transactions &lt;blockhash&gt;</code></a></h4>
Expand All @@ -552,9 +551,8 @@ <h3 id="precompile-accelerators"><a class="header" href="#precompile-accelerator
This approach ensures that the fault proof program can complete a state transition in a reasonable
amount of time.</p>
<p>During program execution, the precompiles are substituted with interactions with pre-image oracle.
An example of this is the KZG point evaluation precompile, where the program provides
the host with a hint for the point evaluation input. This allows it to subsequently retrieve the result
using a <a href="#type-6-global-eip-4844-point-evaluation-precompile-key">type <code>6</code> pre-image key</a> from the oracle.
The program hints the host for a precompile input. Which it the subsequently retrieves the result of the precompile
opereation using the <a href="#type-6-global-precompile-key">type 6 global precompile key</a>.
All accelerated precompiles must be functionally equivalent to their EVM equivalent.</p>
<h2 id="fault-proof-vm"><a class="header" href="#fault-proof-vm">Fault Proof VM</a></h2>
<p>A fault proof VM implements:</p>
Expand Down
34 changes: 16 additions & 18 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -5380,7 +5380,7 @@ <h1 id="fault-proof"><a class="header" href="#fault-proof">Fault Proof</a></h1>
<li><a href="experimental/fault-proof/index.html#type-3-global-generic-key">Type <code>3</code>: Global generic key</a></li>
<li><a href="experimental/fault-proof/index.html#type-4-global-sha2-256-key">Type <code>4</code>: Global SHA2-256 key</a></li>
<li><a href="experimental/fault-proof/index.html#type-5-global-eip-4844-point-evaluation-key">Type <code>5</code>: Global EIP-4844 Point-evaluation key</a></li>
<li><a href="experimental/fault-proof/index.html#type-6-global-eip-4844-point-evaluation-precompile-key">Type <code>6</code>: Global EIP-4844 Point-evaluation precompile key</a></li>
<li><a href="experimental/fault-proof/index.html#type-6-global-precompile-key">Type <code>6</code>: Global Precompile key</a></li>
<li><a href="experimental/fault-proof/index.html#type-7-128-reserved-range">Type <code>7-128</code>: reserved range</a></li>
<li><a href="experimental/fault-proof/index.html#type-129-255-application-usage">Type <code>129-255</code>: application usage</a></li>
</ul>
Expand All @@ -5400,7 +5400,7 @@ <h1 id="fault-proof"><a class="header" href="#fault-proof">Fault Proof</a></h1>
<li><a href="experimental/fault-proof/index.html#l1-block-header-blockhash"><code>l1-block-header &lt;blockhash&gt;</code></a></li>
<li><a href="experimental/fault-proof/index.html#l1-transactions-blockhash"><code>l1-transactions &lt;blockhash&gt;</code></a></li>
<li><a href="experimental/fault-proof/index.html#l1-receipts-blockhash"><code>l1-receipts &lt;blockhash&gt;</code></a></li>
<li><a href="experimental/fault-proof/index.html#l1-kzg-point-evaluation-inputbytes"><code>l1-kzg-point-evaluation &lt;inputbytes&gt;</code></a></li>
<li><a href="experimental/fault-proof/index.html#l1-precompile-precompile--inputbytes"><code>l1-precompile &lt;precompile ++ inputbytes&gt;</code></a></li>
<li><a href="experimental/fault-proof/index.html#l2-block-header-blockhash"><code>l2-block-header &lt;blockhash&gt;</code></a></li>
<li><a href="experimental/fault-proof/index.html#l2-transactions-blockhash"><code>l2-transactions &lt;blockhash&gt;</code></a></li>
<li><a href="experimental/fault-proof/index.html#l2-code-codehash"><code>l2-code &lt;codehash&gt;</code></a></li>
Expand Down Expand Up @@ -5502,22 +5502,21 @@ <h4 id="type-5-global-eip-4844-point-evaluation-key"><a class="header" href="#ty
<li><code>commitment</code> is a bytes48, representing the KZG commitment.</li>
<li><code>z</code> is a big-endian <code>uint256</code></li>
</ul>
<h4 id="type-6-global-eip-4844-point-evaluation-precompile-key"><a class="header" href="#type-6-global-eip-4844-point-evaluation-precompile-key">Type <code>6</code>: Global EIP-4844 Point-evaluation precompile key</a></h4>
<p>An EIP-4844 point-evaluation precompile result. It maps directly to the EIP-4844
point-evaluation precompile introduced in Cancun.</p>
<p>This preimage key can be used to avoid running expensive point-evaluation routine in
a program.</p>
<p>Key: <code>6 ++ keccak256(input)[1:]</code>, where:</p>
<h4 id="type-6-global-precompile-key"><a class="header" href="#type-6-global-precompile-key">Type <code>6</code>: Global Precompile key</a></h4>
<p>A precompile result. It maps directly to precompiles on Ethereum.</p>
<p>This preimage key can be used to avoid running expensive precompile operations in the program.</p>
<p>Key: <code>6 ++ keccak256(precompile ++ input)[1:]</code>, where:</p>
<ul>
<li><code>6</code> is the type byte</li>
<li><code>++</code> is concatenation</li>
<li><code>input</code> is the 192 byte input to the KZG point evaluation precompile</li>
<li><code>precompile</code> is the 20-byte address of the precompile contract</li>
<li><code>input</code> is the input to the precompile contract</li>
</ul>
<p>The result has two possible 1-byte values:</p>
<p>The result is identical to that of a call to the precompile contract, prefixed with a revert indicator:</p>
<ul>
<li><code>0</code> if the point evaluation precompile fails</li>
<li><code>1</code> - otherwise</li>
<li><code>reverted ++ precompile_result</code>.</li>
</ul>
<p><code>reverted</code> is a 1-byte indicator with a <code>0</code> value if the precompile reverts for the given input, otherwise it's <code>1</code>.</p>
<h4 id="type-7-128-reserved-range"><a class="header" href="#type-7-128-reserved-range">Type <code>7-128</code>: reserved range</a></h4>
<p>Range start and end both inclusive.</p>
<p>This range of key types is reserved for future usage by the core protocol.
Expand Down Expand Up @@ -5712,10 +5711,10 @@ <h4 id="l1-transactions-blockhash"><a class="header" href="#l1-transactions-bloc
<h4 id="l1-receipts-blockhash"><a class="header" href="#l1-receipts-blockhash"><code>l1-receipts &lt;blockhash&gt;</code></a></h4>
<p>Requests the host to prepare the list of receipts of the L1 block with <code>&lt;blockhash&gt;</code>:
prepare the RLP pre-images of each of them, including receipts-list MPT nodes.</p>
<h4 id="l1-kzg-point-evaluation-inputbytes"><a class="header" href="#l1-kzg-point-evaluation-inputbytes"><code>l1-kzg-point-evaluation &lt;inputbytes&gt;</code></a></h4>
<p>Requests the host to prepare the result of the L1 KZG point evaluation precompile given
<h4 id="l1-precompile-precompile--inputbytes"><a class="header" href="#l1-precompile-precompile--inputbytes"><code>l1-precompile &lt;precompile ++ inputbytes&gt;</code></a></h4>
<p>Requests the host to prepare the result of an L1 call to the <code>precompile</code> address given
<code>&lt;inputbytes&gt;</code> as the input. The host also prepares a <a href="experimental/fault-proof/index.html#type-2-global-keccak256-key">global keccak256 preimage</a>
of the input.</p>
of the hint data <code>&lt;precompile ++ inputbytes&gt;</code>.</p>
<h4 id="l2-block-header-blockhash"><a class="header" href="#l2-block-header-blockhash"><code>l2-block-header &lt;blockhash&gt;</code></a></h4>
<p>Requests the host to prepare the L2 block header RLP pre-image of the block <code>&lt;blockhash&gt;</code>.</p>
<h4 id="l2-transactions-blockhash"><a class="header" href="#l2-transactions-blockhash"><code>l2-transactions &lt;blockhash&gt;</code></a></h4>
Expand All @@ -5735,9 +5734,8 @@ <h3 id="precompile-accelerators"><a class="header" href="#precompile-accelerator
This approach ensures that the fault proof program can complete a state transition in a reasonable
amount of time.</p>
<p>During program execution, the precompiles are substituted with interactions with pre-image oracle.
An example of this is the KZG point evaluation precompile, where the program provides
the host with a hint for the point evaluation input. This allows it to subsequently retrieve the result
using a <a href="experimental/fault-proof/index.html#type-6-global-eip-4844-point-evaluation-precompile-key">type <code>6</code> pre-image key</a> from the oracle.
The program hints the host for a precompile input. Which it the subsequently retrieves the result of the precompile
opereation using the <a href="experimental/fault-proof/index.html#type-6-global-precompile-key">type 6 global precompile key</a>.
All accelerated precompiles must be functionally equivalent to their EVM equivalent.</p>
<h2 id="fault-proof-vm"><a class="header" href="#fault-proof-vm">Fault Proof VM</a></h2>
<p>A fault proof VM implements:</p>
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit f4074c8

Please sign in to comment.