Skip to content

Commit

Permalink
udpate template
Browse files Browse the repository at this point in the history
  • Loading branch information
mimoo committed Oct 15, 2024
1 parent 330250b commit 09acf62
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 62 deletions.
4 changes: 2 additions & 2 deletions source/starknet/fri.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
title: "Starknet FRI Verifier"
abstract: "<p>The <strong>Fast Reed-Solomon Interactive Oracle Proofs of Proximity (FRI)</strong> is a cryptographic protocol that allows a prover to prove to a verifier (in an interactive, or non-interactive fashion) that a hash-based commitment (e.g. a Merkle tree) of a vector of values represent the evaluations of a polynomial of some known degree. (That is, the vector committed is not just a bunch of uncorrelated values.) The algorithm is often referred to as a \"low degree\" test, as the degree of the underlying polynomial is expected to be much lower than the degree of the field the polynomial is defined over. Furthermore, the algorithm can also be used to prove the evaluation of a committed polynomial, an application that is often called FRI-PCS. We discuss both algorithms in this document, as well as how to batch multiple instances of the two algorithms.</p>
abstract: "<p>The <strong>Fast Reed-Solomon Interactive Oracle Proofs of Proximity (FRI)</strong> is a cryptographic protocol that allows a prover to prove to a verifier (in an interactive, or non-interactive fashion) that a hash-based commitment (e.g. a Merkle tree of evaluations) of a vector of values represent the evaluations of a polynomial of some known degree. (That is, the vector committed is not just a bunch of uncorrelated values.) The algorithm is often referred to as a \"low degree\" test, as the degree of the underlying polynomial is expected to be much lower than the degree of the field the polynomial is defined over. Furthermore, the algorithm can also be used to prove the evaluation of a committed polynomial, an application that is often called FRI-PCS. We discuss both algorithms in this document, as well as how to batch multiple instances of the two algorithms.</p>
<p>For more information about the original construction, see <a href=\"https://eccc.weizmann.ac.il/report/2017/134/\">Fast Reed-Solomon Interactive Oracle Proofs of Proximity</a>. This document is about the specific instantiation of FRI and FRI-PCS as used by the StarkNet protocol.</p>
Expand Down Expand Up @@ -741,7 +741,7 @@ struct FriVerificationStateVariable {

We give more detail to each function below.

**`fri_commit(prologue, cfg)`
**`fri_commit(prologue, cfg)`**.

1. Initialize the channel with a prologue (See the [Channel](#channel) section). A prologue contains any context relevant to this proof.
1. Produce the FRI commits according to the [Commit Phase](#commit-phase) section.
Expand Down
107 changes: 47 additions & 60 deletions template.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
<!DOCTYPE html>
<html>
<head>

<head>
<meta charset="utf-8" />
<title>$title</title>
<script
src="https://www.w3.org/Tools/respec/respec-w3c"
class="remove"
defer
></script>
<!-- <script>
<script src="https://www.w3.org/Tools/respec/respec-w3c" class="remove" defer></script>
<!-- <script>
MathJax = {
tex: {
inlineMath: [
Expand All @@ -24,27 +21,27 @@

<!-- syntax highlighting -->
<script class='remove'>
async function loadRust() {
//this is the function you call in 'preProcess', to load the highlighter
const worker = await new Promise(resolve => {
require(["core/worker"], ({ worker }) => resolve(worker));
});
const action = "highlight-load-lang";
const langURL =
"https://gistcdn.githack.com/mimoo/a9e28fc565dddb369477e8bd34e6a1ae/raw/d8a7057fe9c7140f7ef5972b333716d9933fa29b/hljs-rust.js";
const propName = "hljsDefineRust"; // This funtion is defined in the highlighter being loaded
const lang = "language-rust"; // this is the class you use to identify the language
worker.postMessage({ action, langURL, propName, lang });
return new Promise(resolve => {
worker.addEventListener("message", function listener({ data }) {
const { action: responseAction, lang: responseLang } = data;
if (responseAction === action && responseLang === lang) {
worker.removeEventListener("message", listener);
resolve();
}
});
});
}
async function loadRust() {
//this is the function you call in 'preProcess', to load the highlighter
const worker = await new Promise(resolve => {
require(["core/worker"], ({ worker }) => resolve(worker));
});
const action = "highlight-load-lang";
const langURL =
"https://gistcdn.githack.com/mimoo/a9e28fc565dddb369477e8bd34e6a1ae/raw/d8a7057fe9c7140f7ef5972b333716d9933fa29b/hljs-rust.js";
const propName = "hljsDefineRust"; // This funtion is defined in the highlighter being loaded
const lang = "language-rust"; // this is the class you use to identify the language
worker.postMessage({ action, langURL, propName, lang });
return new Promise(resolve => {
worker.addEventListener("message", function listener({ data }) {
const { action: responseAction, lang: responseLang } = data;
if (responseAction === action && responseLang === lang) {
worker.removeEventListener("message", listener);
resolve();
}
});
});
}

async function loadPython() {
const worker = await new Promise(resolve => {
Expand All @@ -54,7 +51,7 @@
const langURL =
"https://gistcdn.githack.com/mimoo/fd9652b0c0d64bfc9f8cae69c72030b1/raw/2315322f87ba81c92c22477a05da6c4181f02df2/respec-py.js"; // URL to Python highlighter
const propName = "hljsDefinePython"; // Adjust this if needed
const lang = "language-py";
const lang = "language-py";
worker.postMessage({ action, langURL, propName, lang });
return new Promise(resolve => {
worker.addEventListener("message", function listener({ data }) {
Expand All @@ -66,41 +63,31 @@
});
}

var respecConfig = {
preProcess: [loadRust, loadPython],
specStatus: "base",
editors: [
// {% for editor in editors %}
{
name: "{{editor.0}}",
url: "{{editor.1}}",
},
// {% endfor %}
],
github: "zksecurity/RFCs",
shortName: "{{short_name}}",
// format: "markdown",
};
var respecConfig = {
preProcess: [loadRust, loadPython],
specStatus: "unofficial",
latestVersion: null,
editors: [
{
name: "David Wong",
url: "https://www.zksecurity.xyz",
},
],
github: "zksecurity/RFCs",
shortName: "starknet-fri",
};
</script>

// All config options at https://respec.org/docs/
// var respecConfig = {
// specStatus: "ED",
// editors: [{ name: "David Wong", url: "https://www.zksecurity.xyz" }],
// github: "zksecurity/RFCs",
// shortName: "dahut",
// xref: "web-platform",
// group: "my-working-group",
// };
</script>
</head>

</head>
<body>
<body>
<section id="abstract">
<p>$abstract</p>
<p>$abstract</p>
</section>
<section id="sotd">
<p>$sotd</p>
<p>$sotd</p>
</section>
$spec
</body>
</html>
</body>

</html>

0 comments on commit 09acf62

Please sign in to comment.