This commit is contained in:
str4d 2021-11-11 23:17:43 +00:00
parent 7fac1315b3
commit d1e7cbb031
44 changed files with 300 additions and 318 deletions

View File

@ -426,6 +426,9 @@ granular error messages that indicate which specific constraint (if any) is not
<h2 id="circuit-visualizations"><a class="header" href="#circuit-visualizations">Circuit visualizations</a></h2>
<p>The <code>dev-graph</code> feature flag exposes several helper methods for creating graphical
representations of circuits.</p>
<p>On Debian systems, you will need the following additional packages:</p>
<pre><code class="language-plaintext">sudo apt install cmake libexpat1-dev libfreetype6-dev
</code></pre>
<h3 id="circuit-layout"><a class="header" href="#circuit-layout">Circuit layout</a></h3>
<p><code>halo2::dev::CircuitLayout</code> renders the circuit layout as a grid:</p>
<pre><code class="language-rust ignore no_run">fn main() {
@ -720,7 +723,7 @@ impl&lt;F: FieldExt&gt; NumericInstructions&lt;F&gt; for FieldChip&lt;F&gt; {
|| &quot;private input&quot;,
config.advice[0],
0,
|| value.ok_or(Error::SynthesisError),
|| value.ok_or(Error::Synthesis),
)?;
num = Some(Number { cell, value });
Ok(())
@ -781,13 +784,13 @@ impl&lt;F: FieldExt&gt; NumericInstructions&lt;F&gt; for FieldChip&lt;F&gt; {
|| &quot;lhs&quot;,
config.advice[0],
0,
|| a.value.ok_or(Error::SynthesisError),
|| a.value.ok_or(Error::Synthesis),
)?;
let rhs = region.assign_advice(
|| &quot;rhs&quot;,
config.advice[1],
0,
|| b.value.ok_or(Error::SynthesisError),
|| b.value.ok_or(Error::Synthesis),
)?;
region.constrain_equal(a.cell, lhs)?;
region.constrain_equal(b.cell, rhs)?;
@ -798,7 +801,7 @@ impl&lt;F: FieldExt&gt; NumericInstructions&lt;F&gt; for FieldChip&lt;F&gt; {
|| &quot;lhs * rhs&quot;,
config.advice[0],
1,
|| value.ok_or(Error::SynthesisError),
|| value.ok_or(Error::Synthesis),
)?;
// Finally, we return a variable representing the output,

View File

@ -75,15 +75,15 @@ then checks every constraint manually.</p>
<span class="ident">layouter</span>.<span class="ident">assign_region</span>(<span class="op">|</span><span class="op">|</span> <span class="string">&quot;Example region&quot;</span>, <span class="op">|</span><span class="kw-2">mut</span> <span class="ident">region</span><span class="op">|</span> {
<span class="ident">config</span>.<span class="ident">s</span>.<span class="ident">enable</span>(<span class="kw-2">&amp;mut</span> <span class="ident">region</span>, <span class="number">0</span>)<span class="question-mark">?</span>;
<span class="ident">region</span>.<span class="ident">assign_advice</span>(<span class="op">|</span><span class="op">|</span> <span class="string">&quot;a&quot;</span>, <span class="ident">config</span>.<span class="ident">a</span>, <span class="number">0</span>, <span class="op">|</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">a</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">F::from</span>(<span class="ident">v</span>)).<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>)
<span class="self">self</span>.<span class="ident">a</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">F::from</span>(<span class="ident">v</span>)).<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>)
})<span class="question-mark">?</span>;
<span class="ident">region</span>.<span class="ident">assign_advice</span>(<span class="op">|</span><span class="op">|</span> <span class="string">&quot;b&quot;</span>, <span class="ident">config</span>.<span class="ident">b</span>, <span class="number">0</span>, <span class="op">|</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">b</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">F::from</span>(<span class="ident">v</span>)).<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>)
<span class="self">self</span>.<span class="ident">b</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">F::from</span>(<span class="ident">v</span>)).<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>)
})<span class="question-mark">?</span>;
<span class="ident">region</span>.<span class="ident">assign_advice</span>(<span class="op">|</span><span class="op">|</span> <span class="string">&quot;c&quot;</span>, <span class="ident">config</span>.<span class="ident">c</span>, <span class="number">0</span>, <span class="op">|</span><span class="op">|</span> {
<span class="self">self</span>.<span class="ident">a</span>
.<span class="ident">and_then</span>(<span class="op">|</span><span class="ident">a</span><span class="op">|</span> <span class="self">self</span>.<span class="ident">b</span>.<span class="ident">map</span>(<span class="op">|</span><span class="ident">b</span><span class="op">|</span> <span class="ident">F::from</span>(<span class="ident">a</span> <span class="op">*</span> <span class="ident">b</span>)))
.<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>)
.<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>)
})<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(())
})

View File

@ -13,34 +13,36 @@
});
});
</script>
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Error</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.BoundsFailure">BoundsFailure</a><a href="#variant.ConstraintSystemFailure">ConstraintSystemFailure</a><a href="#variant.IncompatibleParams">IncompatibleParams</a><a href="#variant.InstanceTooLarge">InstanceTooLarge</a><a href="#variant.NotEnoughColumnsForConstants">NotEnoughColumnsForConstants</a><a href="#variant.NotEnoughRowsAvailable">NotEnoughRowsAvailable</a><a href="#variant.OpeningError">OpeningError</a><a href="#variant.SynthesisError">SynthesisError</a><a href="#variant.TranscriptError">TranscriptError</a></div><h3 class="sidebar-title"><a href="#implementations">Associated Constants</a></h3><div class="sidebar-links"><a href="#associatedconstant.ALIGN">ALIGN</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-PartialEq%3CError%3E">PartialEq&lt;Error&gt;</a><a href="#impl-StructuralPartialEq">StructuralPartialEq</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Conv">Conv</a><a href="#impl-FmtForward">FmtForward</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Pipe">Pipe</a><a href="#impl-Pointable">Pointable</a><a href="#impl-Tap">Tap</a><a href="#impl-TryConv">TryConv</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a></h2><div id="sidebar-vars" data-name="Error" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a>::<wbr><a class="enum" href="#">Error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk.rs.html#139-161" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust enum"><code>pub enum Error {
SynthesisError,
IncompatibleParams,
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc enum"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Enum Error</h2><div class="sidebar-elems"><div class="block items"><h3 class="sidebar-title"><a href="#variants">Variants</a></h3><div class="sidebar-links"><a href="#variant.BoundsFailure">BoundsFailure</a><a href="#variant.ConstraintSystemFailure">ConstraintSystemFailure</a><a href="#variant.InstanceTooLarge">InstanceTooLarge</a><a href="#variant.InvalidInstances">InvalidInstances</a><a href="#variant.NotEnoughColumnsForConstants">NotEnoughColumnsForConstants</a><a href="#variant.NotEnoughRowsAvailable">NotEnoughRowsAvailable</a><a href="#variant.Opening">Opening</a><a href="#variant.Synthesis">Synthesis</a><a href="#variant.Transcript">Transcript</a></div><h3 class="sidebar-title"><a href="#implementations">Associated Constants</a></h3><div class="sidebar-links"><a href="#associatedconstant.ALIGN">ALIGN</a></div><h3 class="sidebar-title"><a href="#trait-implementations">Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-Debug">Debug</a><a href="#impl-Display">Display</a><a href="#impl-Error">Error</a><a href="#impl-From%3CError%3E">From&lt;Error&gt;</a></div><h3 class="sidebar-title"><a href="#synthetic-implementations">Auto Trait Implementations</a></h3><div class="sidebar-links"><a href="#impl-RefUnwindSafe">!RefUnwindSafe</a><a href="#impl-Send">Send</a><a href="#impl-Sync">Sync</a><a href="#impl-Unpin">Unpin</a><a href="#impl-UnwindSafe">!UnwindSafe</a></div><h3 class="sidebar-title"><a href="#blanket-implementations">Blanket Implementations</a></h3><div class="sidebar-links"><a href="#impl-Any">Any</a><a href="#impl-Borrow%3CT%3E">Borrow&lt;T&gt;</a><a href="#impl-BorrowMut%3CT%3E">BorrowMut&lt;T&gt;</a><a href="#impl-Conv">Conv</a><a href="#impl-FmtForward">FmtForward</a><a href="#impl-From%3CT%3E">From&lt;T&gt;</a><a href="#impl-Into%3CU%3E">Into&lt;U&gt;</a><a href="#impl-Pipe">Pipe</a><a href="#impl-Pointable">Pointable</a><a href="#impl-Tap">Tap</a><a href="#impl-ToString">ToString</a><a href="#impl-TryConv">TryConv</a><a href="#impl-TryFrom%3CU%3E">TryFrom&lt;U&gt;</a><a href="#impl-TryInto%3CU%3E">TryInto&lt;U&gt;</a><a href="#impl-VZip%3CV%3E">VZip&lt;V&gt;</a></div></div><h2 class="location">Other items in<br><a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a></h2><div id="sidebar-vars" data-name="Error" data-ty="enum" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Enum <a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a>::<wbr><a class="enum" href="#">Error</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk/error.rs.html#8-31" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust enum"><code>pub enum Error {
Synthesis,
InvalidInstances,
ConstraintSystemFailure,
BoundsFailure,
OpeningError,
TranscriptError,
Opening,
Transcript(<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>),
NotEnoughRowsAvailable,
InstanceTooLarge,
NotEnoughColumnsForConstants,
}</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This is an error that could occur during proving or circuit synthesis.</p>
</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><div id="variant.SynthesisError" class="variant small-section-header"><a href="#variant.SynthesisError" class="anchor field"></a><code>SynthesisError</code></div><div class="docblock"><p>This is an error that can occur during synthesis of the circuit, for
</div></details><h2 id="variants" class="variants small-section-header">Variants<a href="#variants" class="anchor"></a></h2><div id="variant.Synthesis" class="variant small-section-header"><a href="#variant.Synthesis" class="anchor field"></a><code>Synthesis</code></div><div class="docblock"><p>This is an error that can occur during synthesis of the circuit, for
example, when the witness is not present.</p>
</div><div id="variant.IncompatibleParams" class="variant small-section-header"><a href="#variant.IncompatibleParams" class="anchor field"></a><code>IncompatibleParams</code></div><div class="docblock"><p>The structured reference string or the parameters are not compatible
with the circuit being synthesized.</p>
</div><div id="variant.InvalidInstances" class="variant small-section-header"><a href="#variant.InvalidInstances" class="anchor field"></a><code>InvalidInstances</code></div><div class="docblock"><p>The provided instances do not match the circuit parameters.</p>
</div><div id="variant.ConstraintSystemFailure" class="variant small-section-header"><a href="#variant.ConstraintSystemFailure" class="anchor field"></a><code>ConstraintSystemFailure</code></div><div class="docblock"><p>The constraint system is not satisfied.</p>
</div><div id="variant.BoundsFailure" class="variant small-section-header"><a href="#variant.BoundsFailure" class="anchor field"></a><code>BoundsFailure</code></div><div class="docblock"><p>Out of bounds index passed to a backend</p>
</div><div id="variant.OpeningError" class="variant small-section-header"><a href="#variant.OpeningError" class="anchor field"></a><code>OpeningError</code></div><div class="docblock"><p>Opening error</p>
</div><div id="variant.TranscriptError" class="variant small-section-header"><a href="#variant.TranscriptError" class="anchor field"></a><code>TranscriptError</code></div><div class="docblock"><p>Transcript error</p>
</div><div id="variant.NotEnoughRowsAvailable" class="variant small-section-header"><a href="#variant.NotEnoughRowsAvailable" class="anchor field"></a><code>NotEnoughRowsAvailable</code></div><div class="docblock"><p>Instance provided has more rows than supported by circuit</p>
</div><div id="variant.Opening" class="variant small-section-header"><a href="#variant.Opening" class="anchor field"></a><code>Opening</code></div><div class="docblock"><p>Opening error</p>
</div><div id="variant.Transcript" class="variant small-section-header"><a href="#variant.Transcript" class="anchor field"></a><code>Transcript(<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>)</code></div><div class="docblock"><p>Transcript error</p>
</div><div class="sub-variant" id="variant.Transcript.fields"><h3>Tuple Fields of <b>Transcript</b></h3><div><span id="variant.Transcript.field.0" class="variant small-section-header"><a href="#variant.Transcript.field.0" class="anchor field"></a><code>0:&nbsp;<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a></code></span></div></div><div id="variant.NotEnoughRowsAvailable" class="variant small-section-header"><a href="#variant.NotEnoughRowsAvailable" class="anchor field"></a><code>NotEnoughRowsAvailable</code></div><div class="docblock"><p>Instance provided has more rows than supported by circuit</p>
</div><div id="variant.InstanceTooLarge" class="variant small-section-header"><a href="#variant.InstanceTooLarge" class="anchor field"></a><code>InstanceTooLarge</code></div><div class="docblock"><p>Instance provided exceeds number of available rows</p>
</div><div id="variant.NotEnoughColumnsForConstants" class="variant small-section-header"><a href="#variant.NotEnoughColumnsForConstants" class="anchor field"></a><code>NotEnoughColumnsForConstants</code></div><div class="docblock"><p>Circuit synthesis requires global constants, but circuit configuration did not
call <a href="struct.ConstraintSystem.html#method.enable_constant" title="ConstraintSystem::enable_constant"><code>ConstraintSystem::enable_constant</code></a> on fixed columns with sufficient space.</p>
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk.rs.html#138" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk.rs.html#138" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-PartialEq%3CError%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk.rs.html#138" title="goto source code">[src]</a></div><a href="#impl-PartialEq%3CError%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html" title="trait core::cmp::PartialEq">PartialEq</a>&lt;<a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a>&gt; for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.eq" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk.rs.html#138" title="goto source code">[src]</a></div><a href="#method.eq" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq" class="fnname">eq</a>(&amp;self, other: &amp;<a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a>) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>self</code> and <code>other</code> values to be equal, and is used
by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#tymethod.eq">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.ne" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/cmp.rs.html#218" title="goto source code">[src]</a></div><a href="#method.ne" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.PartialEq.html#method.ne" class="fnname">ne</a>(&amp;self, other: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>Rhs) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></h4></div></summary><div class='docblock'><p>This method tests for <code>!=</code>.</p>
</div></details></div></details><div id="impl-StructuralPartialEq" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk.rs.html#138" title="goto source code">[src]</a></div><a href="#impl-StructuralPartialEq" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.StructuralPartialEq.html" title="trait core::marker::StructuralPartialEq">StructuralPartialEq</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
call <a href="struct.ConstraintSystem.html#method.enable_constant"><code>ConstraintSystem::enable_constant</code></a> on fixed columns with sufficient space.</p>
</div><h2 id="trait-implementations" class="small-section-header">Trait Implementations<a href="#trait-implementations" class="anchor"></a></h2><div id="trait-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Debug" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#7" title="goto source code">[src]</a></div><a href="#impl-Debug" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html" title="trait core::fmt::Debug">Debug</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#7" title="goto source code">[src]</a></div><a href="#method.fmt" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Debug.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Display" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#40-59" title="goto source code">[src]</a></div><a href="#impl-Display" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#41-58" title="goto source code">[src]</a></div><a href="#method.fmt-1" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt" class="fnname">fmt</a>(&amp;self, f: &amp;mut <a class="struct" href="https://doc.rust-lang.org/nightly/core/fmt/struct.Formatter.html" title="struct core::fmt::Formatter">Formatter</a>&lt;'_&gt;) -&gt; <a class="type" href="https://doc.rust-lang.org/nightly/core/fmt/type.Result.html" title="type core::fmt::Result">Result</a></h4></div></summary><div class='docblock'><p>Formats the value using the given formatter. <a href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html#tymethod.fmt">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Error" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#61-68" title="goto source code">[src]</a></div><a href="#impl-Error" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.source" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#62-67" title="goto source code">[src]</a></div><a href="#method.source" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source" class="fnname">source</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;(dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a> + 'static)&gt;</h4></div></summary><div class='docblock'><p>The lower-level source of this error, if any. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.source">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.backtrace" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#135" title="goto source code">[src]</a></div><a href="#method.backtrace" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.backtrace" class="fnname">backtrace</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;<a class="struct" href="https://doc.rust-lang.org/nightly/std/backtrace/struct.Backtrace.html" title="struct std::backtrace::Backtrace">Backtrace</a>&gt;</h4></div></summary><div class="item-info"><div class="stab unstable"><span class="emoji">🔬</span> This is a nightly-only experimental API. (<code>backtrace</code>)</div></div><div class='docblock'><p>Returns a stack backtrace, if available, of where this error occurred. <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.backtrace">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.description" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#147" title="goto source code">[src]</a></div><a href="#method.description" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description" class="fnname">description</a>(&amp;self) -&gt; &amp;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.str.html">str</a></h4></div></summary><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.42.0: <p>use the Display impl or to_string()</p>
</div></div><div class='docblock'> <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.description">Read more</a></div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.cause" class="method trait-impl has-srclink"><div class="rightside"><span class="since" title="Stable since Rust version 1.0.0">1.0.0</span><a class="srclink" href="https://doc.rust-lang.org/nightly/src/std/error.rs.html#157" title="goto source code">[src]</a></div><a href="#method.cause" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html#method.cause" class="fnname">cause</a>(&amp;self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html" title="enum core::option::Option">Option</a>&lt;&amp;dyn <a class="trait" href="https://doc.rust-lang.org/nightly/std/error/trait.Error.html" title="trait std::error::Error">Error</a>&gt;</h4></div></summary><div class="item-info"><div class="stab deprecated"><span class="emoji">👎</span> Deprecated since 1.33.0: <p>replaced by Error::source, which can support downcasting</p>
</div></div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3CError%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#33-38" title="goto source code">[src]</a></div><a href="#impl-From%3CError%3E" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;<a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>&gt; for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="../../src/halo2/plonk/error.rs.html#34-37" title="goto source code">[src]</a></div><a href="#method.from" class="anchor"></a><h4 class="code-header">fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(error: <a class="struct" href="https://doc.rust-lang.org/nightly/std/io/error/struct.Error.html" title="struct std::io::error::Error">Error</a>) -&gt; Self</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details></div><h2 id="synthetic-implementations" class="small-section-header">Auto Trait Implementations<a href="#synthetic-implementations" class="anchor"></a></h2><div id="synthetic-implementations-list"><div id="impl-RefUnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-RefUnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.RefUnwindSafe.html" title="trait core::panic::unwind_safe::RefUnwindSafe">RefUnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-Send" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Send" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Send.html" title="trait core::marker::Send">Send</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-Sync" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Sync" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sync.html" title="trait core::marker::Sync">Sync</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-Unpin" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Unpin" class="anchor"></a><h3 class="code-header in-band">impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Unpin.html" title="trait core::marker::Unpin">Unpin</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div><div id="impl-UnwindSafe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-UnwindSafe" class="anchor"></a><h3 class="code-header in-band">impl !<a class="trait" href="https://doc.rust-lang.org/nightly/core/panic/unwind_safe/trait.UnwindSafe.html" title="trait core::panic::unwind_safe::UnwindSafe">UnwindSafe</a> for <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a></h3></div></div><h2 id="blanket-implementations" class="small-section-header">Blanket Implementations<a href="#blanket-implementations" class="anchor"></a></h2><div id="blanket-implementations-list"><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Any" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#132-136" title="goto source code">[src]</a></div><a href="#impl-Any" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html" title="trait core::any::Any">Any</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: 'static + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.type_id" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/any.rs.html#133" title="goto source code">[src]</a></div><a href="#method.type_id" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id" class="fnname">type_id</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html" title="struct core::any::TypeId">TypeId</a></h4></div></summary><div class='docblock'><p>Gets the <code>TypeId</code> of <code>self</code>. <a href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Borrow%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#208-213" title="goto source code">[src]</a></div><a href="#impl-Borrow%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html" title="trait core::borrow::Borrow">Borrow</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#210" title="goto source code">[src]</a></div><a href="#method.borrow" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow" class="fnname">borrow</a>(&amp;self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;</a>T</h4></div></summary><div class='docblock'><p>Immutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-BorrowMut%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#216-220" title="goto source code">[src]</a></div><a href="#impl-BorrowMut%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html" title="trait core::borrow::BorrowMut">BorrowMut</a>&lt;T&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.borrow_mut" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#217" title="goto source code">[src]</a></div><a href="#method.borrow_mut" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut" class="fnname">borrow_mut</a>(&amp;mut self) -&gt; <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T</h4></div></summary><div class='docblock'><p>Mutably borrows from an owned value. <a href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Conv" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Conv" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; Conv for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.conv" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.conv" class="anchor"></a><h4 class="code-header">fn <a href="#method.conv" class="fnname">conv</a>&lt;T&gt;(self) -&gt; T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></h4></div></summary><div class='docblock'><p>Converts <code>self</code> into <code>T</code> using <code>Into&lt;T&gt;</code>. <a href="#method.conv">Read more</a></p>
@ -58,7 +60,7 @@ by <code>==</code>. <a href="https://doc.rust-lang.org/nightly/core/cmp/trait.Pa
<code>Debug</code>-formatted. <a href="#method.fmt_upper_exp">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.fmt_upper_hex" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.fmt_upper_hex" class="anchor"></a><h4 class="code-header">fn <a href="#method.fmt_upper_hex" class="fnname">fmt_upper_hex</a>(self) -&gt; FmtUpperHex&lt;Self&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.UpperHex.html" title="trait core::fmt::UpperHex">UpperHex</a>,&nbsp;</span></h4></div></summary><div class='docblock'><p>Causes <code>self</code> to use its <code>UpperHex</code> implementation when
<code>Debug</code>-formatted. <a href="#method.fmt_upper_hex">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#549-553" title="goto source code">[src]</a></div><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#550" title="goto source code">[src]</a></div><a href="#method.from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-From%3CT%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#549-553" title="goto source code">[src]</a></div><a href="#impl-From%3CT%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt; for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.from-1" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#550" title="goto source code">[src]</a></div><a href="#method.from-1" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html#tymethod.from" class="fnname">from</a>(t: T) -&gt; T</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Into%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#537-544" title="goto source code">[src]</a></div><a href="#impl-Into%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html" title="trait core::convert::From">From</a>&lt;T&gt;,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.into" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#541" title="goto source code">[src]</a></div><a href="#method.into" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into" class="fnname">into</a>(self) -&gt; U</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-Pipe" class="impl has-srclink"><div class="rightside"></div><a href="#impl-Pipe" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; Pipe for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.pipe" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.pipe" class="anchor"></a><h4 class="code-header">fn <a href="#method.pipe" class="fnname">pipe</a>&lt;R&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(Self) -&gt; R) -&gt; R</h4></div></summary><div class='docblock'><p>Pipes by value. This is generally the method you want to use. <a href="#method.pipe">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.pipe_ref" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.pipe_ref" class="anchor"></a><h4 class="code-header">fn <a href="#method.pipe_ref" class="fnname">pipe_ref</a>&lt;'a, R&gt;(&amp;'a self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;'a </a>Self) -&gt; R) -&gt; R <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;R: 'a,&nbsp;</span></h4></div></summary><div class='docblock'><p>Borrows <code>self</code> and passes that borrow into the pipe function. <a href="#method.pipe_ref">Read more</a></p>
@ -101,6 +103,7 @@ builds. <a href="#method.tap_ref_mut_dbg">Read more</a></p>
builds. <a href="#method.tap_deref_dbg">Read more</a></p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.tap_deref_mut_dbg" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.tap_deref_mut_dbg" class="anchor"></a><h4 class="code-header">fn <a href="#method.tap_deref_mut_dbg" class="fnname">tap_deref_mut_dbg</a>&lt;T&gt;(self, func: impl <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/function/trait.FnOnce.html" title="trait core::ops::function::FnOnce">FnOnce</a>(<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T)) -&gt; Self <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.DerefMut.html" title="trait core::ops::deref::DerefMut">DerefMut</a>&lt;Target = T&gt; + <a class="trait" href="https://doc.rust-lang.org/nightly/core/ops/deref/trait.Deref.html" title="trait core::ops::deref::Deref">Deref</a>,<br>&nbsp;&nbsp;&nbsp;&nbsp;T: ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h4></div></summary><div class='docblock'><p>Calls <code>.tap_deref_mut()</code> only in debug builds, and is erased in release
builds. <a href="#method.tap_deref_mut_dbg">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-ToString" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2390-2404" title="goto source code">[src]</a></div><a href="#impl-ToString" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html" title="trait alloc::string::ToString">ToString</a> for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;T: <a class="trait" href="https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html" title="trait core::fmt::Display">Display</a> + ?<a class="trait" href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html" title="trait core::marker::Sized">Sized</a>,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.to_string" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/alloc/string.rs.html#2396" title="goto source code">[src]</a></div><a href="#method.to_string" class="anchor"></a><h4 class="code-header">pub default fn <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string" class="fnname">to_string</a>(&amp;self) -&gt; <a class="struct" href="https://doc.rust-lang.org/nightly/alloc/string/struct.String.html" title="struct alloc::string::String">String</a></h4></div></summary><div class='docblock'><p>Converts the given value to a <code>String</code>. <a href="https://doc.rust-lang.org/nightly/alloc/string/trait.ToString.html#tymethod.to_string">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryConv" class="impl has-srclink"><div class="rightside"></div><a href="#impl-TryConv" class="anchor"></a><h3 class="code-header in-band">impl&lt;T&gt; TryConv for T</h3></div></summary><div class="impl-items"><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_conv" class="method trait-impl has-srclink"><div class="rightside"></div><a href="#method.try_conv" class="anchor"></a><h4 class="code-header">fn <a href="#method.try_conv" class="fnname">try_conv</a>&lt;T&gt;(self) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, Self::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error" title="type core::convert::TryInto::Error">Error</a>&gt; <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;Self: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html" title="trait core::convert::TryInto">TryInto</a>&lt;T&gt;,&nbsp;</span></h4></div></summary><div class='docblock'><p>Attempts to convert <code>self</code> into <code>T</code> using <code>TryInto&lt;T&gt;</code>. <a href="#method.try_conv">Read more</a></p>
</div></details></div></details><details class="rustdoc-toggle implementors-toggle" open><summary><div id="impl-TryFrom%3CU%3E" class="impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#587-596" title="goto source code">[src]</a></div><a href="#impl-TryFrom%3CU%3E" class="anchor"></a><h3 class="code-header in-band">impl&lt;T, U&gt; <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt; for T <span class="where fmt-newline">where<br>&nbsp;&nbsp;&nbsp;&nbsp;U: <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html" title="trait core::convert::Into">Into</a>&lt;T&gt;,&nbsp;</span></h3></div></summary><div class="impl-items"><details class="rustdoc-toggle" open><summary><div id="associatedtype.Error" class="type trait-impl has-srclink"><a href="#associatedtype.Error" class="anchor"></a><h4 class="code-header">type <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" class="type">Error</a> = <a class="enum" href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html" title="enum core::convert::Infallible">Infallible</a></h4></div></summary><div class='docblock'><p>The type returned in the event of a conversion error.</p>
</div></details><details class="rustdoc-toggle method-toggle" open><summary><div id="method.try_from" class="method trait-impl has-srclink"><div class="rightside"><a class="srclink" href="https://doc.rust-lang.org/nightly/src/core/convert/mod.rs.html#593" title="goto source code">[src]</a></div><a href="#method.try_from" class="anchor"></a><h4 class="code-header">pub fn <a href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from" class="fnname">try_from</a>(value: U) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;T, &lt;T as <a class="trait" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html" title="trait core::convert::TryFrom">TryFrom</a>&lt;U&gt;&gt;::<a class="type" href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error" title="type core::convert::TryFrom::Error">Error</a>&gt;</h4></div></summary><div class='docblock'><p>Performs the conversion.</p>

View File

@ -0,0 +1,11 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="refresh" content="0;URL=../../../halo2/plonk/enum.Error.html">
<title>Redirection</title>
</head>
<body>
<p>Redirecting to <a href="../../../halo2/plonk/enum.Error.html">../../../halo2/plonk/enum.Error.html</a>...</p>
<script>location.replace("../../../halo2/plonk/enum.Error.html" + location.search + location.hash);</script>
</body>
</html>

View File

@ -13,7 +13,7 @@
});
});
</script>
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a></h2><div id="sidebar-vars" data-name="create_proof" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a>::<wbr><a class="fn" href="#">create_proof</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk/prover.rs.html#32-615" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub fn create_proof&lt;C:&nbsp;<a class="trait" href="../arithmetic/trait.CurveAffine.html" title="trait halo2::arithmetic::CurveAffine">CurveAffine</a>, E:&nbsp;<a class="trait" href="../transcript/trait.EncodedChallenge.html" title="trait halo2::transcript::EncodedChallenge">EncodedChallenge</a>&lt;C&gt;, T:&nbsp;<a class="trait" href="../transcript/trait.TranscriptWrite.html" title="trait halo2::transcript::TranscriptWrite">TranscriptWrite</a>&lt;C, E&gt;, ConcreteCircuit:&nbsp;<a class="trait" href="trait.Circuit.html" title="trait halo2::plonk::Circuit">Circuit</a>&lt;C::Scalar&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../poly/commitment/struct.Params.html" title="struct halo2::poly::commitment::Params">Params</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;pk: &amp;<a class="struct" href="struct.ProvingKey.html" title="struct halo2::plonk::ProvingKey">ProvingKey</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;circuits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[ConcreteCircuit]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;instances: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a>C::Scalar<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;transcript: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a>&gt;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This creates a proof for the provided <code>circuit</code> when given the public
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a></h2><div id="sidebar-vars" data-name="create_proof" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a>::<wbr><a class="fn" href="#">create_proof</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk/prover.rs.html#32-603" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub fn create_proof&lt;C:&nbsp;<a class="trait" href="../arithmetic/trait.CurveAffine.html" title="trait halo2::arithmetic::CurveAffine">CurveAffine</a>, E:&nbsp;<a class="trait" href="../transcript/trait.EncodedChallenge.html" title="trait halo2::transcript::EncodedChallenge">EncodedChallenge</a>&lt;C&gt;, T:&nbsp;<a class="trait" href="../transcript/trait.TranscriptWrite.html" title="trait halo2::transcript::TranscriptWrite">TranscriptWrite</a>&lt;C, E&gt;, ConcreteCircuit:&nbsp;<a class="trait" href="trait.Circuit.html" title="trait halo2::plonk::Circuit">Circuit</a>&lt;C::Scalar&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;<a class="struct" href="../poly/commitment/struct.Params.html" title="struct halo2::poly::commitment::Params">Params</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;pk: &amp;<a class="struct" href="struct.ProvingKey.html" title="struct halo2::plonk::ProvingKey">ProvingKey</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;circuits: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[ConcreteCircuit]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;instances: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a>C::Scalar<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;transcript: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.unit.html">()</a>, <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a>&gt;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This creates a proof for the provided <code>circuit</code> when given the public
parameters <code>params</code> and the proving key <a href="struct.ProvingKey.html" title="ProvingKey"><code>ProvingKey</code></a> that was
generated previously for the same circuit. The provided <code>instances</code>
are zero-padded internally.</p>

