Skip to content

Commit

Permalink
fix: Added a comment to clarify how to launch TXE (#7402)
Browse files Browse the repository at this point in the history
Co-authored-by: sirasistant <sirasistant@gmail.com>
  • Loading branch information
Thunkar and sirasistant authored Jul 9, 2024
1 parent 633eb6b commit 1ca48a4
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
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
# 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

0 comments on commit 1ca48a4

Please sign in to comment.