Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: acir-simulator -> simulator #4439

Merged
merged 5 commits into from
Feb 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
191 changes: 0 additions & 191 deletions barretenberg/cpp/pil/avm/avm.pil

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ To generate the environment, the simulator gets the blockheader from the [PXE da

Once the execution environment is created, `execute_unconstrained_function` is invoked:

#include_code execute_unconstrained_function yarn-project/acir-simulator/src/client/unconstrained_execution.ts typescript
#include_code execute_unconstrained_function yarn-project/simulator/src/client/unconstrained_execution.ts typescript

This:

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ yarn workspace @aztec/noir-contracts build:contracts
echo "Copying account contracts..."
yarn workspace @aztec/accounts build:copy-contracts
# Build protocol circuits. TODO: move pre yarn-project.
echo "Building contracts from noir-protocol-circuits..."
echo "Building circuits from noir-protocol-circuits..."
yarn workspace @aztec/noir-protocol-circuits build

echo -e "\033[1mBuilding all packages...\033[0m"
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/deploy_npm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ deploy_package noir-compiler
deploy_package noir-contracts
deploy_package merkle-tree
deploy_package noir-protocol-circuits
deploy_package acir-simulator
deploy_package simulator
deploy_package key-store
deploy_package pxe
deploy_package archiver
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/end-to-end/src/e2e_block_building.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ describe('e2e_block_building', () => {

it('drops tx with private nullifier already emitted from public on the same block', async () => {
const secret = Fr.random();
// See yarn-project/acir-simulator/src/public/index.test.ts 'Should be able to create a nullifier from the public context'
// See yarn-project/simulator/src/public/index.test.ts 'Should be able to create a nullifier from the public context'
const emittedPublicNullifier = pedersenHash([new Fr(140), secret].map(a => a.toBuffer()));

const calls = [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ contract ImportTest {

// Calls the testCodeGen on the Test contract at the target address
// Used for testing calling a function with arguments of multiple types
// See yarn-project/acir-simulator/src/client/private_execution.ts
// See yarn-project/simulator/src/client/private_execution.ts
// See yarn-project/end-to-end/src/e2e_nested_contract.test.ts
#[aztec(private)]
fn main(target: AztecAddress) -> Field {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ contract Test {
}

// Test codegen for Aztec.nr interfaces
// See yarn-project/acir-simulator/src/client/private_execution.test.ts 'nested calls through autogenerated interface'
// See yarn-project/simulator/src/client/private_execution.test.ts 'nested calls through autogenerated interface'
// Note; this function is deliberately NOT annotated with #[aztec(private)] due to its use in tests
fn test_code_gen(
inputs: PrivateContextInputs,
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"workspaces": [
"accounts",
"acir-simulator",
"simulator",
"archiver",
"aztec-faucet",
"aztec-node",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

### Main Components in an PXE Service

- [Acir Simulator](../acir-simulator/)
- [Simulator](../simulator/)
- [Key Store](../key-store/)
- [Account State](./src/account_state/account_state.ts): It coordinates other components to synchronize and decrypt data, simulate transactions, and generate kernel proofs, for a specific account.

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
"workerThreads": true
},
"dependencies": {
"@aztec/acir-simulator": "workspace:^",
"@aztec/circuit-types": "workspace:^",
"@aztec/circuits.js": "workspace:^",
"@aztec/ethereum": "workspace:^",
Expand All @@ -42,6 +41,7 @@
"@aztec/kv-store": "workspace:^",
"@aztec/noir-compiler": "workspace:^",
"@aztec/noir-protocol-circuits": "workspace:^",
"@aztec/simulator": "workspace:^",
"@aztec/types": "workspace:^",
"koa": "^2.14.2",
"koa-router": "^12.0.0",
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/contract_data_oracle/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ContractClassNotFoundError, ContractNotFoundError } from '@aztec/acir-simulator';
import { ContractDatabase } from '@aztec/circuit-types';
import {
AztecAddress,
Expand All @@ -9,6 +8,7 @@ import {
} from '@aztec/circuits.js';
import { FunctionDebugMetadata, FunctionSelector } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';
import { ContractClassNotFoundError, ContractNotFoundError } from '@aztec/simulator';
import { ContractClass, ContractInstance } from '@aztec/types/contracts';

import { ContractArtifactDatabase } from '../database/contracts/contract_artifact_db.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/database/note_dao.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { NoteData } from '@aztec/acir-simulator';
import { Note, TxHash } from '@aztec/circuit-types';
import { AztecAddress, Fr, Point, PublicKey } from '@aztec/circuits.js';
import { toBigIntBE, toBufferBE } from '@aztec/foundation/bigint-buffer';
import { BufferReader } from '@aztec/foundation/serialize';
import { NoteData } from '@aztec/simulator';

/**
* A note with contextual data.
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/kernel_prover/kernel_prover.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ExecutionResult, NoteAndSlot } from '@aztec/acir-simulator';
import { FunctionL2Logs, Note } from '@aztec/circuit-types';
import {
FunctionData,
Expand All @@ -22,6 +21,7 @@ import { makeTxRequest } from '@aztec/circuits.js/factories';
import { makeTuple } from '@aztec/foundation/array';
import { AztecAddress } from '@aztec/foundation/aztec-address';
import { Fr } from '@aztec/foundation/fields';
import { ExecutionResult, NoteAndSlot } from '@aztec/simulator';

import { mock } from 'jest-mock-extended';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/kernel_prover/kernel_prover.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ExecutionResult, NoteAndSlot } from '@aztec/acir-simulator';
import {
AztecAddress,
CallRequest,
Expand Down Expand Up @@ -31,6 +30,7 @@ import { makeTuple } from '@aztec/foundation/array';
import { padArrayEnd } from '@aztec/foundation/collection';
import { Tuple, assertLength, mapTuple } from '@aztec/foundation/serialize';
import { pushTestData } from '@aztec/foundation/testing';
import { ExecutionResult, NoteAndSlot } from '@aztec/simulator';

import { KernelProofCreator, ProofCreator, ProofOutput, ProofOutputFinal } from './proof_creator.js';
import { ProvingDataOracle } from './proving_data_oracle.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/note_processor/note_processor.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { AcirSimulator } from '@aztec/acir-simulator';
import {
AztecNode,
FunctionL2Logs,
Expand All @@ -18,6 +17,7 @@ import { pedersenHash } from '@aztec/foundation/crypto';
import { Point } from '@aztec/foundation/fields';
import { ConstantKeyPair } from '@aztec/key-store';
import { AztecLmdbStore } from '@aztec/kv-store';
import { AcirSimulator } from '@aztec/simulator';

import { jest } from '@jest/globals';
import { MockProxy, mock } from 'jest-mock-extended';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/note_processor/note_processor.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { ContractNotFoundError } from '@aztec/acir-simulator';
import {
AztecNode,
INITIAL_L2_BLOCK_NUM,
Expand All @@ -13,6 +12,7 @@ import { Grumpkin } from '@aztec/circuits.js/barretenberg';
import { Fr } from '@aztec/foundation/fields';
import { createDebugLogger } from '@aztec/foundation/log';
import { Timer } from '@aztec/foundation/timer';
import { ContractNotFoundError } from '@aztec/simulator';

import { DeferredNoteDao } from '../database/deferred_note_dao.js';
import { PxeDatabase } from '../database/index.js';
Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/note_processor/produce_note_dao.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AcirSimulator } from '@aztec/acir-simulator';
import { L1NotePayload, TxHash } from '@aztec/circuit-types';
import { Fr, PublicKey } from '@aztec/circuits.js';
import { computeCommitmentNonce, siloNullifier } from '@aztec/circuits.js/abis';
import { AcirSimulator } from '@aztec/simulator';

import { NoteDao } from '../database/note_dao.js';

Expand Down
16 changes: 8 additions & 8 deletions yarn-project/pxe/src/pxe_service/pxe_service.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
import {
AcirSimulator,
ExecutionResult,
collectEncryptedLogs,
collectEnqueuedPublicFunctionCalls,
collectUnencryptedLogs,
resolveOpcodeLocations,
} from '@aztec/acir-simulator';
import {
AuthWitness,
AztecNode,
Expand Down Expand Up @@ -56,6 +48,14 @@ import { Fr } from '@aztec/foundation/fields';
import { SerialQueue } from '@aztec/foundation/fifo';
import { DebugLogger, createDebugLogger } from '@aztec/foundation/log';
import { Timer } from '@aztec/foundation/timer';
import {
AcirSimulator,
ExecutionResult,
collectEncryptedLogs,
collectEnqueuedPublicFunctionCalls,
collectUnencryptedLogs,
resolveOpcodeLocations,
} from '@aztec/simulator';
import { ContractInstanceWithAddress } from '@aztec/types/contracts';
import { NodeInfo } from '@aztec/types/interfaces';

Expand Down
2 changes: 1 addition & 1 deletion yarn-project/pxe/src/simulator/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AcirSimulator } from '@aztec/acir-simulator';
import { AztecNode, KeyStore } from '@aztec/circuit-types';
import { AcirSimulator } from '@aztec/simulator';

import { ContractDataOracle } from '../contract_data_oracle/index.js';
import { PxeDatabase } from '../database/pxe_database.js';
Expand Down
Loading
Loading