View File

@ -13,7 +13,7 @@
});
});
</script>
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a></h2><div id="sidebar-vars" data-name="verify_proof" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a>::<wbr><a class="fn" href="#">verify_proof</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk/verifier.rs.html#17-299" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub fn verify_proof&lt;'params, C:&nbsp;<a class="trait" href="../arithmetic/trait.CurveAffine.html" title="trait halo2::arithmetic::CurveAffine">CurveAffine</a>, E:&nbsp;<a class="trait" href="../transcript/trait.EncodedChallenge.html" title="trait halo2::transcript::EncodedChallenge">EncodedChallenge</a>&lt;C&gt;, T:&nbsp;<a class="trait" href="../transcript/trait.TranscriptRead.html" title="trait halo2::transcript::TranscriptRead">TranscriptRead</a>&lt;C, E&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;'params <a class="struct" href="../poly/commitment/struct.Params.html" title="struct halo2::poly::commitment::Params">Params</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;vk: &amp;<a class="struct" href="struct.VerifyingKey.html" title="struct halo2::plonk::VerifyingKey">VerifyingKey</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;msm: <a class="struct" href="../poly/commitment/struct.MSM.html" title="struct halo2::poly::commitment::MSM">MSM</a>&lt;'params, C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;instances: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a>C::Scalar<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;transcript: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../poly/commitment/struct.Guard.html" title="struct halo2::poly::commitment::Guard">Guard</a>&lt;'params, C, E&gt;, <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a>&gt;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns a boolean indicating whether or not the proof is valid</p>
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc fn"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><div class="sidebar-elems"><h2 class="location">Other items in<br><a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a></h2><div id="sidebar-vars" data-name="verify_proof" data-ty="fn" data-relpath=""></div><script defer src="sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Function <a href="../index.html">halo2</a>::<wbr><a href="index.html">plonk</a>::<wbr><a class="fn" href="#">verify_proof</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk/verifier.rs.html#17-289" title="goto source code">[src]</a></span></h1><div class="docblock item-decl"><pre class="rust fn"><code>pub fn verify_proof&lt;'params, C:&nbsp;<a class="trait" href="../arithmetic/trait.CurveAffine.html" title="trait halo2::arithmetic::CurveAffine">CurveAffine</a>, E:&nbsp;<a class="trait" href="../transcript/trait.EncodedChallenge.html" title="trait halo2::transcript::EncodedChallenge">EncodedChallenge</a>&lt;C&gt;, T:&nbsp;<a class="trait" href="../transcript/trait.TranscriptRead.html" title="trait halo2::transcript::TranscriptRead">TranscriptRead</a>&lt;C, E&gt;&gt;(<br>&nbsp;&nbsp;&nbsp;&nbsp;params: &amp;'params <a class="struct" href="../poly/commitment/struct.Params.html" title="struct halo2::poly::commitment::Params">Params</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;vk: &amp;<a class="struct" href="struct.VerifyingKey.html" title="struct halo2::plonk::VerifyingKey">VerifyingKey</a>&lt;C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;msm: <a class="struct" href="../poly/commitment/struct.MSM.html" title="struct halo2::poly::commitment::MSM">MSM</a>&lt;'params, C&gt;, <br>&nbsp;&nbsp;&nbsp;&nbsp;instances: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&amp;[</a>C::Scalar<a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a><a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a>, <br>&nbsp;&nbsp;&nbsp;&nbsp;transcript: <a class="primitive" href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&amp;mut </a>T<br>) -&gt; <a class="enum" href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html" title="enum core::result::Result">Result</a>&lt;<a class="struct" href="../poly/commitment/struct.Guard.html" title="struct halo2::poly::commitment::Guard">Guard</a>&lt;'params, C, E&gt;, <a class="enum" href="enum.Error.html" title="enum halo2::plonk::Error">Error</a>&gt;</code></pre></div><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>Returns a boolean indicating whether or not the proof is valid</p>
</div></details></section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../" data-current-crate="halo2" data-search-index-js="../../search-index.js" data-search-js="../../search.js"></div>
<script src="../../main.js"></script>
</body></html>

View File

