Skip to content
This repository has been archived by the owner on Apr 9, 2024. It is now read-only.

Commit

Permalink
chore: rename acvm-simulator to acvm_js (#59)
Browse files Browse the repository at this point in the history
  • Loading branch information
TomAFrench authored Jun 26, 2023
1 parent c79d0e9 commit bf10fe6
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 41 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,16 @@ jobs:
git commit -m 'chore: Update lockfile'
git push
dispatch-acvm-simulator-wasm:
name: Dispatch to acvm-simulator-wasm
dispatch-acvm-js-wasm:
name: Dispatch to acvm-js-wasm
needs: [release-please]
if: ${{ needs.release-please.outputs.tag-name }}
runs-on: ubuntu-latest
steps:
- name: Dispatch to acvm-simulator-wasm
- name: Dispatch to acvm-js-wasm
uses: benc-uk/workflow-dispatch@v1
with:
workflow: update.yml
repo: noir-lang/acvm-simulator-wasm
repo: noir-lang/acvm-js-wasm
token: ${{ secrets.ACVM_SIMULATOR_RELEASES_TOKEN }}
inputs: '{ "acvm-simulator-ref": "${{ needs.release-please.outputs.tag-name }}" }'
inputs: '{ "acvm-js-ref": "${{ needs.release-please.outputs.tag-name }}" }'
14 changes: 7 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ concurrency:
cancel-in-progress: true

jobs:
build-acvm-simulator:
build-acvm-js:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
Expand All @@ -24,7 +24,7 @@ jobs:
name: barretenberg
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"

- name: Build acvm-simulator
- name: Build acvm-js
run: |
nix build .#
Expand All @@ -34,12 +34,12 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: acvm-simulator
name: acvm-js
path: ${{ env.UPLOAD_PATH }}
retention-days: 3

test-node:
needs: [build-acvm-simulator]
needs: [build-acvm-js]
name: Node.js Tests
runs-on: ubuntu-latest

Expand All @@ -50,7 +50,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: acvm-simulator
name: acvm-js
path: ./result

- name: Set up test environment
Expand All @@ -60,7 +60,7 @@ jobs:
run: yarn test

test-browser:
needs: [build-acvm-simulator]
needs: [build-acvm-js]
name: Browser Tests
runs-on: ubuntu-latest

Expand All @@ -71,7 +71,7 @@ jobs:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: acvm-simulator
name: acvm-js
path: ./result

- name: Set up test environment
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
[package]
name = "acvm_simulator"
name = "acvm_js"
description = "Typescript wrapper around the ACVM allowing execution of ACIR code"
version = "0.0.0" # x-release-please-version
authors = ["The Noir Team <[email protected]>"]
license = "MIT OR Apache-2.0"
repository = "https://github.com/noir-lang/acvm-simulator"
repository = "https://github.com/noir-lang/acvm_js"
edition = "2021"
rust-version = "1.66"

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ACVM Simulator
# acvm_js

The ACVM Simulator enables users to execute an ACIR program, i.e. generating an initial witness from a set of inputs and calculating a partial witness. This partial witness can then be used to create a proof of execution using an ACVM backend.
The `acvm_js` package enables users to execute an ACIR program, i.e. generating an initial witness from a set of inputs and calculating a partial witness. This partial witness can then be used to create a proof of execution using an ACVM backend.

## Dependencies

Expand Down
4 changes: 2 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
description = "ACVM Simulator";
description = "Javascript bindings for the ACVM";

inputs = {
nixpkgs = {
Expand Down Expand Up @@ -95,7 +95,7 @@
GIT_DIRTY = if (self ? rev) then "false" else "true";

commonArgs = {
pname = "acvm_simulator";
pname = "acvm_js";
version = "0.0.0"; # x-release-please-version

src = pkgs.lib.cleanSourceWith {
Expand Down
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "acvm-simulator",
"name": "acvm_js",
"version": "0.0.0",
"private": true,
"repository": {
"type": "git",
"url": "https://github.com/noir-lang/acvm-simulator.git"
"url": "https://github.com/noir-lang/acvm_js.git"
},
"collaborators": [
"The Noir Team <[email protected]>"
],
"license": "MIT",
"main": "./nodejs/acvm_simulator.js",
"types": "./web/acvm_simulator.d.ts",
"module": "./web/acvm_simulator.js",
"main": "./nodejs/acvm_js.js",
"types": "./web/acvm_js.d.ts",
"module": "./web/acvm_js.js",
"files": [
"nodejs",
"web",
Expand Down Expand Up @@ -40,4 +40,4 @@
"ts-node": "^10.9.1",
"typescript": "^5.0.4"
}
}
}
2 changes: 1 addition & 1 deletion src/barretenberg/mod.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! ACVM simulator is independent of the proving backend against which the ACIR code is being proven.
//! ACVM execution is independent of the proving backend against which the ACIR code is being proven.
//! However there are currently a few opcodes for which there is currently no rust implementation so we must
//! use the C++ implementations included in Aztec Lab's Barretenberg library.
//!
Expand Down
8 changes: 2 additions & 6 deletions test/browser/abi_encode.test.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
import { expect } from "@esm-bundle/chai";
import initACVMSimulator, {
abiEncode,
abiDecode,
WitnessMap,
} from "../../result/";
import initACVM, { abiEncode, abiDecode, WitnessMap } from "../../result/";
import { DecodedInputs } from "../types";

beforeEach(async () => {
await initACVMSimulator();
await initACVM();
});

it("recovers original inputs when abi encoding and decoding", async () => {
Expand Down
4 changes: 2 additions & 2 deletions test/browser/execute_circuit.test.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { expect } from "@esm-bundle/chai";
import initACVMSimulator, {
import initACVM, {
abiEncode,
abiDecode,
executeCircuit,
Expand All @@ -8,7 +8,7 @@ import initACVMSimulator, {
} from "../../result/";

beforeEach(async () => {
await initACVMSimulator();
await initACVM();

initLogLevel("INFO");
});
Expand Down
7 changes: 2 additions & 5 deletions test/browser/witness_conversion.test.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,12 @@
import { expect } from "@esm-bundle/chai";
import initACVMSimulator, {
compressWitness,
decompressWitness,
} from "../../result/";
import initACVM, { compressWitness, decompressWitness } from "../../result/";
import {
expectedCompressedWitnessMap,
expectedWitnessMap,
} from "../shared/witness_compression";

beforeEach(async () => {
await initACVMSimulator();
await initACVM();
});

it("successfully compresses the witness", async () => {
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1258,9 +1258,9 @@ __metadata:
languageName: node
linkType: hard

"acvm-simulator@workspace:.":
"acvm_js@workspace:.":
version: 0.0.0-use.local
resolution: "acvm-simulator@workspace:."
resolution: "acvm_js@workspace:."
dependencies:
"@esm-bundle/chai": ^4.3.4-fix.0
"@typescript-eslint/eslint-plugin": ^5.59.5
Expand Down

0 comments on commit bf10fe6

Please sign in to comment.