Skip to content

Commit f364bb5

Browse files
authored
refactor: remove wasi registry default config (#172)
* fix: bug with FUNDED_KEY * Lay3rLabs/WAVS#668 * latest: remove cli specific aggregators
1 parent 59abb6f commit f364bb5

File tree

7 files changed

+28
-46
lines changed

7 files changed

+28
-46
lines changed

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ CARGO=cargo
88
COIN_MARKET_CAP_ID?=1
99
COMPONENT_FILENAME?=evm_price_oracle.wasm
1010
CREDENTIAL?=""
11-
DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs:487a781
11+
DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs:b45bee6
1212
MIDDLEWARE_DOCKER_IMAGE?=ghcr.io/lay3rlabs/wavs-middleware:0.4.0-beta.5
1313
IPFS_ENDPOINT?=http://127.0.0.1:5001
1414
RPC_URL?=http://127.0.0.1:8545

script/build_service.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ DEPLOY_ENV=${DEPLOY_ENV:-""}
3131
WAVS_ENDPOINT=${WAVS_ENDPOINT:-"http://localhost:8000"}
3232
REGISTRY=${REGISTRY:-"wa.dev"}
3333

34-
BASE_CMD="docker run --rm --network host -w /data -v $(pwd):/data ghcr.io/lay3rlabs/wavs:487a781 wavs-cli service --json true --home /data --file /data/${FILE_LOCATION}"
34+
BASE_CMD="docker run --rm --network host -w /data -v $(pwd):/data ghcr.io/lay3rlabs/wavs:b45bee6 wavs-cli service --json true --home /data --file /data/${FILE_LOCATION}"
3535

3636
if [ -z "$SERVICE_MANAGER_ADDRESS" ]; then
3737
# DevEx: attempt to grab it from the location if not set already

script/create-aggregator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ cat > "${AGG_LOC}/start.sh" << EOF
4545
#!/bin/bash
4646
cd \$(dirname "\$0") || exit 1
4747
48-
IMAGE=ghcr.io/lay3rlabs/wavs:487a781
48+
IMAGE=ghcr.io/lay3rlabs/wavs:b45bee6
4949
INSTANCE=wavs-aggregator-${AGGREGATOR_INDEX}
5050
5151
docker kill \${INSTANCE} > /dev/null 2>&1 || true

script/create-deployer.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ mkdir -p .docker
2525
cast wallet new-mnemonic --json > .docker/deployer.json
2626
export DEPLOYER_PK=`jq -r .accounts[0].private_key .docker/deployer.json`
2727
export DEPLOYER_ADDRESS=`cast wallet address $DEPLOYER_PK`
28-
sed -i${SP}'' -e "s/^PRIVATE_KEY=.*$/PRIVATE_KEY=$DEPLOYER_PK/" .env
28+
sed -i${SP}'' -e "s/^FUNDED_KEY=.*$/FUNDED_KEY=$DEPLOYER_PK/" .env
2929

3030

3131
if [ "$DEPLOY_ENV" = "LOCAL" ]; then

script/create-operator.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ cat > "${OPERATOR_LOC}/start.sh" << EOF
5555
#!/bin/bash
5656
cd \$(dirname "\$0") || exit 1
5757
58-
IMAGE=ghcr.io/lay3rlabs/wavs:487a781
58+
IMAGE=ghcr.io/lay3rlabs/wavs:b45bee6
5959
WAVS_INSTANCE=wavs-${OPERATOR_INDEX}
6060
6161
docker kill \${WAVS_INSTANCE} > /dev/null 2>&1 || true

script/upload-to-wasi-registry.sh

Lines changed: 23 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,28 @@ fi
2020

2121
cd `git rev-parse --show-toplevel` || exit
2222

23-
DEPLOY_ENV=$(sh ./script/get-deploy-status.sh)
24-
25-
if [ "$DEPLOY_ENV" = "LOCAL" ]; then
26-
echo "Publishing to local registry (http://${REGISTRY})..."
27-
output=$(warg publish release --registry http://${REGISTRY} --name ${PKG_NAMESPACE}:${PKG_NAME} --version ${PKG_VERSION} ./compiled/${COMPONENT_FILENAME} 2>&1)
28-
exit_code=$?
29-
30-
# Check for specific error conditions in the output
31-
if [[ $exit_code -ne 0 ]]; then
32-
if [[ "$output" =~ "failed to prove inclusion" ]]; then
33-
echo "Package uploaded to local registry successfully..."
34-
elif [[ "$output" =~ "error sending request for url" ]]; then
35-
echo "NOTE: Check to make sure you are running the registry locally"
36-
echo "${output}"
37-
exit 1
38-
else
39-
echo "Unknown error occurred ${output}"
40-
exit 1
41-
fi
42-
fi
23+
PROTOCOL="https"
24+
if [[ "$REGISTRY" == *"localhost"* ]] || [[ "$REGISTRY" == *"127.0.0.1"* ]]; then
25+
PROTOCOL="http"
26+
fi
27+
echo "Publishing to registry (${PROTOCOL}://${REGISTRY})..."
28+
4329

44-
exit 0
45-
else
46-
echo "Publishing to remote registry (https://${REGISTRY})..."
47-
warg publish release --registry https://${REGISTRY} --name ${PKG_NAMESPACE}:${PKG_NAME} --version ${PKG_VERSION} ./compiled/${COMPONENT_FILENAME} || true
30+
output=$(warg publish release --registry ${PROTOCOL}://${REGISTRY} --name ${PKG_NAMESPACE}:${PKG_NAME} --version ${PKG_VERSION} ./compiled/${COMPONENT_FILENAME} 2>&1 || true)
31+
exit_code=$?
32+
33+
# Check for specific error conditions in the output
34+
if [[ $exit_code -ne 0 ]]; then
35+
if [[ "$output" =~ "failed to prove inclusion" ]]; then
36+
echo "Package uploaded to local registry successfully..."
37+
elif [[ "$output" =~ "error sending request for url" ]]; then
38+
echo "NOTE: Check to make sure you are running the registry locally"
39+
echo "${output}"
40+
exit 1
41+
else
42+
echo "Unknown error occurred ${output}"
43+
exit 1
44+
fi
4845
fi
46+
47+
exit 0

wavs.toml

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ log_level = ["info", "wavs=debug"]
2424
ipfs_gateway = "http://127.0.0.1:8080/ipfs/"
2525
# ipfs_gateway = "https://gateway.pinata.cloud/ipfs/" # testnet / production
2626

27-
# The domain used for the warg wasi registry
28-
registry_domain = "localhost:8090"
29-
# registry_domain = "wa.dev" # testnet / production
30-
3127
# Those configs are global and shared between wavs and aggregator
3228
# jaeger = "http://localhost:4317"
3329
# prometheus = "http://localhost:9090"
@@ -135,19 +131,6 @@ data = "~/wavs/cli"
135131

136132
# wavs_endpoint = "http://localhost:8000"
137133

138-
# CLI-specific chain overrides
139-
[cli.chains.evm.local]
140-
aggregator_endpoint = "http://localhost:8001"
141-
142-
[cli.chains.evm.local2]
143-
aggregator_endpoint = "http://localhost:8001"
144-
145-
[cli.chains.evm.sepolia]
146-
aggregator_endpoint = "http://localhost:8001"
147-
148-
[cli.chains.evm.holesky]
149-
aggregator_endpoint = "http://localhost:8001"
150-
151134
# ----------------------------
152135
# Aggregator specific settings
153136
# ----------------------------

0 commit comments

Comments
 (0)