@ -13,7 +13,7 @@
});
});
</script>
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module plonk</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="plonk" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">halo2</a>::<wbr><a class="mod" href="#">plonk</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk.rs.html#1-195" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This module provides an implementation of a variant of (Turbo)<a href="https://eprint.iacr.org/2019/953">PLONK</a>
<style type="text/css">#crate-search{background-image:url("../../down-arrow.svg");}</style></head><body class="rustdoc mod"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../rust-logo.png' alt='logo'></div></a><h2 class="location">Module plonk</h2><div class="sidebar-elems"><div class="block items"><ul><li><a href="#structs">Structs</a></li><li><a href="#enums">Enums</a></li><li><a href="#traits">Traits</a></li><li><a href="#functions">Functions</a></li></ul></div><div id="sidebar-vars" data-name="plonk" data-ty="mod" data-relpath="./"></div><script defer src="./sidebar-items.js"></script></div></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../wheel.svg"></a></div></form></nav><section id="main" class="content"><h1 class="fqn"><span class="in-band">Module <a href="../index.html">halo2</a>::<wbr><a class="mod" href="#">plonk</a><button id="copy-path" onclick="copy_path(this)" title="Copy item path to clipboard"><img src="../../clipboard.svg" width="19" height="18" alt="Copy item path"></button></span><span class="out-of-band"><span id="render-detail"><a id="toggle-all-docs" href="javascript:void(0)" title="collapse all docs">[<span class="inner">&#x2212;</span>]</a></span><a class="srclink" href="../../src/halo2/plonk.rs.html#1-170" title="goto source code">[src]</a></span></h1><details class="rustdoc-toggle top-doc" open><summary class="hideme"><span>Expand description</span></summary><div class="docblock"><p>This module provides an implementation of a variant of (Turbo)<a href="https://eprint.iacr.org/2019/953">PLONK</a>
that is designed specifically for the polynomial commitment scheme described
in the <a href="https://eprint.iacr.org/2019/1021">Halo</a> paper.</p>
</div></details><h2 id="structs" class="section-header"><a href="#structs">Structs</a></h2>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
(function() {var implementors = {};
implementors["halo2"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Column.html\" title=\"struct halo2::dev::metadata::Column\">Column</a>","synthetic":false,"types":["halo2::dev::metadata::Column"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Gate.html\" title=\"struct halo2::dev::metadata::Gate\">Gate</a>","synthetic":false,"types":["halo2::dev::metadata::Gate"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Constraint.html\" title=\"struct halo2::dev::metadata::Constraint\">Constraint</a>","synthetic":false,"types":["halo2::dev::metadata::Constraint"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Region.html\" title=\"struct halo2::dev::metadata::Region\">Region</a>","synthetic":false,"types":["halo2::dev::metadata::Region"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/struct.CircuitGates.html\" title=\"struct halo2::dev::CircuitGates\">CircuitGates</a>","synthetic":false,"types":["halo2::dev::gates::CircuitGates"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"halo2/dev/enum.VerifyFailure.html\" title=\"enum halo2::dev::VerifyFailure\">VerifyFailure</a>","synthetic":false,"types":["halo2::dev::VerifyFailure"]}];
implementors["halo2"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"halo2/plonk/enum.Error.html\" title=\"enum halo2::plonk::Error\">Error</a>","synthetic":false,"types":["halo2::plonk::error::Error"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Column.html\" title=\"struct halo2::dev::metadata::Column\">Column</a>","synthetic":false,"types":["halo2::dev::metadata::Column"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Gate.html\" title=\"struct halo2::dev::metadata::Gate\">Gate</a>","synthetic":false,"types":["halo2::dev::metadata::Gate"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Constraint.html\" title=\"struct halo2::dev::metadata::Constraint\">Constraint</a>","synthetic":false,"types":["halo2::dev::metadata::Constraint"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/metadata/struct.Region.html\" title=\"struct halo2::dev::metadata::Region\">Region</a>","synthetic":false,"types":["halo2::dev::metadata::Region"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"struct\" href=\"halo2/dev/struct.CircuitGates.html\" title=\"struct halo2::dev::CircuitGates\">CircuitGates</a>","synthetic":false,"types":["halo2::dev::gates::CircuitGates"]},{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/core/fmt/trait.Display.html\" title=\"trait core::fmt::Display\">Display</a> for <a class=\"enum\" href=\"halo2/dev/enum.VerifyFailure.html\" title=\"enum halo2::dev::VerifyFailure\">VerifyFailure</a>","synthetic":false,"types":["halo2::dev::VerifyFailure"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,3 @@
(function() {var implementors = {};
implementors["halo2"] = [{"text":"impl <a class=\"trait\" href=\"https://doc.rust-lang.org/nightly/std/error/trait.Error.html\" title=\"trait std::error::Error\">Error</a> for <a class=\"enum\" href=\"halo2/plonk/enum.Error.html\" title=\"enum halo2::plonk::Error\">Error</a>","synthetic":false,"types":["halo2::plonk::error::Error"]}];
if (window.register_implementors) {window.register_implementors(implementors);} else {window.pending_implementors = implementors;}})()

View File

@ -5,4 +5,4 @@ if(!String.prototype.startsWith){String.prototype.startsWith=function(searchStri
and <code>const</code>.","Search functions by type signature (e.g., <code>vec -&gt; usize</code> or \
<code>* -&gt; vec</code>)","Search multiple things at once by splitting your query with comma (e.g., \
<code>str,u8</code> or <code>String,struct:Vec,test</code>)","You can look for items with an exact name by putting double quotes around \
your request: <code>\"string\"</code>","Look for items inside another one by searching for a path: <code>vec::Vec</code>",].map(function(x){return"<p>"+x+"</p>"}).join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="<h2>Search Tricks</h2>"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);var rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";var rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc 1.58.0-nightly (8b09ba6a5 2021-11-09)";rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,searchState.outputElement());buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var el=document.createElement('textarea');el.value=path.join('::');el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);but.children[0].style.display='none';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(e){if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent='✓'}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent='';reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}())
your request: <code>\"string\"</code>","Look for items inside another one by searching for a path: <code>vec::Vec</code>",].map(function(x){return"<p>"+x+"</p>"}).join("");var div_infos=document.createElement("div");addClass(div_infos,"infos");div_infos.innerHTML="<h2>Search Tricks</h2>"+infos;container.appendChild(book_info);container.appendChild(div_shortcuts);container.appendChild(div_infos);var rustdoc_version=document.createElement("span");rustdoc_version.className="bottom";var rustdoc_version_code=document.createElement("code");rustdoc_version_code.innerText="rustdoc 1.58.0-nightly (82af160c2 2021-11-10)";rustdoc_version.appendChild(rustdoc_version_code);container.appendChild(rustdoc_version);popup.appendChild(container);insertAfter(popup,searchState.outputElement());buildHelperPopup=function(){}};onHashChange(null);window.addEventListener("hashchange",onHashChange);searchState.setup()}());(function(){var reset_button_timeout=null;window.copy_path=function(but){var parent=but.parentElement;var path=[];onEach(parent.childNodes,function(child){if(child.tagName==='A'){path.push(child.textContent)}});var el=document.createElement('textarea');el.value=path.join('::');el.setAttribute('readonly','');el.style.position='absolute';el.style.left='-9999px';document.body.appendChild(el);el.select();document.execCommand('copy');document.body.removeChild(el);but.children[0].style.display='none';var tmp;if(but.childNodes.length<2){tmp=document.createTextNode('✓');but.appendChild(tmp)}else{onEachLazy(but.childNodes,function(e){if(e.nodeType===Node.TEXT_NODE){tmp=e;return true}});tmp.textContent='✓'}if(reset_button_timeout!==null){window.clearTimeout(reset_button_timeout)}function reset_button(){tmp.textContent='';reset_button_timeout=null;but.children[0].style.display=""}reset_button_timeout=window.setTimeout(reset_button,1000)}}())

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
var N = null;var sourcesIndex = {};
sourcesIndex["halo2"] = {"name":"","dirs":[{"name":"circuit","dirs":[{"name":"floor_planner","dirs":[{"name":"v1","files":["strategy.rs"]}],"files":["single_pass.rs","v1.rs"]}],"files":["floor_planner.rs","layouter.rs"]},{"name":"dev","files":["cost.rs","gates.rs","metadata.rs"]},{"name":"plonk","dirs":[{"name":"circuit","files":["compress_selectors.rs"]},{"name":"lookup","files":["prover.rs","verifier.rs"]},{"name":"permutation","files":["keygen.rs","prover.rs","verifier.rs"]},{"name":"vanishing","files":["prover.rs","verifier.rs"]}],"files":["circuit.rs","keygen.rs","lookup.rs","permutation.rs","prover.rs","vanishing.rs","verifier.rs"]},{"name":"poly","dirs":[{"name":"commitment","files":["msm.rs","prover.rs","verifier.rs"]},{"name":"multiopen","files":["prover.rs","verifier.rs"]}],"files":["commitment.rs","domain.rs","multiopen.rs"]}],"files":["arithmetic.rs","circuit.rs","dev.rs","helpers.rs","lib.rs","multicore.rs","plonk.rs","poly.rs","transcript.rs"]};
sourcesIndex["halo2"] = {"name":"","dirs":[{"name":"circuit","dirs":[{"name":"floor_planner","dirs":[{"name":"v1","files":["strategy.rs"]}],"files":["single_pass.rs","v1.rs"]}],"files":["floor_planner.rs","layouter.rs"]},{"name":"dev","files":["cost.rs","gates.rs","metadata.rs"]},{"name":"plonk","dirs":[{"name":"circuit","files":["compress_selectors.rs"]},{"name":"lookup","files":["prover.rs","verifier.rs"]},{"name":"permutation","files":["keygen.rs","prover.rs","verifier.rs"]},{"name":"vanishing","files":["prover.rs","verifier.rs"]}],"files":["circuit.rs","error.rs","keygen.rs","lookup.rs","permutation.rs","prover.rs","vanishing.rs","verifier.rs"]},{"name":"poly","dirs":[{"name":"commitment","files":["msm.rs","prover.rs","verifier.rs"]},{"name":"multiopen","files":["prover.rs","verifier.rs"]}],"files":["commitment.rs","domain.rs","multiopen.rs"]}],"files":["arithmetic.rs","circuit.rs","dev.rs","helpers.rs","lib.rs","multicore.rs","plonk.rs","poly.rs","transcript.rs"]};
createSourceSidebar();

View File

@ -702,7 +702,7 @@
<span class="kw">_</span> =&gt; <span class="prelude-val">None</span>,
}) {
<span class="prelude-val">Some</span>(<span class="prelude-val">Some</span>(<span class="ident">len</span>)) =&gt; <span class="ident">len</span>,
<span class="kw">_</span> =&gt; <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::SynthesisError</span>), <span class="comment">// TODO better error</span>
<span class="kw">_</span> =&gt; <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::Synthesis</span>), <span class="comment">// TODO better error</span>
}
};
@ -842,7 +842,7 @@
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">layouter</span>.<span class="ident">cs</span>.<span class="ident">query_instance</span>(<span class="ident">instance</span>, <span class="ident">row</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">cell</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">assign_advice</span>(<span class="ident">annotation</span>, <span class="ident">advice</span>, <span class="ident">offset</span>, <span class="kw-2">&amp;mut</span> <span class="op">|</span><span class="op">|</span> {
<span class="ident">value</span>.<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>).<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">v</span>.<span class="ident">into</span>())
<span class="ident">value</span>.<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>).<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">v</span>.<span class="ident">into</span>())
})<span class="question-mark">?</span>;
<span class="self">self</span>.<span class="ident">layouter</span>.<span class="ident">cs</span>.<span class="ident">copy</span>(
@ -939,7 +939,7 @@
<span class="ident">to</span>: <span class="kw-2">&amp;</span><span class="lifetime">&#39;v</span> <span class="kw-2">mut</span> (<span class="kw">dyn</span> <span class="ident">FnMut</span>() -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Assigned</span><span class="op">&lt;</span><span class="ident">F</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> <span class="op">+</span> <span class="lifetime">&#39;v</span>),
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">if</span> <span class="self">self</span>.<span class="ident">used_columns</span>.<span class="ident">contains</span>(<span class="kw-2">&amp;</span><span class="ident">column</span>) {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::SynthesisError</span>); <span class="comment">// TODO better error</span>
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::Synthesis</span>); <span class="comment">// TODO better error</span>
}
<span class="kw">let</span> <span class="ident">entry</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">default_and_assigned</span>.<span class="ident">entry</span>(<span class="ident">column</span>).<span class="ident">or_default</span>();
@ -961,7 +961,7 @@
(<span class="bool-val">true</span>, <span class="number">0</span>) =&gt; <span class="ident">entry</span>.<span class="number">0</span> <span class="op">=</span> <span class="prelude-val">Some</span>(<span class="ident">value</span>),
<span class="comment">// Since there is already an existing default value for this table column,</span>
<span class="comment">// the caller should not be attempting to assign another value at offset 0.</span>
(<span class="bool-val">false</span>, <span class="number">0</span>) =&gt; <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::SynthesisError</span>), <span class="comment">// TODO better error</span>
(<span class="bool-val">false</span>, <span class="number">0</span>) =&gt; <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::Synthesis</span>), <span class="comment">// TODO better error</span>
<span class="kw">_</span> =&gt; (),
}
<span class="kw">if</span> <span class="ident">entry</span>.<span class="number">1</span>.<span class="ident">len</span>() <span class="op">&lt;</span><span class="op">=</span> <span class="ident">offset</span> {
@ -1021,10 +1021,10 @@
}
<span class="kw">let</span> <span class="ident">circuit</span> <span class="op">=</span> <span class="ident">MyCircuit</span> {};
<span class="macro">assert_eq!</span>(
<span class="macro">assert!</span>(<span class="macro">matches!</span>(
<span class="ident">MockProver::run</span>(<span class="number">3</span>, <span class="kw-2">&amp;</span><span class="ident">circuit</span>, <span class="macro">vec!</span>[]).<span class="ident">unwrap_err</span>(),
<span class="ident">Error::NotEnoughColumnsForConstants</span>,
);
));
}
}
</code></pre></div>

