-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connect public kernel circuit and processor to sequencer (#394)
- Loading branch information
1 parent
fd8da14
commit 12e44a2
Showing
8 changed files
with
102 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
yarn-project/sequencer-client/src/simulator/mock_public_kernel.ts
This file was deleted.
Oops, something went wrong.
22 changes: 22 additions & 0 deletions
22
yarn-project/sequencer-client/src/simulator/public_kernel.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import { | ||
PublicKernelInputs, | ||
PublicKernelInputsNoPreviousKernel, | ||
PublicKernelPublicInputs, | ||
simulatePublicKernelCircuit, | ||
simulatePublicKernelCircuitNoPreviousKernel, | ||
} from '@aztec/circuits.js'; | ||
import { PublicKernelCircuitSimulator } from './index.js'; | ||
|
||
export class WasmPublicKernelCircuitSimulator implements PublicKernelCircuitSimulator { | ||
publicKernelCircuitNoInput(inputs: PublicKernelInputsNoPreviousKernel): Promise<PublicKernelPublicInputs> { | ||
return simulatePublicKernelCircuitNoPreviousKernel(inputs); | ||
} | ||
publicKernelCircuitPrivateInput(inputs: PublicKernelInputs): Promise<PublicKernelPublicInputs> { | ||
if (!inputs.previousKernel.publicInputs.isPrivateKernel) throw new Error(`Expected private kernel previous inputs`); | ||
return simulatePublicKernelCircuit(inputs); | ||
} | ||
publicKernelCircuitNonFirstIteration(inputs: PublicKernelInputs): Promise<PublicKernelPublicInputs> { | ||
if (inputs.previousKernel.publicInputs.isPrivateKernel) throw new Error(`Expected public kernel previous inputs`); | ||
return simulatePublicKernelCircuit(inputs); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters