From e38f68a9680618992bf62d98fcd17404bc7a6b0d Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Wed, 19 Nov 2025 17:09:24 -0300 Subject: [PATCH 1/2] chore[nginx]: add the Testnet Playground Docker registry for Nginx images --- extras/nginx_docker/Makefile | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/extras/nginx_docker/Makefile b/extras/nginx_docker/Makefile index 3024ec4da6..dc0e65ba93 100644 --- a/extras/nginx_docker/Makefile +++ b/extras/nginx_docker/Makefile @@ -109,6 +109,24 @@ ekvilibro-no-rate-limit: clean nginx_no_rate_limit.conf set_real_ip_from_cloudfr mv nginx_no_rate_limit.conf nginx.conf docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(EKVILIBRO_REGISTRY):$(DEFAULT_NO_RATE_LIMIT_TAG) . +# GCP / Hathor Testnet Playground +HATHOR_TESTNET_PLAYGROUND_REGISTRY = us-central1-docker.pkg.dev/hathor-testnet-playground/fullnodes/webtank + +.PHONY: hathor-testnet-playground +hathor-testnet-playground: hathor-testnet-playground-default hathor-testnet-playground-no-rate-limit + @echo "All Hathor Testnet Playground images built and pushed successfully!" + +.PHONY: hathor-testnet-playground-default +hathor-testnet-playground-default: clean nginx.conf set_real_ip_from_cloudfront + @echo "Building and pushing latest image for Hathor Testnet Playground..." + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_PLAYGROUND_REGISTRY):$(DEFAULT_LATEST_TAG) . + +.PHONY: hathor-testnet-playground-no-rate-limit +hathor-testnet-playground-no-rate-limit: clean nginx_no_rate_limit.conf set_real_ip_from_cloudfront + @echo "Building and pushing no-rate-limit image for Hathor Testnet Playground..." + mv nginx_no_rate_limit.conf nginx.conf + docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_PLAYGROUND_REGISTRY):$(DEFAULT_NO_RATE_LIMIT_TAG) . + # AWS / Main Account AWS_MAIN_REGISTRY = 769498303037.dkr.ecr.us-east-1.amazonaws.com/webtank @@ -129,7 +147,7 @@ aws-main-no-rate-limit: clean nginx_no_rate_limit.conf set_real_ip_from_cloudfro # Build All (convenience command) .PHONY: build-all -build-all: hathor-testnet nano-testnet standalone-fullnodes ekvilibro aws-main +build-all: hathor-testnet nano-testnet standalone-fullnodes ekvilibro hathor-testnet-playground aws-main @echo "All images built and pushed successfully!" # Legacy commands for backward compatibility @@ -210,6 +228,9 @@ help: @echo " ekvilibro - Build and push all images for GCP Project Ekvilibro" @echo " ekvilibro-default - Build and push default image for GCP Project Ekvilibro" @echo " ekvilibro-no-rate-limit - Build and push no-rate-limit image for GCP Project Ekvilibro" + @echo " hathor-testnet-playground - Build and push all images for GCP Project Hathor Testnet Playground" + @echo " hathor-testnet-playground-default - Build and push default image for GCP Project Hathor Testnet Playground" + @echo " hathor-testnet-playground-no-rate-limit - Build and push no-rate-limit image for GCP Project Hathor Testnet Playground" @echo " aws-main - Build and push all images for AWS Main Account" @echo " aws-main-default - Build and push default image for AWS Main Account" @echo " aws-main-no-rate-limit - Build and push no-rate-limit image for AWS Main Account" @@ -229,5 +250,6 @@ help: @echo " - Nano Testnet: $(NANO_TESTNET_REGISTRY)" @echo " - Standalone Fullnodes: $(STANDALONE_FULLNODES_REGISTRY)" @echo " - Ekvilibro: $(EKVILIBRO_REGISTRY)" + @echo " - Hathor Testnet Playground: $(HATHOR_TESTNET_PLAYGROUND_REGISTRY)" @echo " - AWS Main Account: $(AWS_MAIN_REGISTRY)" @echo "" From 6eb084e0683693a0824a95dbe367e2284566fe2e Mon Sep 17 00:00:00 2001 From: Luis Helder Date: Fri, 21 Nov 2025 11:53:55 -0300 Subject: [PATCH 2/2] fix: enable nc exec logs in the testet-playground image --- extras/nginx_docker/Makefile | 17 ++++++++++++++--- hathor/nanocontracts/resources/nc_exec_logs.py | 3 ++- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/extras/nginx_docker/Makefile b/extras/nginx_docker/Makefile index dc0e65ba93..1d822ec0c9 100644 --- a/extras/nginx_docker/Makefile +++ b/extras/nginx_docker/Makefile @@ -117,14 +117,15 @@ hathor-testnet-playground: hathor-testnet-playground-default hathor-testnet-play @echo "All Hathor Testnet Playground images built and pushed successfully!" .PHONY: hathor-testnet-playground-default -hathor-testnet-playground-default: clean nginx.conf set_real_ip_from_cloudfront +hathor-testnet-playground-default: clean nginx_playground.conf set_real_ip_from_cloudfront @echo "Building and pushing latest image for Hathor Testnet Playground..." + mv nginx_playground.conf nginx.conf docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_PLAYGROUND_REGISTRY):$(DEFAULT_LATEST_TAG) . .PHONY: hathor-testnet-playground-no-rate-limit -hathor-testnet-playground-no-rate-limit: clean nginx_no_rate_limit.conf set_real_ip_from_cloudfront +hathor-testnet-playground-no-rate-limit: clean nginx_playground_no_rate_limit.conf set_real_ip_from_cloudfront @echo "Building and pushing no-rate-limit image for Hathor Testnet Playground..." - mv nginx_no_rate_limit.conf nginx.conf + mv nginx_playground_no_rate_limit.conf nginx.conf docker buildx build --pull --push --platform linux/arm64/v8,linux/amd64 --tag $(HATHOR_TESTNET_PLAYGROUND_REGISTRY):$(DEFAULT_NO_RATE_LIMIT_TAG) . # AWS / Main Account @@ -193,6 +194,16 @@ nginx_india_no_rate_limit.conf: @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" python -m hathor generate_nginx_config --override hathor-testnet-india --disable-rate-limits - > $@ +nginx_playground.conf: export PYTHONPATH := ../.. +nginx_playground.conf: + @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" + python -m hathor generate_nginx_config --override hathor-testnet-playground - > $@ + +nginx_playground_no_rate_limit.conf: export PYTHONPATH := ../.. +nginx_playground_no_rate_limit.conf: + @python -c "import os; import hathor; print('Using hathor-core from:', os.path.dirname(hathor.__file__))" + python -m hathor generate_nginx_config --override hathor-testnet-playground --disable-rate-limits - > $@ + set_real_ip_from_cloudfront: curl https://ip-ranges.amazonaws.com/ip-ranges.json -s \ | jq '.prefixes|map(select(.service=="CLOUDFRONT"))[]|.ip_prefix' -r \ diff --git a/hathor/nanocontracts/resources/nc_exec_logs.py b/hathor/nanocontracts/resources/nc_exec_logs.py index 48c3fc1d92..388eff124e 100644 --- a/hathor/nanocontracts/resources/nc_exec_logs.py +++ b/hathor/nanocontracts/resources/nc_exec_logs.py @@ -119,7 +119,8 @@ class NCExecLogsResponse(QueryParams): 'x-visibility': 'private', 'x-visibility-override': { 'nano-testnet-bravo': 'public', - 'hathor-testnet-india': 'public' + 'hathor-testnet-india': 'public', + 'hathor-testnet-playground': 'public', }, 'x-rate-limit': { 'global': [