View File

@ -878,7 +878,7 @@
<span class="kw">_</span> =&gt; <span class="prelude-val">None</span>,
}) {
<span class="prelude-val">Some</span>(<span class="prelude-val">Some</span>(<span class="ident">len</span>)) =&gt; <span class="ident">len</span>,
<span class="kw">_</span> =&gt; <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::SynthesisError</span>), <span class="comment">// TODO better error</span>
<span class="kw">_</span> =&gt; <span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::Synthesis</span>), <span class="comment">// TODO better error</span>
}
};
@ -993,7 +993,7 @@
<span class="kw">let</span> <span class="ident">value</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">plan</span>.<span class="ident">cs</span>.<span class="ident">query_instance</span>(<span class="ident">instance</span>, <span class="ident">row</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">cell</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">assign_advice</span>(<span class="ident">annotation</span>, <span class="ident">advice</span>, <span class="ident">offset</span>, <span class="kw-2">&amp;mut</span> <span class="op">|</span><span class="op">|</span> {
<span class="ident">value</span>.<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>).<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">v</span>.<span class="ident">into</span>())
<span class="ident">value</span>.<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>).<span class="ident">map</span>(<span class="op">|</span><span class="ident">v</span><span class="op">|</span> <span class="ident">v</span>.<span class="ident">into</span>())
})<span class="question-mark">?</span>;
<span class="self">self</span>.<span class="ident">plan</span>.<span class="ident">cs</span>.<span class="ident">copy</span>(
@ -1091,10 +1091,10 @@
}
<span class="kw">let</span> <span class="ident">circuit</span> <span class="op">=</span> <span class="ident">MyCircuit</span> {};
<span class="macro">assert_eq!</span>(
<span class="macro">assert!</span>(<span class="macro">matches!</span>(
<span class="ident">MockProver::run</span>(<span class="number">3</span>, <span class="kw-2">&amp;</span><span class="ident">circuit</span>, <span class="macro">vec!</span>[]).<span class="ident">unwrap_err</span>(),
<span class="ident">Error::NotEnoughColumnsForConstants</span>,
);
));
}
}
</code></pre></div>

View File

@ -1241,15 +1241,15 @@
<span class="doccomment">/// layouter.assign_region(|| &quot;Example region&quot;, |mut region| {</span>
<span class="doccomment">/// config.s.enable(&amp;mut region, 0)?;</span>
<span class="doccomment">/// region.assign_advice(|| &quot;a&quot;, config.a, 0, || {</span>
<span class="doccomment">/// self.a.map(|v| F::from(v)).ok_or(Error::SynthesisError)</span>
<span class="doccomment">/// self.a.map(|v| F::from(v)).ok_or(Error::Synthesis)</span>
<span class="doccomment">/// })?;</span>
<span class="doccomment">/// region.assign_advice(|| &quot;b&quot;, config.b, 0, || {</span>
<span class="doccomment">/// self.b.map(|v| F::from(v)).ok_or(Error::SynthesisError)</span>
<span class="doccomment">/// self.b.map(|v| F::from(v)).ok_or(Error::Synthesis)</span>
<span class="doccomment">/// })?;</span>
<span class="doccomment">/// region.assign_advice(|| &quot;c&quot;, config.c, 0, || {</span>
<span class="doccomment">/// self.a</span>
<span class="doccomment">/// .and_then(|a| self.b.map(|b| F::from(a * b)))</span>
<span class="doccomment">/// .ok_or(Error::SynthesisError)</span>
<span class="doccomment">/// .ok_or(Error::Synthesis)</span>
<span class="doccomment">/// })?;</span>
<span class="doccomment">/// Ok(())</span>
<span class="doccomment">/// })</span>
@ -1477,7 +1477,7 @@
}
<span class="kw">if</span> <span class="ident">instance</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">cs</span>.<span class="ident">num_instance_columns</span> {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::IncompatibleParams</span>);
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::InvalidInstances</span>);
}
<span class="kw">let</span> <span class="ident">instance</span> <span class="op">=</span> <span class="ident">instance</span>

View File

