Skip to content

Commit

Permalink
Merge pull request #934 from o1-labs/feature/hf-audit-recursion
Browse files Browse the repository at this point in the history
Audit recursion section
  • Loading branch information
ymekuria authored May 30, 2024
2 parents e450ca6 + d6b3bcb commit 671f89e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/zkapps/o1js/recursion.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,10 @@ const SimpleProgram = ZkProgram({
publicInput: Field,

methods: {
run: {
run: {
privateInputs: [],

method(publicInput: Field) {
async method(publicInput: Field) {
publicInput.assertEquals(Field(0));
},
}
Expand Down Expand Up @@ -111,15 +111,15 @@ const AddOne = ZkProgram({
baseCase: {
privateInputs: [],

method(publicInput: Field) {
async method(publicInput: Field) {
publicInput.assertEquals(Field(0));
},
},

step: {
privateInputs: [SelfProof],

method(publicInput: Field, earlierProof: SelfProof<Field, void>) {
async method(publicInput: Field, earlierProof: SelfProof<Field, void>) {
earlierProof.verify();
earlierProof.publicInput.add(1).assertEquals(publicInput);
},
Expand Down Expand Up @@ -177,13 +177,13 @@ let RollupAdd = ZkProgram({
baseCase: {
privateInputs: [],

method(publicInput: Field) { },
async method(publicInput: Field) { },
},

step: {
privateInputs: [SelfProof, SelfProof],

method(
async method(
publicInput: Field,
left: SelfProof<Field, void>,
right: SelfProof<Field, void>
Expand Down

0 comments on commit 671f89e

Please sign in to comment.