diff --git a/aztec/aztec/aztec-devnet-aztec-pruned.yml b/aztec/aztec/aztec-devnet-aztec-pruned.yml new file mode 100644 index 00000000..19ad8a16 --- /dev/null +++ b/aztec/aztec/aztec-devnet-aztec-pruned.yml @@ -0,0 +1,116 @@ +--- +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: "10m" + max-file: "3" +# Aztec full node. See https://docs.aztec.network/network/setup/running_a_node +# Admin port (8880) is not exposed; use docker exec for admin API. + +# Usage: +# +# mkdir rpc && cd rpc +# +# git init +# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git +# git fetch origin vibe +# git checkout origin/vibe +# +# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret +# +# env +# ... +# IP=$(curl ipinfo.io/ip) +# DOMAIN=${IP}.traefik.me +# COMPOSE_FILE=base.yml:rpc.yml:aztec/aztec/aztec-devnet-aztec-pruned.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/aztec-devnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + +services: + aztec-devnet: + image: ${AZTEC_AZTEC_IMAGE:-aztecprotocol/aztec}:${AZTEC_DEVNET_AZTEC_VERSION:-3.0.0-devnet.6-patch.1} + sysctls: + # TCP Performance + net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle + net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache + net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers + net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers + net.core.somaxconn: 32768 # Higher connection queue + # Memory/Connection Management + # net.core.netdev_max_backlog: 50000 # Increase network buffer + net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests + net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets + ulimits: + nofile: 1048576 # Max open files (for RPC/WS connections) + user: root + ports: + - 12024:12024 + - 12024:12024/udp + expose: + - 8080 + environment: + AZTEC_ADMIN_PORT: '8880' + AZTEC_PORT: '8080' + DATA_DIRECTORY: /var/lib/data + ETHEREUM_HOSTS: ${ETHEREUM_SEPOLIA_EXECUTION_RPC} + L1_CONSENSUS_HOST_URLS: ${ETHEREUM_SEPOLIA_BEACON_REST} + LOG_LEVEL: ${AZTEC_LOG_LEVEL:-info} + P2P_IP: ${IP} + P2P_PORT: '12024' + entrypoint: + - node + - --no-warnings + - /usr/src/yarn-project/aztec/dest/bin/index.js + command: + - --archiver + - --network=devnet + - --node + - start + restart: unless-stopped + stop_grace_period: 5m + networks: + - chains + volumes: + - ${AZTEC_DEVNET_AZTEC_PRUNED_DATA:-aztec-devnet-aztec-pruned}:/var/lib/data + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=false + - traefik.enable=true + - traefik.http.middlewares.aztec-devnet-aztec-pruned-stripprefix.stripprefix.prefixes=/aztec-devnet + - traefik.http.services.aztec-devnet-aztec-pruned.loadbalancer.server.port=8080 + - ${NO_SSL:-traefik.http.routers.aztec-devnet-aztec-pruned.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.aztec-devnet-aztec-pruned.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.aztec-devnet-aztec-pruned.rule=Host(`$DOMAIN`) && (Path(`/aztec-devnet`) || Path(`/aztec-devnet/`))} + - ${NO_SSL:+traefik.http.routers.aztec-devnet-aztec-pruned.rule=Path(`/aztec-devnet`) || Path(`/aztec-devnet/`)} + - traefik.http.routers.aztec-devnet-aztec-pruned.middlewares=aztec-devnet-aztec-pruned-stripprefix, ipallowlist + +volumes: + aztec-devnet-aztec-pruned: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: aztec + method-groups: + enabled: + - debug + - filter + methods: + disabled: + enabled: + - name: txpool_content # TODO: should be disabled for rollup nodes +... \ No newline at end of file diff --git a/aztec/aztec/aztec-testnet-aztec-pruned.yml b/aztec/aztec/aztec-testnet-aztec-pruned.yml new file mode 100644 index 00000000..6c72f3a8 --- /dev/null +++ b/aztec/aztec/aztec-testnet-aztec-pruned.yml @@ -0,0 +1,116 @@ +--- +x-logging-defaults: &logging-defaults + driver: json-file + options: + max-size: "10m" + max-file: "3" +# Aztec full node. See https://docs.aztec.network/network/setup/running_a_node +# Admin port (8880) is not exposed; use docker exec for admin API. + +# Usage: +# +# mkdir rpc && cd rpc +# +# git init +# git remote add origin https://github.com/StakeSquid/ethereum-rpc-docker.git +# git fetch origin vibe +# git checkout origin/vibe +# +# docker run --rm alpine sh -c "printf '0x'; head -c32 /dev/urandom | xxd -p -c 64" > .jwtsecret +# +# env +# ... +# IP=$(curl ipinfo.io/ip) +# DOMAIN=${IP}.traefik.me +# COMPOSE_FILE=base.yml:rpc.yml:aztec/aztec/aztec-testnet-aztec-pruned.yml +# +# docker compose up -d +# +# curl -X POST https://${IP}.traefik.me/aztec-testnet \ +# -H "Content-Type: application/json" \ +# --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' + +services: + aztec-testnet: + image: ${AZTEC_AZTEC_IMAGE:-aztecprotocol/aztec}:${AZTEC_TESTNET_AZTEC_VERSION:-3.0.2} + sysctls: + # TCP Performance + net.ipv4.tcp_slow_start_after_idle: 0 # Disable slow start after idle + net.ipv4.tcp_no_metrics_save: 1 # Disable metrics cache + net.ipv4.tcp_rmem: 4096 87380 16777216 # Increase TCP read buffers + net.ipv4.tcp_wmem: 4096 87380 16777216 # Increase TCP write buffers + net.core.somaxconn: 32768 # Higher connection queue + # Memory/Connection Management + # net.core.netdev_max_backlog: 50000 # Increase network buffer + net.ipv4.tcp_max_syn_backlog: 30000 # More SYN requests + net.ipv4.tcp_max_tw_buckets: 2000000 # Allow more TIME_WAIT sockets + ulimits: + nofile: 1048576 # Max open files (for RPC/WS connections) + user: root + ports: + - 13009:13009 + - 13009:13009/udp + expose: + - 8080 + environment: + AZTEC_ADMIN_PORT: '8880' + AZTEC_PORT: '8080' + DATA_DIRECTORY: /var/lib/data + ETHEREUM_HOSTS: ${ETHEREUM_SEPOLIA_EXECUTION_RPC} + L1_CONSENSUS_HOST_URLS: ${ETHEREUM_SEPOLIA_BEACON_REST} + LOG_LEVEL: ${AZTEC_LOG_LEVEL:-info} + P2P_IP: ${IP} + P2P_PORT: '13009' + entrypoint: + - node + - --no-warnings + - /usr/src/yarn-project/aztec/dest/bin/index.js + command: + - --archiver + - --network=testnet + - --node + - start + restart: unless-stopped + stop_grace_period: 5m + networks: + - chains + volumes: + - ${AZTEC_TESTNET_AZTEC_PRUNED_DATA:-aztec-testnet-aztec-pruned}:/var/lib/data + - /slowdisk:/slowdisk + logging: *logging-defaults + labels: + - prometheus-scrape.enabled=false + - traefik.enable=true + - traefik.http.middlewares.aztec-testnet-aztec-pruned-stripprefix.stripprefix.prefixes=/aztec-testnet + - traefik.http.services.aztec-testnet-aztec-pruned.loadbalancer.server.port=8080 + - ${NO_SSL:-traefik.http.routers.aztec-testnet-aztec-pruned.entrypoints=websecure} + - ${NO_SSL:-traefik.http.routers.aztec-testnet-aztec-pruned.tls.certresolver=myresolver} + - ${NO_SSL:-traefik.http.routers.aztec-testnet-aztec-pruned.rule=Host(`$DOMAIN`) && (Path(`/aztec-testnet`) || Path(`/aztec-testnet/`))} + - ${NO_SSL:+traefik.http.routers.aztec-testnet-aztec-pruned.rule=Path(`/aztec-testnet`) || Path(`/aztec-testnet/`)} + - traefik.http.routers.aztec-testnet-aztec-pruned.middlewares=aztec-testnet-aztec-pruned-stripprefix, ipallowlist + +volumes: + aztec-testnet-aztec-pruned: + +x-upstreams: + - id: $${ID} + labels: + provider: $${PROVIDER} + connection: + generic: + rpc: + url: $${RPC_URL} + ws: + frameSize: 20Mb + msgSize: 50Mb + url: $${WS_URL} + chain: aztec-testnet + method-groups: + enabled: + - debug + - filter + methods: + disabled: + enabled: + - name: txpool_content # TODO: should be disabled for rollup nodes +... \ No newline at end of file diff --git a/check-health.sh b/check-health.sh index 3036fd4e..d2b123f3 100755 --- a/check-health.sh +++ b/check-health.sh @@ -10,11 +10,15 @@ fi RPC_URL=$1 shift -# Check for --starknet flag +# Check for --starknet / --aztec flag is_starknet=false +is_aztec=false if [ "$1" == "--starknet" ]; then is_starknet=true shift +elif [ "$1" == "--aztec" ]; then + is_aztec=true + shift fi REF="" @@ -34,6 +38,8 @@ response_file=$(mktemp) # Use appropriate RPC method based on chain type if $is_starknet; then rpc_method='{"jsonrpc":"2.0","method":"starknet_getBlockWithTxHashes","params":["latest"],"id":1}' +elif $is_aztec; then + rpc_method='{"jsonrpc":"2.0","method":"node_getBlock","params":["latest"],"id":1}' else rpc_method='{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' fi @@ -49,6 +55,15 @@ if [ $? -eq 0 ]; then latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.timestamp') latest_block_number=$(echo "$response" | jq -r '.result.block_number') latest_block_hash=$(echo "$response" | jq -r '.result.block_hash') + elif $is_aztec; then + # Aztec: node_getBlock("latest") returns blockHash, header.globalVariables.blockNumber, header.globalVariables.timestamp + latest_block_number=$(echo "$response" | jq -r '.result.header.globalVariables.blockNumber') + latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.header.globalVariables.timestamp') + latest_block_hash=$(echo "$response" | jq -r '.result.blockHash') + if [ "$latest_block_number" = "null" ] || [ "$latest_block_timestamp_decimal" = "null" ] || [ -z "$latest_block_timestamp_decimal" ]; then + echo "error" + exit 1 + fi else # Ethereum returns hex timestamp and number latest_block_timestamp=$(echo "$response" | jq -r '.result.timestamp') @@ -70,6 +85,8 @@ if [ $? -eq 0 ]; then if $is_starknet; then # Starknet uses block_id object with block_number rpc_method2="{\"jsonrpc\":\"2.0\",\"method\":\"starknet_getBlockWithTxHashes\",\"params\":[{\"block_number\":$latest_block_number}],\"id\":1}" + elif $is_aztec; then + rpc_method2="{\"jsonrpc\":\"2.0\",\"method\":\"node_getBlock\",\"params\":[$latest_block_number],\"id\":1}" else rpc_method2="{\"jsonrpc\":\"2.0\",\"method\":\"eth_getBlockByNumber\",\"params\":[\"$latest_block_number\", false],\"id\":1}" fi @@ -83,35 +100,50 @@ if [ $? -eq 0 ]; then response2=$(cat "$response_file2") if $is_starknet; then latest_block_hash2=$(echo "$response2" | jq -r '.result.block_hash') + elif $is_aztec; then + latest_block_hash2=$(echo "$response2" | jq -r '.result.blockHash') else latest_block_hash2=$(echo "$response2" | jq -r '.result.hash') fi rm "$response_file2" + # Proceed if hashes match (or both empty for Aztec when API omits hash) if [ "$latest_block_hash" == "$latest_block_hash2" ]; then response_file3=$(mktemp) status_file3=$(mktemp) - if $is_starknet; then - rpc_method_latest='{"jsonrpc":"2.0","method":"starknet_getBlockWithTxHashes","params":["latest"],"id":1}' + if $is_aztec; then + # Aztec: node_getBlock("latest") - same single-request pattern as eth/starknet + rpc_method_latest='{"jsonrpc":"2.0","method":"node_getBlock","params":["latest"],"id":1}' + { + $BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "$rpc_method_latest" $ref > "$status_file3" + } & + pid3=$! + response_file4=$(mktemp) + status_file4=$(mktemp) + { + curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data "$rpc_method_latest" $RPC_URL > "$status_file4" + } & + pid4=$! else - rpc_method_latest='{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' + if $is_starknet; then + rpc_method_latest='{"jsonrpc":"2.0","method":"starknet_getBlockWithTxHashes","params":["latest"],"id":1}' + else + rpc_method_latest='{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' + fi + { + $BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "$rpc_method_latest" $ref > "$status_file3" + } & + pid3=$! + response_file4=$(mktemp) + status_file4=$(mktemp) + { + curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data "$rpc_method_latest" $RPC_URL > "$status_file4" + } & + pid4=$! fi - { - $BASEPATH/multicurl.sh -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file3" -H "Content-Type: application/json" --data "$rpc_method_latest" $ref > "$status_file3" - } & - pid3=$! - - response_file4=$(mktemp) - status_file4=$(mktemp) - - { - curl -L --ipv4 -m $timeout -s -X POST -w "%{http_code} %{time_total}" -o "$response_file4" -H "Content-Type: application/json" --data "$rpc_method_latest" $RPC_URL > "$status_file4" - } & - pid4=$! - wait $pid3 curl_code3=$? http_status_code3=$(cat "$status_file3" | cut -d ' ' -f 1) @@ -132,6 +164,8 @@ if [ $? -eq 0 ]; then if $is_starknet; then latest_block_timestamp_decimal3=$(echo "$response3" | jq -r '.result.timestamp') + elif $is_aztec; then + latest_block_timestamp_decimal3=$(echo "$response3" | jq -r '.result.header.globalVariables.timestamp') else latest_block_timestamp3=$(echo "$response3" | jq -r '.result.timestamp') latest_block_timestamp_decimal3=$((16#${latest_block_timestamp3#0x})) @@ -146,6 +180,8 @@ if [ $? -eq 0 ]; then if $is_starknet; then latest_block_timestamp_decimal4=$(echo "$response4" | jq -r '.result.timestamp') + elif $is_aztec; then + latest_block_timestamp_decimal4=$(echo "$response4" | jq -r '.result.header.globalVariables.timestamp') else latest_block_timestamp4=$(echo "$response4" | jq -r '.result.timestamp') latest_block_timestamp_decimal4=$((16#${latest_block_timestamp4#0x})) diff --git a/compose_registry.json b/compose_registry.json index e70e7beb..6d8cc188 100644 --- a/compose_registry.json +++ b/compose_registry.json @@ -785,6 +785,34 @@ "avalanche-mainnet-go-pruned-pebbledb" ] }, + { + "chain": "devnet", + "client": "aztec", + "compose_file": "aztec/aztec/aztec-devnet-aztec-pruned", + "features": [], + "network": "aztec", + "node": null, + "relay": null, + "stack": null, + "type": "pruned", + "volumes": [ + "aztec-devnet-aztec-pruned" + ] + }, + { + "chain": "testnet", + "client": "aztec", + "compose_file": "aztec/aztec/aztec-testnet-aztec-pruned", + "features": [], + "network": "aztec", + "node": null, + "relay": null, + "stack": null, + "type": "pruned", + "volumes": [ + "aztec-testnet-aztec-pruned" + ] + }, { "chain": "bepolia", "client": "geth", diff --git a/reference-rpc-endpoint.json b/reference-rpc-endpoint.json index f6832e0f..7e5738d5 100644 --- a/reference-rpc-endpoint.json +++ b/reference-rpc-endpoint.json @@ -452,7 +452,7 @@ "hyperliquid": { "id": 999, "urls": [ - "https://gwan-ssl.wandevs.org:46891/" + "https://rpc.hyperliquid.xyz/evm" ] }, "klaytn-baobab": { @@ -706,6 +706,12 @@ "https://rpc.cardona.zkevm-rpc.com" ] }, + "fraxtal-testnet": { + "id": 2523, + "urls": [ + "https://rpc.testnet.frax.com" + ] + }, "abstract": { "id": 2741, "urls": [ @@ -734,6 +740,10 @@ "https://rpc.sepolia-api.lisk.com" ] }, + "megaeth": { + "id": 4326, + "urls": [] + }, "iotex": { "id": 4689, "urls": [ @@ -788,7 +798,7 @@ "https://opbnb-testnet-rpc.publicnode.com" ] }, - "megaeth-testnet": { + "megaeth-deprecated": { "id": 6342, "urls": [ "https://carrot.megaeth.com/rpc" @@ -1033,6 +1043,12 @@ "https://rpc.testnet.tempo.xyz" ] }, + "tempo-moderato-testnet": { + "id": 42431, + "urls": [ + "https://rpc.moderato.tempo.xyz" + ] + }, "hemi": { "id": 43111, "urls": [ @@ -1329,6 +1345,12 @@ "https://evm-rpc.arctic-1.seinetwork.io" ] }, + "katana-testnet": { + "id": 737373, + "urls": [ + "https://rpc-bokuto.katanarpc.com" + ] + }, "hemi-testnet": { "id": 743111, "urls": [ @@ -1338,7 +1360,9 @@ "katana": { "id": 747474, "urls": [ - "https://rpc.katana.network" + "https://rpc.katana.network", + "https://katana.gateway.tenderly.co/", + "https://rpc.katanarpc.com/" ] }, "ink-sepolia": { @@ -1516,6 +1540,18 @@ "https://rpc.arb-blueberry.gelato.digital" ] }, + "aztec": { + "id": 418, + "urls": [ + "https://mainnet.aztec.network" + ] + }, + "aztec-testnet": { + "id": 11124, + "urls": [ + "https://aztec-alpha-testnet-fullnode.zkv.xyz" + ] + }, "core-pigeon": { "id": 1114, "urls": [ diff --git a/sync-status.sh b/sync-status.sh index 70d1af57..a1a0ef4f 100755 --- a/sync-status.sh +++ b/sync-status.sh @@ -34,18 +34,37 @@ for path in $pathlist; do if $include; then RPC_URL="$PROTO://$DOMAIN/$path" - # Detect Starknet vs Ethereum based on path + # Detect Starknet vs Ethereum vs Aztec based on path if echo "$path" | grep -qi "starknet"; then is_starknet=true + is_aztec=false + elif echo "$path" | grep -qi "aztec"; then + is_starknet=false + is_aztec=true else is_starknet=false + is_aztec=false fi ref='' if [ -n "$2" ]; then ref="$2" else - if $is_starknet; then + if $is_aztec; then + # Aztec: resolve ref by path (mainnet/testnet) + case "$path" in + *aztec-mainnet*) + ref=$($BASEPATH/reference-rpc-endpoint.sh 418) + ;; + *aztec-testnet*) + ref=$($BASEPATH/reference-rpc-endpoint.sh 11124) + ;; + *) + echo "error: unknown aztec path $path" + exit 1 + ;; + esac + elif $is_starknet; then # Starknet chain ID detection chain_id_response=$(curl -L --ipv4 -m 1 -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"starknet_chainId","params":[],"id":1}' $RPC_URL) @@ -93,8 +112,10 @@ for path in $pathlist; do fi fi - # Call the health check script with RPC_URL, ref, and starknet flag - if $is_starknet; then + # Call the health check script with RPC_URL, ref, and chain-type flag + if $is_aztec; then + $BASEPATH/check-health.sh "$RPC_URL" --aztec $ref + elif $is_starknet; then $BASEPATH/check-health.sh "$RPC_URL" --starknet $ref else $BASEPATH/check-health.sh "$RPC_URL" $ref diff --git a/timestamp.sh b/timestamp.sh index f2dcbc43..cb80cf74 100755 --- a/timestamp.sh +++ b/timestamp.sh @@ -30,13 +30,23 @@ for path in $pathlist; do RPC_URL="$PROTO://$DOMAIN/$path" response_file=$(mktemp) - # Detect Starknet vs Ethereum based on path + # Detect Starknet vs Ethereum vs Aztec based on path if echo "$path" | grep -qi "starknet"; then rpc_method='{"jsonrpc":"2.0","method":"starknet_getBlockWithTxHashes","params":["latest"],"id":1}' is_starknet=true + is_aztec=false + elif echo "$path" | grep -qi "aztec"; then + is_starknet=false + is_aztec=true else rpc_method='{"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["latest", false],"id":1}' is_starknet=false + is_aztec=false + fi + + if $is_aztec; then + # Aztec: node_getBlock("latest") returns block with header.globalVariables.timestamp + rpc_method='{"jsonrpc":"2.0","method":"node_getBlock","params":["latest"],"id":1}' fi http_status_code=$(curl -L --ipv4 -m 1 -s -X POST -w "%{http_code}" -o "$response_file" -H "Content-Type: application/json" --data "$rpc_method" $RPC_URL) @@ -46,19 +56,29 @@ for path in $pathlist; do if [[ $http_status_code -eq 200 ]]; then response=$(cat "$response_file") - if $is_starknet; then + if $is_aztec; then + # result.header.globalVariables.timestamp, result.blockHash, result.header.globalVariables.blockNumber + latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.header.globalVariables.timestamp') + rm -f "$response_file" + if [ "$latest_block_timestamp_decimal" = "null" ] || [ -z "$latest_block_timestamp_decimal" ]; then + exit 1 + fi + elif $is_starknet; then # Starknet returns decimal timestamp latest_block_timestamp_decimal=$(echo "$response" | jq -r '.result.timestamp') + rm -f "$response_file" else # Ethereum returns hex timestamp latest_block_timestamp=$(echo "$response" | jq -r '.result.timestamp') latest_block_timestamp_decimal=$((16#${latest_block_timestamp#0x})) + rm -f "$response_file" fi echo "$latest_block_timestamp_decimal" exit 0; fi + rm -f "$response_file" fi break; fi