@ -183,31 +183,6 @@
<span id="168">168</span>
<span id="169">169</span>
<span id="170">170</span>
<span id="171">171</span>
<span id="172">172</span>
<span id="173">173</span>
<span id="174">174</span>
<span id="175">175</span>
<span id="176">176</span>
<span id="177">177</span>
<span id="178">178</span>
<span id="179">179</span>
<span id="180">180</span>
<span id="181">181</span>
<span id="182">182</span>
<span id="183">183</span>
<span id="184">184</span>
<span id="185">185</span>
<span id="186">186</span>
<span id="187">187</span>
<span id="188">188</span>
<span id="189">189</span>
<span id="190">190</span>
<span id="191">191</span>
<span id="192">192</span>
<span id="193">193</span>
<span id="194">194</span>
<span id="195">195</span>
</pre><pre class="rust"><code><span class="doccomment">//! This module provides an implementation of a variant of (Turbo)[PLONK][plonk]</span>
<span class="doccomment">//! that is designed specifically for the polynomial commitment scheme described</span>
<span class="doccomment">//! in the [Halo][halo] paper.</span>
@ -226,6 +201,7 @@
<span class="kw">use</span> <span class="ident"><span class="kw">crate</span>::transcript</span>::{<span class="ident">ChallengeScalar</span>, <span class="ident">EncodedChallenge</span>, <span class="ident">Transcript</span>};
<span class="kw">mod</span> <span class="ident">circuit</span>;
<span class="kw">mod</span> <span class="ident">error</span>;
<span class="kw">mod</span> <span class="ident">keygen</span>;
<span class="kw">mod</span> <span class="ident">lookup</span>;
<span class="kw">pub</span>(<span class="kw">crate</span>) <span class="kw">mod</span> <span class="ident">permutation</span>;
@ -235,6 +211,7 @@
<span class="kw">mod</span> <span class="ident">verifier</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">circuit</span>::<span class="kw-2">*</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">error</span>::<span class="kw-2">*</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">keygen</span>::<span class="kw-2">*</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">prover</span>::<span class="kw-2">*</span>;
<span class="kw">pub</span> <span class="kw">use</span> <span class="ident">verifier</span>::<span class="kw-2">*</span>;
@ -343,33 +320,6 @@
<span class="ident">permutation</span>: <span class="ident">permutation::ProvingKey</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span>,
}
<span class="doccomment">/// This is an error that could occur during proving or circuit synthesis.</span>
<span class="comment">// TODO: these errors need to be cleaned up</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>, <span class="ident">PartialEq</span>)]</span>
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Error</span> {
<span class="doccomment">/// This is an error that can occur during synthesis of the circuit, for</span>
<span class="doccomment">/// example, when the witness is not present.</span>
<span class="ident">SynthesisError</span>,
<span class="doccomment">/// The structured reference string or the parameters are not compatible</span>
<span class="doccomment">/// with the circuit being synthesized.</span>
<span class="ident">IncompatibleParams</span>,
<span class="doccomment">/// The constraint system is not satisfied.</span>
<span class="ident">ConstraintSystemFailure</span>,
<span class="doccomment">/// Out of bounds index passed to a backend</span>
<span class="ident">BoundsFailure</span>,
<span class="doccomment">/// Opening error</span>
<span class="ident">OpeningError</span>,
<span class="doccomment">/// Transcript error</span>
<span class="ident">TranscriptError</span>,
<span class="doccomment">/// Instance provided has more rows than supported by circuit</span>
<span class="ident">NotEnoughRowsAvailable</span>,
<span class="doccomment">/// Instance provided exceeds number of available rows</span>
<span class="ident">InstanceTooLarge</span>,
<span class="doccomment">/// Circuit synthesis requires global constants, but circuit configuration did not</span>
<span class="doccomment">/// call [`ConstraintSystem::enable_constant`] on fixed columns with sufficient space.</span>
<span class="ident">NotEnoughColumnsForConstants</span>,
}
<span class="kw">impl</span><span class="op">&lt;</span><span class="ident">C</span>: <span class="ident">CurveAffine</span><span class="op">&gt;</span> <span class="ident">ProvingKey</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span> {
<span class="doccomment">/// Get the underlying [`VerifyingKey`].</span>
<span class="kw">pub</span> <span class="kw">fn</span> <span class="ident">get_vk</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="kw-2">&amp;</span><span class="ident">VerifyingKey</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span> {

View File

@ -0,0 +1,155 @@
<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta name="generator" content="rustdoc"><meta name="description" content="Source of the Rust file `src&#x2F;plonk&#x2F;error.rs`."><meta name="keywords" content="rust, rustlang, rust-lang"><title>error.rs - source</title><link rel="stylesheet" type="text/css" href="../../../normalize.css"><link rel="stylesheet" type="text/css" href="../../../rustdoc.css" id="mainThemeStyle"><link rel="stylesheet" type="text/css" href="../../../light.css" id="themeStyle"><link rel="stylesheet" type="text/css" href="../../../dark.css" disabled ><link rel="stylesheet" type="text/css" href="../../../ayu.css" disabled ><script id="default-settings" ></script><script src="../../../storage.js"></script><script src="../../../crates.js"></script><noscript><link rel="stylesheet" href="../../../noscript.css"></noscript><link rel="alternate icon" type="image/png" href="../../../favicon-16x16.png"><link rel="alternate icon" type="image/png" href="../../../favicon-32x32.png"><link rel="icon" type="image/svg+xml" href="../../../favicon.svg"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.css" integrity="sha384-9eLZqc9ds8eNjO3TmqPeYcDj8n+Qfa4nuSiGYa6DjLNcv9BtN69ZIulL9+8CqC9Y" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/katex.min.js" integrity="sha384-K3vbOmF2BtaVai+Qk37uypf7VrgBubhQreNQe9aGsz9lB63dIFiQVlJbr92dw2Lx" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/katex@0.10.0/dist/contrib/auto-render.min.js" integrity="sha384-kmZOZB5ObwgQnS/DuDg6TScgOiWWBiVt0plIRkZCmE6rDZGrEOQeHM5PcHi+nyqe" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "\\(", right: "\\)", display: false},
{left: "$", right: "$", display: false},
{left: "\\[", right: "\\]", display: true}
]
});
});
</script>
<style type="text/css">#crate-search{background-image:url("../../../down-arrow.svg");}</style></head><body class="rustdoc source"><!--[if lte IE 11]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><nav class="sidebar"><div class="sidebar-menu" role="button">&#9776;</div><a href='../../../halo2/index.html'><div class='logo-container rust-logo'><img src='../../../rust-logo.png' alt='logo'></div></a></nav><div class="theme-picker"><button id="theme-picker" aria-label="Pick another theme!" aria-haspopup="menu" title="themes"><img width="18" height="18" alt="Pick another theme!" src="../../../brush.svg"></button><div id="theme-choices" role="menu"></div></div><nav class="sub"><form class="search-form"><div class="search-container"><div><select id="crate-search"><option value="All crates">All crates</option></select><input class="search-input" name="search" autocomplete="off" spellcheck="false" placeholder="Click or press S to search, ? for more options…" type="search"></div><button type="button" id="help-button" title="help">?</button><a id="settings-menu" href="../../../settings.html" title="settings"><img width="18" height="18" alt="Change settings" src="../../../wheel.svg"></a></div></form></nav><section id="main" class="content"><div class="example-wrap"><pre class="line-numbers"><span id="1"> 1</span>
<span id="2"> 2</span>
<span id="3"> 3</span>
<span id="4"> 4</span>
<span id="5"> 5</span>
<span id="6"> 6</span>
<span id="7"> 7</span>
<span id="8"> 8</span>
<span id="9"> 9</span>
<span id="10">10</span>
<span id="11">11</span>
<span id="12">12</span>
<span id="13">13</span>
<span id="14">14</span>
<span id="15">15</span>
<span id="16">16</span>
<span id="17">17</span>
<span id="18">18</span>
<span id="19">19</span>
<span id="20">20</span>
<span id="21">21</span>
<span id="22">22</span>
<span id="23">23</span>
<span id="24">24</span>
<span id="25">25</span>
<span id="26">26</span>
<span id="27">27</span>
<span id="28">28</span>
<span id="29">29</span>
<span id="30">30</span>
<span id="31">31</span>
<span id="32">32</span>
<span id="33">33</span>
<span id="34">34</span>
<span id="35">35</span>
<span id="36">36</span>
<span id="37">37</span>
<span id="38">38</span>
<span id="39">39</span>
<span id="40">40</span>
<span id="41">41</span>
<span id="42">42</span>
<span id="43">43</span>
<span id="44">44</span>
<span id="45">45</span>
<span id="46">46</span>
<span id="47">47</span>
<span id="48">48</span>
<span id="49">49</span>
<span id="50">50</span>
<span id="51">51</span>
<span id="52">52</span>
<span id="53">53</span>
<span id="54">54</span>
<span id="55">55</span>
<span id="56">56</span>
<span id="57">57</span>
<span id="58">58</span>
<span id="59">59</span>
<span id="60">60</span>
<span id="61">61</span>
<span id="62">62</span>
<span id="63">63</span>
<span id="64">64</span>
<span id="65">65</span>
<span id="66">66</span>
<span id="67">67</span>
<span id="68">68</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::error</span>;
<span class="kw">use</span> <span class="ident">std::fmt</span>;
<span class="kw">use</span> <span class="ident">std::io</span>;
<span class="doccomment">/// This is an error that could occur during proving or circuit synthesis.</span>
<span class="comment">// TODO: these errors need to be cleaned up</span>
<span class="attribute">#[<span class="ident">derive</span>(<span class="ident">Debug</span>)]</span>
<span class="kw">pub</span> <span class="kw">enum</span> <span class="ident">Error</span> {
<span class="doccomment">/// This is an error that can occur during synthesis of the circuit, for</span>
<span class="doccomment">/// example, when the witness is not present.</span>
<span class="ident">Synthesis</span>,
<span class="doccomment">/// The provided instances do not match the circuit parameters.</span>
<span class="ident">InvalidInstances</span>,
<span class="doccomment">/// The constraint system is not satisfied.</span>
<span class="ident">ConstraintSystemFailure</span>,
<span class="doccomment">/// Out of bounds index passed to a backend</span>
<span class="ident">BoundsFailure</span>,
<span class="doccomment">/// Opening error</span>
<span class="ident">Opening</span>,
<span class="doccomment">/// Transcript error</span>
<span class="ident">Transcript</span>(<span class="ident">io::Error</span>),
<span class="doccomment">/// Instance provided has more rows than supported by circuit</span>
<span class="ident">NotEnoughRowsAvailable</span>,
<span class="doccomment">/// Instance provided exceeds number of available rows</span>
<span class="ident">InstanceTooLarge</span>,
<span class="doccomment">/// Circuit synthesis requires global constants, but circuit configuration did not</span>
<span class="doccomment">/// call [`ConstraintSystem::enable_constant`] on fixed columns with sufficient space.</span>
<span class="doccomment">///</span>
<span class="doccomment">/// [`ConstraintSystem::enable_constant`]: crate::plonk::ConstraintSystem::enable_constant</span>
<span class="ident">NotEnoughColumnsForConstants</span>,
}
<span class="kw">impl</span> <span class="ident">From</span><span class="op">&lt;</span><span class="ident">io::Error</span><span class="op">&gt;</span> <span class="kw">for</span> <span class="ident">Error</span> {
<span class="kw">fn</span> <span class="ident">from</span>(<span class="ident">error</span>: <span class="ident">io::Error</span>) -&gt; <span class="self">Self</span> {
<span class="comment">// The only place we can get io::Error from is the transcript.</span>
<span class="ident">Error::Transcript</span>(<span class="ident">error</span>)
}
}
<span class="kw">impl</span> <span class="ident">fmt::Display</span> <span class="kw">for</span> <span class="ident">Error</span> {
<span class="kw">fn</span> <span class="ident">fmt</span>(<span class="kw-2">&amp;</span><span class="self">self</span>, <span class="ident">f</span>: <span class="kw-2">&amp;mut</span> <span class="ident">fmt::Formatter</span><span class="op">&lt;</span><span class="lifetime">&#39;_</span><span class="op">&gt;</span>) -&gt; <span class="ident">fmt::Result</span> {
<span class="kw">match</span> <span class="self">self</span> {
<span class="ident">Error::Synthesis</span> =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;General synthesis error&quot;</span>),
<span class="ident">Error::InvalidInstances</span> =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;Provided instances do not match the circuit&quot;</span>),
<span class="ident">Error::ConstraintSystemFailure</span> =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;The constraint system is not satisfied&quot;</span>),
<span class="ident">Error::BoundsFailure</span> =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;An out-of-bounds index was passed to the backend&quot;</span>),
<span class="ident">Error::Opening</span> =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;Multi-opening proof was invalid&quot;</span>),
<span class="ident">Error::Transcript</span>(<span class="ident">e</span>) =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;Transcript error: {}&quot;</span>, <span class="ident">e</span>),
<span class="ident">Error::NotEnoughRowsAvailable</span> =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;`k` is too small for the given circuit&quot;</span>),
<span class="ident">Error::InstanceTooLarge</span> =&gt; <span class="macro">write!</span>(<span class="ident">f</span>, <span class="string">&quot;Instance vectors are larger than the circuit&quot;</span>),
<span class="ident">Error::NotEnoughColumnsForConstants</span> =&gt; {
<span class="macro">write!</span>(
<span class="ident">f</span>,
<span class="string">&quot;Too few fixed columns are enabled for global constants usage&quot;</span>
)
}
}
}
}
<span class="kw">impl</span> <span class="ident">error::Error</span> <span class="kw">for</span> <span class="ident">Error</span> {
<span class="kw">fn</span> <span class="ident">source</span>(<span class="kw-2">&amp;</span><span class="self">self</span>) -&gt; <span class="prelude-ty">Option</span><span class="op">&lt;</span><span class="kw-2">&amp;</span>(<span class="kw">dyn</span> <span class="ident">error::Error</span> <span class="op">+</span> <span class="lifetime">&#39;static</span>)<span class="op">&gt;</span> {
<span class="kw">match</span> <span class="self">self</span> {
<span class="ident">Error::Transcript</span>(<span class="ident">e</span>) =&gt; <span class="prelude-val">Some</span>(<span class="ident">e</span>),
<span class="kw">_</span> =&gt; <span class="prelude-val">None</span>,
}
}
}
</code></pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="halo2" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>
<script src="../../../main.js"></script><script src="../../../source-script.js"></script><script src="../../../source-files.js"></script>
</body></html>

View File

@ -503,7 +503,7 @@
.<span class="ident">ok_or</span>(<span class="ident">Error::BoundsFailure</span>)<span class="question-mark">?</span>;
<span class="kw">for</span> <span class="ident">row</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">usable_rows</span>.<span class="ident">clone</span>().<span class="ident">skip</span>(<span class="ident">from_row</span>) {
<span class="ident">col</span>[<span class="ident">row</span>] <span class="op">=</span> <span class="ident">to</span>.<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>)<span class="question-mark">?</span>;
<span class="ident">col</span>[<span class="ident">row</span>] <span class="op">=</span> <span class="ident">to</span>.<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>)<span class="question-mark">?</span>;
}
<span class="prelude-val">Ok</span>(())

View File

