forked from AztecProtocol/aztec-packages
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from visoftsolutions/latest-update
Latest update
- Loading branch information
Showing
427 changed files
with
7,349 additions
and
4,457 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
".": "0.16.7", | ||
"barretenberg": "0.16.7", | ||
"barretenberg/ts": "0.16.7" | ||
".": "0.16.9", | ||
"barretenberg": "0.16.9", | ||
"barretenberg/ts": "0.16.9" | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.terraform | ||
.terraform* | ||
.DS_Store |
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,30 @@ | ||
# The Aztec Installation Script | ||
|
||
``` | ||
bash -i <(curl -s install.aztec.network) | ||
``` | ||
|
||
That is all. | ||
|
||
This will install into `~/.aztec/bin` a collection of scripts to help running aztec containers, and will update | ||
a users `PATH` variable in their shell startup script so they can be found. | ||
|
||
- `aztec` - The infrastructure container. | ||
- `aztec-cli` - A command line tool for interacting with infrastructure. | ||
- `aztec-nargo` - A build of `nargo` from `noir` that is guaranteed to be version aligned. Provides compiler, lsp and more. | ||
- `aztec-sandbox` - A wrapper around docker-compose that launches services needed for sandbox testing. | ||
- `aztec-up` - A tool to upgrade the aztec toolchain to the latest, or specific versions. | ||
|
||
After installed, you can use `aztec-up` to upgrade or install specific versions. | ||
|
||
``` | ||
VERSION=master aztec-up | ||
``` | ||
|
||
This will install the container built from master branch. | ||
|
||
``` | ||
VERSION=v1.2.3 aztec-up | ||
``` | ||
|
||
This will install tagged release version 1.2.3. |
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,84 @@ | ||
#!/usr/bin/env bash | ||
# The script starts a Docker container passing any commands and arguments to the command running inside the container. | ||
# It handles mounting paths into the container. | ||
# It handles networking comms back to the host. | ||
set -euo pipefail | ||
|
||
IMAGE=${1:-} | ||
shift | ||
|
||
VERSION=${VERSION:-"latest"} | ||
|
||
# Any host bindings we might send to the container. | ||
DOCKER_HOST_BINDS="" | ||
|
||
# Volumes to pass to the container. | ||
DOCKER_VOLUME="-v $HOME:$HOME" | ||
|
||
# Colors. | ||
y="\033[33m" | ||
r="\033[0m" | ||
|
||
function warn { | ||
echo -e "${y}$1${r}" | ||
} | ||
|
||
if ! command -v docker &> /dev/null; then | ||
warn "No docker found." | ||
exit 1 | ||
fi | ||
|
||
if [[ $PWD != ${HOME}* ]]; then | ||
warn "Due to how we containerize our applications, we require your working directory to be somewhere within $HOME." | ||
exit 1 | ||
fi | ||
|
||
# Set up host.docker.internal alias on Linux, just like it is on mac. | ||
UNAME=$(uname -s) | ||
if [[ -z "${SKIP_NET:-}" && "$UNAME" == "Linux" ]]; then | ||
if docker info 2>/dev/null | grep -q rootless; then | ||
# We're in rootless docker. Probe for the host ip and use that. | ||
ip=$(hostname -I | head | tr -d ' ') | ||
warn "WARNING: Running within rootless docker. Using $ip as host ip. Ensure listening services are listening on this interface." | ||
DOCKER_HOST_BINDS="$DOCKER_HOST_BINDS --add-host host.docker.internal:$ip" | ||
else | ||
DOCKER_HOST_BINDS="$DOCKER_HOST_BINDS --add-host host.docker.internal:host-gateway" | ||
fi | ||
fi | ||
|
||
# Substitute any references to localhost with our host gateway. | ||
# TODO: In node, we can hook the resolve override for localhost with host.docker.internal. | ||
# Consider if we should just do that, but that wouldn't help e.g. nargo. | ||
args=("$@") | ||
for i in "${!args[@]}"; do | ||
args[$i]=${args[$i]//localhost/host.docker.internal} | ||
done | ||
|
||
# Check if it's either a filename or a directory that exists outside the HOME. | ||
# If so, warn and exit. | ||
for i in "${!args[@]}"; do | ||
arg=${args[$i]} | ||
if [[ -f "$arg" || -d "$arg" ]] && [[ $(realpath $arg) != ${HOME}* ]]; then | ||
warn "Due to how we containerize our applications, paths outside of $HOME cannot be referenced." | ||
exit 1 | ||
fi | ||
done | ||
|
||
DOCKER_ENV="" | ||
for env in ${ENV_VARS_TO_INJECT:-}; do | ||
# First substitute any reference to localhost with our host gateway. | ||
env=${env//localhost/host.docker.internal} | ||
# Inject into container. | ||
DOCKER_ENV+="-e $env:${!env:-} " | ||
done | ||
|
||
DOCKER_VOLUME="$DOCKER_VOLUME -v cache:/cache" | ||
|
||
docker run \ | ||
-ti \ | ||
--rm \ | ||
--workdir "$PWD" \ | ||
$DOCKER_HOST_BINDS \ | ||
$DOCKER_ENV \ | ||
$DOCKER_VOLUME \ | ||
$IMAGE:$VERSION ${args[@]:-} |
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,4 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
$(dirname $0)/.aztec-run aztecprotocol/aztec-sandbox $@ |
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,9 @@ | ||
#!/usr/bin/env bash | ||
# TODO: Make compile command always be wasm. Or put nargo in container. Or probe. | ||
# TODO: Make unbox fail if trying to unbox outside of the cwd. | ||
set -euo pipefail | ||
|
||
export ENV_VARS_TO_INJECT="PXE_URL PRIVATE_KEY DEBUG" | ||
export PXE_URL=${PXE_URL:-"http://host.docker.internal:8080"} | ||
|
||
$(dirname $0)/.aztec-run aztecprotocol/cli $@ |
Oops, something went wrong.