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

fix: Added a comment to clarify how to launch TXE #7402

Merged
merged 6 commits into from
Jul 9, 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
1 change: 1 addition & 0 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ noir-projects:
dependencies:
- noir
- avm-transpiler
- barretenberg-x86_64-linux-clang

# Compiles all aztec noir projects using nargo and the avm-transpiler, then tests them using the TXE.
noir-projects-tests:
Expand Down
12 changes: 11 additions & 1 deletion docs/docs/guides/smart_contracts/testing_contracts/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,17 @@ So to summarize:

### Running TXE

In order to use the TXE, it must be running on a known address. By default, TXE runs at `http://localhost:8080`. So you can run contracts tests with:
In order to use the TXE, it must be running on a known address.

:::tip
If you have [the sandbox](../../../getting_started.md) installed, you can quickly deploy a TXE by running:

`docker run --workdir /usr/src/yarn-project/txe/dest/bin --entrypoint node --name txe -p 8080:8080 aztecprotocol/aztec index.js`

This will be improved in the future with a dedicated command.
:::

By default, TXE runs at `http://localhost:8080`. Using `aztec-nargo`, contract tests can be run with:

`aztec-nargo test --oracle-resolver http://host.docker.internal:8080`

Expand Down
3 changes: 3 additions & 0 deletions noir-projects/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM aztecprotocol/noir as noir
FROM aztecprotocol/avm-transpiler as transpiler
FROM --platform=linux/amd64 aztecprotocol/barretenberg-x86_64-linux-clang as barretenberg

FROM ubuntu:lunar AS builder
RUN apt-get update && apt-get install -y parallel nodejs npm
RUN npm install --global yarn
# Copy in bb
COPY --from=barretenberg /usr/src/barretenberg/cpp/build/bin/bb /usr/src/barretenberg/cpp/build/bin/bb
Thunkar marked this conversation as resolved.
Show resolved Hide resolved
# Copy in nargo
COPY --from=noir /usr/src/noir/noir-repo/target/release/nargo /usr/src/noir/noir-repo/target/release/nargo
ENV PATH="/usr/src/noir/noir-repo/target/release:${PATH}"
Expand Down
Loading