@ -691,14 +691,6 @@
<span id="676">676</span>
<span id="677">677</span>
<span id="678">678</span>
<span id="679">679</span>
<span id="680">680</span>
<span id="681">681</span>
<span id="682">682</span>
<span id="683">683</span>
<span id="684">684</span>
<span id="685">685</span>
<span id="686">686</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident"><span class="kw">super</span>::<span class="kw">super</span></span>::{
<span class="ident">circuit::Expression</span>, <span class="ident">ChallengeBeta</span>, <span class="ident">ChallengeGamma</span>, <span class="ident">ChallengeTheta</span>, <span class="ident">ChallengeX</span>, <span class="ident">Error</span>,
<span class="ident">ProvingKey</span>,
@ -911,14 +903,10 @@
<span class="ident">commit_values</span>(<span class="kw-2">&amp;</span><span class="ident">permuted_table_expression</span>);
<span class="comment">// Hash permuted input commitment</span>
<span class="ident">transcript</span>
.<span class="ident">write_point</span>(<span class="ident">permuted_input_commitment</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_point</span>(<span class="ident">permuted_input_commitment</span>)<span class="question-mark">?</span>;
<span class="comment">// Hash permuted table commitment</span>
<span class="ident">transcript</span>
.<span class="ident">write_point</span>(<span class="ident">permuted_table_commitment</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_point</span>(<span class="ident">permuted_table_commitment</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_input_coset</span> <span class="op">=</span> <span class="ident">pk</span>.<span class="ident">vk</span>.<span class="ident">domain</span>.<span class="ident">coeff_to_extended</span>(<span class="ident">permuted_input_poly</span>.<span class="ident">clone</span>());
<span class="kw">let</span> <span class="ident">permuted_table_coset</span> <span class="op">=</span> <span class="ident">pk</span>.<span class="ident">vk</span>.<span class="ident">domain</span>.<span class="ident">coeff_to_extended</span>(<span class="ident">permuted_table_poly</span>.<span class="ident">clone</span>());
@ -1092,9 +1080,7 @@
<span class="kw">let</span> <span class="ident">product_coset</span> <span class="op">=</span> <span class="ident">pk</span>.<span class="ident">vk</span>.<span class="ident">domain</span>.<span class="ident">coeff_to_extended</span>(<span class="ident">z</span>.<span class="ident">clone</span>());
<span class="comment">// Hash product commitment</span>
<span class="ident">transcript</span>
.<span class="ident">write_point</span>(<span class="ident">product_commitment</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_point</span>(<span class="ident">product_commitment</span>)<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Committed</span>::<span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span> {
<span class="ident">permuted</span>: <span class="self">self</span>,
@ -1242,9 +1228,7 @@
.<span class="ident">chain</span>(<span class="prelude-val">Some</span>(<span class="ident">permuted_input_inv_eval</span>))
.<span class="ident">chain</span>(<span class="prelude-val">Some</span>(<span class="ident">permuted_table_eval</span>))
{
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="ident">eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="ident">eval</span>)<span class="question-mark">?</span>;
}
<span class="prelude-val">Ok</span>(<span class="ident">Evaluated</span> { <span class="ident">constructed</span>: <span class="self">self</span> })

View File

@ -221,22 +221,6 @@
<span id="206">206</span>
<span id="207">207</span>
<span id="208">208</span>
<span id="209">209</span>
<span id="210">210</span>
<span id="211">211</span>
<span id="212">212</span>
<span id="213">213</span>
<span id="214">214</span>
<span id="215">215</span>
<span id="216">216</span>
<span id="217">217</span>
<span id="218">218</span>
<span id="219">219</span>
<span id="220">220</span>
<span id="221">221</span>
<span id="222">222</span>
<span id="223">223</span>
<span id="224">224</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::iter</span>;
<span class="kw">use</span> <span class="ident"><span class="kw">super</span>::<span class="kw">super</span></span>::{
@ -279,12 +263,8 @@
<span class="kw-2">&amp;</span><span class="self">self</span>,
<span class="ident">transcript</span>: <span class="kw-2">&amp;mut</span> <span class="ident">T</span>,
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">PermutationCommitments</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">permuted_input_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_point</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_table_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_point</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_input_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_point</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_table_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_point</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">PermutationCommitments</span> {
<span class="ident">permuted_input_commitment</span>,
@ -301,9 +281,7 @@
<span class="self">self</span>,
<span class="ident">transcript</span>: <span class="kw-2">&amp;mut</span> <span class="ident">T</span>,
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Committed</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">product_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_point</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">product_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_point</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Committed</span> {
<span class="ident">permuted</span>: <span class="self">self</span>,
@ -317,21 +295,11 @@
<span class="self">self</span>,
<span class="ident">transcript</span>: <span class="kw-2">&amp;mut</span> <span class="ident">T</span>,
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Evaluated</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">product_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">product_next_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_input_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_input_inv_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_table_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">product_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">product_next_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_input_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_input_inv_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permuted_table_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Evaluated</span> {
<span class="ident">committed</span>: <span class="self">self</span>,

View File

@ -276,12 +276,12 @@
.<span class="ident">columns</span>
.<span class="ident">iter</span>()
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> <span class="ident">c</span> <span class="op">==</span> <span class="kw-2">&amp;</span><span class="ident">left_column</span>)
.<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>)<span class="question-mark">?</span>;
.<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">right_column</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">columns</span>
.<span class="ident">iter</span>()
.<span class="ident">position</span>(<span class="op">|</span><span class="ident">c</span><span class="op">|</span> <span class="ident">c</span> <span class="op">==</span> <span class="kw-2">&amp;</span><span class="ident">right_column</span>)
.<span class="ident">ok_or</span>(<span class="ident">Error::SynthesisError</span>)<span class="question-mark">?</span>;
.<span class="ident">ok_or</span>(<span class="ident">Error::Synthesis</span>)<span class="question-mark">?</span>;
<span class="comment">// Check bounds</span>
<span class="kw">if</span> <span class="ident">left_row</span> <span class="op">&gt;</span><span class="op">=</span> <span class="self">self</span>.<span class="ident">mapping</span>[<span class="ident">left_column</span>].<span class="ident">len</span>()

View File

@ -444,14 +444,6 @@
<span id="429">429</span>
<span id="430">430</span>
<span id="431">431</span>
<span id="432">432</span>
<span id="433">433</span>
<span id="434">434</span>
<span id="435">435</span>
<span id="436">436</span>
<span id="437">437</span>
<span id="438">438</span>
<span id="439">439</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">group</span>::{
<span class="ident">ff</span>::{<span class="ident">BatchInvert</span>, <span class="ident">Field</span>},
<span class="ident">Curve</span>,
@ -627,9 +619,7 @@
<span class="ident">permutation_product_commitment_projective</span>.<span class="ident">to_affine</span>();
<span class="comment">// Hash the permutation product commitment</span>
<span class="ident">transcript</span>
.<span class="ident">write_point</span>(<span class="ident">permutation_product_commitment</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_point</span>(<span class="ident">permutation_product_commitment</span>)<span class="question-mark">?</span>;
<span class="ident">sets</span>.<span class="ident">push</span>(<span class="ident">CommittedSet</span> {
<span class="ident">permutation_product_poly</span>,
@ -784,9 +774,7 @@
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="comment">// Hash permutation evals</span>
<span class="kw">for</span> <span class="ident">eval</span> <span class="kw">in</span> <span class="self">self</span>.<span class="ident">polys</span>.<span class="ident">iter</span>().<span class="ident">map</span>(<span class="op">|</span><span class="ident">poly</span><span class="op">|</span> <span class="ident">eval_polynomial</span>(<span class="ident">poly</span>, <span class="kw-2">*</span><span class="ident">x</span>)) {
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="ident">eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="ident">eval</span>)<span class="question-mark">?</span>;
}
<span class="prelude-val">Ok</span>(())
@ -819,9 +807,7 @@
.<span class="ident">chain</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">permutation_product_eval</span>))
.<span class="ident">chain</span>(<span class="prelude-val">Some</span>(<span class="kw-2">&amp;</span><span class="ident">permutation_product_next_eval</span>))
{
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)<span class="question-mark">?</span>;
}
<span class="comment">// If we have any remaining sets to process, evaluate this set at omega^u</span>
@ -833,9 +819,7 @@
<span class="ident">domain</span>.<span class="ident">rotate_omega</span>(<span class="kw-2">*</span><span class="ident">x</span>, <span class="ident">Rotation</span>(<span class="op">-</span>((<span class="ident">blinding_factors</span> <span class="op">+</span> <span class="number">1</span>) <span class="kw">as</span> <span class="ident">i32</span>))),
);
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="ident">permutation_product_last_eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="ident">permutation_product_last_eval</span>)<span class="question-mark">?</span>;
}
}
}

View File

@ -265,14 +265,6 @@
<span id="250">250</span>
<span id="251">251</span>
<span id="252">252</span>
<span id="253">253</span>
<span id="254">254</span>
<span id="255">255</span>
<span id="256">256</span>
<span id="257">257</span>
<span id="258">258</span>
<span id="259">259</span>
<span id="260">260</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">ff::Field</span>;
<span class="kw">use</span> <span class="ident">std::iter</span>;
@ -319,7 +311,7 @@
<span class="kw">let</span> <span class="ident">permutation_product_commitments</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">columns</span>
.<span class="ident">chunks</span>(<span class="ident">chunk_len</span>)
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">transcript</span>.<span class="ident">read_point</span>().<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>))
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">transcript</span>.<span class="ident">read_point</span>())
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Committed</span> {
@ -336,7 +328,7 @@
<span class="kw">let</span> <span class="ident">permutation_evals</span> <span class="op">=</span> <span class="self">self</span>
.<span class="ident">commitments</span>
.<span class="ident">iter</span>()
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>().<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>))
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>())
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">CommonEvaluated</span> { <span class="ident">permutation_evals</span> })
@ -353,18 +345,10 @@
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">iter</span> <span class="op">=</span> <span class="self">self</span>.<span class="ident">permutation_product_commitments</span>.<span class="ident">into_iter</span>();
<span class="kw">while</span> <span class="kw">let</span> <span class="prelude-val">Some</span>(<span class="ident">permutation_product_commitment</span>) <span class="op">=</span> <span class="ident">iter</span>.<span class="ident">next</span>() {
<span class="kw">let</span> <span class="ident">permutation_product_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permutation_product_next_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permutation_product_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permutation_product_next_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">permutation_product_last_eval</span> <span class="op">=</span> <span class="kw">if</span> <span class="ident">iter</span>.<span class="ident">len</span>() <span class="op">&gt;</span> <span class="number">0</span> {
<span class="prelude-val">Some</span>(
<span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>,
)
<span class="prelude-val">Some</span>(<span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>)
} <span class="kw">else</span> {
<span class="prelude-val">None</span>
};

View File

@ -616,18 +616,6 @@
<span id="601">601</span>
<span id="602">602</span>
<span id="603">603</span>
<span id="604">604</span>
<span id="605">605</span>
<span id="606">606</span>
<span id="607">607</span>
<span id="608">608</span>
<span id="609">609</span>
<span id="610">610</span>
<span id="611">611</span>
<span id="612">612</span>
<span id="613">613</span>
<span id="614">614</span>
<span id="615">615</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">ff::Field</span>;
<span class="kw">use</span> <span class="ident">group::Curve</span>;
<span class="kw">use</span> <span class="ident">std::iter</span>;
@ -673,14 +661,12 @@
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span>(), <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">for</span> <span class="ident">instance</span> <span class="kw">in</span> <span class="ident">instances</span>.<span class="ident">iter</span>() {
<span class="kw">if</span> <span class="ident">instance</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">pk</span>.<span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">num_instance_columns</span> {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::IncompatibleParams</span>);
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::InvalidInstances</span>);
}
}
<span class="comment">// Hash verification key into transcript</span>
<span class="ident">pk</span>.<span class="ident">vk</span>
.<span class="ident">hash_into</span>(<span class="ident">transcript</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">pk</span>.<span class="ident">vk</span>.<span class="ident">hash_into</span>(<span class="ident">transcript</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">domain</span> <span class="op">=</span> <span class="kw-2">&amp;</span><span class="ident">pk</span>.<span class="ident">vk</span>.<span class="ident">domain</span>;
<span class="kw">let</span> <span class="kw-2">mut</span> <span class="ident">meta</span> <span class="op">=</span> <span class="ident">ConstraintSystem::default</span>();
@ -724,9 +710,7 @@
<span class="ident">drop</span>(<span class="ident">instance_commitments_projective</span>);
<span class="kw">for</span> <span class="ident">commitment</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">instance_commitments</span> {
<span class="ident">transcript</span>
.<span class="ident">common_point</span>(<span class="kw-2">*</span><span class="ident">commitment</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">common_point</span>(<span class="kw-2">*</span><span class="ident">commitment</span>)<span class="question-mark">?</span>;
}
<span class="kw">let</span> <span class="ident">instance_polys</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">instance_values</span>
@ -933,9 +917,7 @@
<span class="ident">drop</span>(<span class="ident">advice_commitments_projective</span>);
<span class="kw">for</span> <span class="ident">commitment</span> <span class="kw">in</span> <span class="kw-2">&amp;</span><span class="ident">advice_commitments</span> {
<span class="ident">transcript</span>
.<span class="ident">write_point</span>(<span class="kw-2">*</span><span class="ident">commitment</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_point</span>(<span class="kw-2">*</span><span class="ident">commitment</span>)<span class="question-mark">?</span>;
}
<span class="kw">let</span> <span class="ident">advice_polys</span>: <span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">advice</span>
@ -1128,9 +1110,7 @@
<span class="comment">// Hash each instance column evaluation</span>
<span class="kw">for</span> <span class="ident">eval</span> <span class="kw">in</span> <span class="ident">instance_evals</span>.<span class="ident">iter</span>() {
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)<span class="question-mark">?</span>;
}
}
@ -1150,9 +1130,7 @@
<span class="comment">// Hash each advice column evaluation</span>
<span class="kw">for</span> <span class="ident">eval</span> <span class="kw">in</span> <span class="ident">advice_evals</span>.<span class="ident">iter</span>() {
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)<span class="question-mark">?</span>;
}
}
@ -1167,9 +1145,7 @@
<span class="comment">// Hash each fixed column evaluation</span>
<span class="kw">for</span> <span class="ident">eval</span> <span class="kw">in</span> <span class="ident">fixed_evals</span>.<span class="ident">iter</span>() {
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="kw-2">*</span><span class="ident">eval</span>)<span class="question-mark">?</span>;
}
<span class="kw">let</span> <span class="ident">vanishing</span> <span class="op">=</span> <span class="ident">vanishing</span>.<span class="ident">evaluate</span>(<span class="ident">x</span>, <span class="ident">xn</span>, <span class="ident">domain</span>, <span class="ident">transcript</span>)<span class="question-mark">?</span>;
@ -1241,7 +1217,7 @@
<span class="comment">// We query the h(X) polynomial at x</span>
.<span class="ident">chain</span>(<span class="ident">vanishing</span>.<span class="ident">open</span>(<span class="ident">x</span>));
<span class="ident">multiopen::create_proof</span>(<span class="ident">params</span>, <span class="ident">transcript</span>, <span class="ident">instances</span>).<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::OpeningError</span>)
<span class="ident">multiopen::create_proof</span>(<span class="ident">params</span>, <span class="ident">transcript</span>, <span class="ident">instances</span>).<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::Opening</span>)
}
</code></pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="halo2" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>

View File

@ -172,12 +172,6 @@
<span id="157">157</span>
<span id="158">158</span>
<span id="159">159</span>
<span id="160">160</span>
<span id="161">161</span>
<span id="162">162</span>
<span id="163">163</span>
<span id="164">164</span>
<span id="165">165</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::iter</span>;
<span class="kw">use</span> <span class="ident">ff::Field</span>;
@ -228,9 +222,7 @@
<span class="comment">// Commit</span>
<span class="kw">let</span> <span class="ident">c</span> <span class="op">=</span> <span class="ident">params</span>.<span class="ident">commit</span>(<span class="kw-2">&amp;</span><span class="ident">random_poly</span>, <span class="ident">random_blind</span>).<span class="ident">to_affine</span>();
<span class="ident">transcript</span>
.<span class="ident">write_point</span>(<span class="ident">c</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_point</span>(<span class="ident">c</span>)<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Committed</span> {
<span class="ident">random_poly</span>,
@ -277,9 +269,7 @@
<span class="comment">// Hash each h(X) piece</span>
<span class="kw">for</span> <span class="ident">c</span> <span class="kw">in</span> <span class="ident">h_commitments</span>.<span class="ident">iter</span>() {
<span class="ident">transcript</span>
.<span class="ident">write_point</span>(<span class="kw-2">*</span><span class="ident">c</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_point</span>(<span class="kw-2">*</span><span class="ident">c</span>)<span class="question-mark">?</span>;
}
<span class="prelude-val">Ok</span>(<span class="ident">Constructed</span> {
@ -313,9 +303,7 @@
});
<span class="kw">let</span> <span class="ident">random_eval</span> <span class="op">=</span> <span class="ident">eval_polynomial</span>(<span class="kw-2">&amp;</span><span class="self">self</span>.<span class="ident">committed</span>.<span class="ident">random_poly</span>, <span class="kw-2">*</span><span class="ident">x</span>);
<span class="ident">transcript</span>
.<span class="ident">write_scalar</span>(<span class="ident">random_eval</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">transcript</span>.<span class="ident">write_scalar</span>(<span class="ident">random_eval</span>)<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Evaluated</span> {
<span class="ident">h_poly</span>,

View File

@ -152,11 +152,6 @@
<span id="137">137</span>
<span id="138">138</span>
<span id="139">139</span>
<span id="140">140</span>
<span id="141">141</span>
<span id="142">142</span>
<span id="143">143</span>
<span id="144">144</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">std::iter</span>;
<span class="kw">use</span> <span class="ident">ff::Field</span>;
@ -203,9 +198,7 @@
<span class="op">&gt;</span>(
<span class="ident">transcript</span>: <span class="kw-2">&amp;mut</span> <span class="ident">T</span>,
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Committed</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">random_poly_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_point</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">random_poly_commitment</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_point</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Committed</span> {
<span class="ident">random_poly_commitment</span>,
@ -223,8 +216,7 @@
<span class="ident">transcript</span>: <span class="kw-2">&amp;mut</span> <span class="ident">T</span>,
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Constructed</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="comment">// Obtain a commitment to h(X) in the form of multiple pieces of degree n - 1</span>
<span class="kw">let</span> <span class="ident">h_commitments</span> <span class="op">=</span> <span class="ident">read_n_points</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">domain</span>.<span class="ident">get_quotient_poly_degree</span>())
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">h_commitments</span> <span class="op">=</span> <span class="ident">read_n_points</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">domain</span>.<span class="ident">get_quotient_poly_degree</span>())<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">Constructed</span> {
<span class="ident">h_commitments</span>,
@ -238,9 +230,7 @@
<span class="self">self</span>,
<span class="ident">transcript</span>: <span class="kw-2">&amp;mut</span> <span class="ident">T</span>,
) -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">PartiallyEvaluated</span><span class="op">&lt;</span><span class="ident">C</span><span class="op">&gt;</span>, <span class="ident">Error</span><span class="op">&gt;</span> {
<span class="kw">let</span> <span class="ident">random_eval</span> <span class="op">=</span> <span class="ident">transcript</span>
.<span class="ident">read_scalar</span>()
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">random_eval</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">read_scalar</span>()<span class="question-mark">?</span>;
<span class="prelude-val">Ok</span>(<span class="ident">PartiallyEvaluated</span> {
<span class="ident">h_commitments</span>: <span class="self">self</span>.<span class="ident">h_commitments</span>,

View File

@ -302,16 +302,6 @@
<span id="287">287</span>
<span id="288">288</span>
<span id="289">289</span>
<span id="290">290</span>
<span id="291">291</span>
<span id="292">292</span>
<span id="293">293</span>
<span id="294">294</span>
<span id="295">295</span>
<span id="296">296</span>
<span id="297">297</span>
<span id="298">298</span>
<span id="299">299</span>
</pre><pre class="rust"><code><span class="kw">use</span> <span class="ident">ff::Field</span>;
<span class="kw">use</span> <span class="ident">group::Curve</span>;
<span class="kw">use</span> <span class="ident">std::iter</span>;
@ -338,7 +328,7 @@
<span class="comment">// Check that instances matches the expected number of instance columns</span>
<span class="kw">for</span> <span class="ident">instances</span> <span class="kw">in</span> <span class="ident">instances</span>.<span class="ident">iter</span>() {
<span class="kw">if</span> <span class="ident">instances</span>.<span class="ident">len</span>() <span class="op">!</span><span class="op">=</span> <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">num_instance_columns</span> {
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::IncompatibleParams</span>);
<span class="kw">return</span> <span class="prelude-val">Err</span>(<span class="ident">Error::InvalidInstances</span>);
}
}
@ -364,22 +354,19 @@
<span class="kw">let</span> <span class="ident">num_proofs</span> <span class="op">=</span> <span class="ident">instance_commitments</span>.<span class="ident">len</span>();
<span class="comment">// Hash verification key into transcript</span>
<span class="ident">vk</span>.<span class="ident">hash_into</span>(<span class="ident">transcript</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="ident">vk</span>.<span class="ident">hash_into</span>(<span class="ident">transcript</span>)<span class="question-mark">?</span>;
<span class="kw">for</span> <span class="ident">instance_commitments</span> <span class="kw">in</span> <span class="ident">instance_commitments</span>.<span class="ident">iter</span>() {
<span class="comment">// Hash the instance (external) commitments into the transcript</span>
<span class="kw">for</span> <span class="ident">commitment</span> <span class="kw">in</span> <span class="ident">instance_commitments</span> {
<span class="ident">transcript</span>
.<span class="ident">common_point</span>(<span class="kw-2">*</span><span class="ident">commitment</span>)
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>
<span class="ident">transcript</span>.<span class="ident">common_point</span>(<span class="kw-2">*</span><span class="ident">commitment</span>)<span class="question-mark">?</span>
}
}
<span class="kw">let</span> <span class="ident">advice_commitments</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">num_proofs</span>)
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span> {
<span class="comment">// Hash the prover&#39;s advice commitments into the transcript</span>
<span class="ident">read_n_points</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">num_advice_columns</span>).<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)
<span class="ident">read_n_points</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">num_advice_columns</span>)
})
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
@ -432,21 +419,14 @@
<span class="comment">// satisfied with high probability.</span>
<span class="kw">let</span> <span class="ident">x</span>: <span class="ident">ChallengeX</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span> <span class="op">=</span> <span class="ident">transcript</span>.<span class="ident">squeeze_challenge_scalar</span>();
<span class="kw">let</span> <span class="ident">instance_evals</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">num_proofs</span>)
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span> {
<span class="ident">read_n_scalars</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">instance_queries</span>.<span class="ident">len</span>())
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)
})
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span> { <span class="ident">read_n_scalars</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">instance_queries</span>.<span class="ident">len</span>()) })
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">advice_evals</span> <span class="op">=</span> (<span class="number">0</span>..<span class="ident">num_proofs</span>)
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span> {
<span class="ident">read_n_scalars</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">advice_queries</span>.<span class="ident">len</span>())
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)
})
.<span class="ident">map</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> -&gt; <span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span> { <span class="ident">read_n_scalars</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">advice_queries</span>.<span class="ident">len</span>()) })
.<span class="ident">collect</span>::<span class="op">&lt;</span><span class="prelude-ty">Result</span><span class="op">&lt;</span><span class="ident">Vec</span><span class="op">&lt;</span><span class="kw">_</span><span class="op">&gt;</span>, <span class="kw">_</span><span class="op">&gt;</span><span class="op">&gt;</span>()<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">fixed_evals</span> <span class="op">=</span> <span class="ident">read_n_scalars</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">fixed_queries</span>.<span class="ident">len</span>())
.<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::TranscriptError</span>)<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">fixed_evals</span> <span class="op">=</span> <span class="ident">read_n_scalars</span>(<span class="ident">transcript</span>, <span class="ident">vk</span>.<span class="ident">cs</span>.<span class="ident">fixed_queries</span>.<span class="ident">len</span>())<span class="question-mark">?</span>;
<span class="kw">let</span> <span class="ident">vanishing</span> <span class="op">=</span> <span class="ident">vanishing</span>.<span class="ident">evaluate_after_x</span>(<span class="ident">transcript</span>)<span class="question-mark">?</span>;
@ -609,7 +589,7 @@
<span class="comment">// We are now convinced the circuit is satisfied so long as the</span>
<span class="comment">// polynomial commitments open to the correct values.</span>
<span class="ident">multiopen::verify_proof</span>(<span class="ident">params</span>, <span class="ident">transcript</span>, <span class="ident">queries</span>, <span class="ident">msm</span>).<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::OpeningError</span>)
<span class="ident">multiopen::verify_proof</span>(<span class="ident">params</span>, <span class="ident">transcript</span>, <span class="ident">queries</span>, <span class="ident">msm</span>).<span class="ident">map_err</span>(<span class="op">|</span><span class="kw">_</span><span class="op">|</span> <span class="ident">Error::Opening</span>)
}
</code></pre></div>
</section><section id="search" class="content hidden"></section><div id="rustdoc-vars" data-root-path="../../../" data-current-crate="halo2" data-search-index-js="../../../search-index.js" data-search-js="../../../search.js"></div>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -147,6 +147,9 @@ granular error messages that indicate which specific constraint (if any) is not
<h2 id="circuit-visualizations"><a class="header" href="#circuit-visualizations">Circuit visualizations</a></h2>
<p>The <code>dev-graph</code> feature flag exposes several helper methods for creating graphical
representations of circuits.</p>
<p>On Debian systems, you will need the following additional packages:</p>
<pre><code class="language-plaintext">sudo apt install cmake libexpat1-dev libfreetype6-dev
</code></pre>
<h3 id="circuit-layout"><a class="header" href="#circuit-layout">Circuit layout</a></h3>
<p><code>halo2::dev::CircuitLayout</code> renders the circuit layout as a grid:</p>
<pre><code class="language-rust ignore no_run">fn main() {

View File

@ -320,7 +320,7 @@ impl&lt;F: FieldExt&gt; NumericInstructions&lt;F&gt; for FieldChip&lt;F&gt; {
|| &quot;private input&quot;,
config.advice[0],
0,
|| value.ok_or(Error::SynthesisError),
|| value.ok_or(Error::Synthesis),
)?;
num = Some(Number { cell, value });
Ok(())
@ -381,13 +381,13 @@ impl&lt;F: FieldExt&gt; NumericInstructions&lt;F&gt; for FieldChip&lt;F&gt; {
|| &quot;lhs&quot;,
config.advice[0],
0,
|| a.value.ok_or(Error::SynthesisError),
|| a.value.ok_or(Error::Synthesis),
)?;
let rhs = region.assign_advice(
|| &quot;rhs&quot;,
config.advice[1],
0,
|| b.value.ok_or(Error::SynthesisError),
|| b.value.ok_or(Error::Synthesis),
)?;
region.constrain_equal(a.cell, lhs)?;
region.constrain_equal(b.cell, rhs)?;
@ -398,7 +398,7 @@ impl&lt;F: FieldExt&gt; NumericInstructions&lt;F&gt; for FieldChip&lt;F&gt; {
|| &quot;lhs * rhs&quot;,
config.advice[0],
1,
|| value.ok_or(Error::SynthesisError),
|| value.ok_or(Error::Synthesis),
)?;
// Finally, we return a variable representing the output,