From 1e483a18bdd429c21a9657aab963715763b7b7d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A9ctor?= <47385090+hcastc00@users.noreply.github.com> Date: Wed, 3 Dec 2025 14:29:40 +0100 Subject: [PATCH 1/3] Update start_near.sh --- neard_image/start_near.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neard_image/start_near.sh b/neard_image/start_near.sh index 7ca37dc..0099dcd 100755 --- a/neard_image/start_near.sh +++ b/neard_image/start_near.sh @@ -52,6 +52,6 @@ ulimit -c unlimited echo "Telemetry: ${TELEMETRY_URL}" echo "Bootnodes: ${BOOT_NODES}" -exec timeout -s SIGINT 900 neard ping --chain-id ${CHAIN_ID} --peer ed25519:E53qRwScBwN3WH9Pc5rVyZxDVHt3KcF9fMD1q6YjMtNQ@144.76.111.43:24567 --protocol-version 76 --latencies-csv-file $NEAR_HOME/latencieslogs.csv & +exec timeout -s SIGINT 900 neard ping --chain-id ${CHAIN_ID} --peer ed25519:E53qRwScBwN3WH9Pc5rVyZxDVHt3KcF9fMD1q6YjMtNQ@144.76.111.43:24567 --protocol-version 82 --latencies-csv-file $NEAR_HOME/latencieslogs.csv & -exec neard "$NEARD_FLAGS" run ${TELEMETRY_URL:+--telemetry-url="$TELEMETRY_URL"} ${BOOT_NODES:+--boot-nodes="$BOOT_NODES"} "$@" \ No newline at end of file +exec neard "$NEARD_FLAGS" run ${TELEMETRY_URL:+--telemetry-url="$TELEMETRY_URL"} ${BOOT_NODES:+--boot-nodes="$BOOT_NODES"} "$@" From b4dab67761f6eec095226afa3037ba5172a5743b Mon Sep 17 00:00:00 2001 From: hcastc00 Date: Thu, 4 Dec 2025 10:46:31 +0100 Subject: [PATCH 2/3] Update to 2.10.1 --- dappnode_package.json | 4 ++-- docker-compose.yml | 2 +- neard_image/start_near.sh | 17 ++++++++++++++--- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/dappnode_package.json b/dappnode_package.json index d877a7b..420ba0e 100644 --- a/dappnode_package.json +++ b/dappnode_package.json @@ -1,7 +1,7 @@ { "name": "near.dnp.dappnode.eth", "version": "0.1.9", - "upstreamVersion": "2.10.0", + "upstreamVersion": "2.10.1", "upstreamRepo": "near/nearcore", "upstreamArg": "UPSTREAM_VERSION", "shortDescription": "Reimagine your world.", @@ -45,4 +45,4 @@ } ], "license": "GPL-3.0" -} +} \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 82b1b95..3baeeb2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,7 +5,7 @@ services: build: context: neard_image args: - UPSTREAM_VERSION: 2.10.0 + UPSTREAM_VERSION: 2.10.1 volumes: - near:/srv/near restart: unless-stopped diff --git a/neard_image/start_near.sh b/neard_image/start_near.sh index 0099dcd..848eb36 100755 --- a/neard_image/start_near.sh +++ b/neard_image/start_near.sh @@ -30,9 +30,9 @@ else fi fi - if [ "$FETCH_BOOT_NODES" = "true" ]; then -BOOT_NODES=$(curl -X POST https://rpc.${CHAIN_ID}.near.org \ -H "Content-Type: application/json" \ +BOOT_NODES=$(curl -X POST https://rpc.${CHAIN_ID}.near.org \ + -H "Content-Type: application/json" \ -d '{ "jsonrpc": "2.0", "method": "network_info", @@ -52,6 +52,17 @@ ulimit -c unlimited echo "Telemetry: ${TELEMETRY_URL}" echo "Bootnodes: ${BOOT_NODES}" -exec timeout -s SIGINT 900 neard ping --chain-id ${CHAIN_ID} --peer ed25519:E53qRwScBwN3WH9Pc5rVyZxDVHt3KcF9fMD1q6YjMtNQ@144.76.111.43:24567 --protocol-version 82 --latencies-csv-file $NEAR_HOME/latencieslogs.csv & +# ============ CHANGE 1: Move ping command to background WITHOUT exec ============ +# REASON: The first "exec" was replacing the shell process, preventing the main +# "neard run" command from ever executing. By removing "exec" here, +# the ping command runs in the background and doesn't block the main node. +# CHANGE: Removed "exec" before "timeout", added "&" to run in background only +timeout -s SIGINT 900 neard ping --chain-id ${CHAIN_ID} --peer ed25519:E53qRwScBwN3WH9Pc5rVyZxDVHt3KcF9fMD1q6YjMtNQ@144.76.111.43:24567 --protocol-version 82 --latencies-csv-file $NEAR_HOME/latencieslogs.csv & +# ============ CHANGE 2: Keep "exec" only on the FINAL command ============ +# REASON: "exec" should only be used on the LAST command in the script. +# It replaces the shell process with the neard process, making it the +# main PID that Docker monitors. This ensures Docker doesn't exit +# when the ping diagnostic finishes. +# CHANGE: Kept "exec" here - this is correct and necessary exec neard "$NEARD_FLAGS" run ${TELEMETRY_URL:+--telemetry-url="$TELEMETRY_URL"} ${BOOT_NODES:+--boot-nodes="$BOOT_NODES"} "$@" From 4bd0770686d3328f9b4b0c0dddfc0ed76d29f581 Mon Sep 17 00:00:00 2001 From: hcastc00 Date: Thu, 4 Dec 2025 10:46:56 +0100 Subject: [PATCH 3/3] Fix background execution of ping command in start_near.sh --- neard_image/start_near.sh | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/neard_image/start_near.sh b/neard_image/start_near.sh index 848eb36..e5df7cb 100755 --- a/neard_image/start_near.sh +++ b/neard_image/start_near.sh @@ -52,17 +52,6 @@ ulimit -c unlimited echo "Telemetry: ${TELEMETRY_URL}" echo "Bootnodes: ${BOOT_NODES}" -# ============ CHANGE 1: Move ping command to background WITHOUT exec ============ -# REASON: The first "exec" was replacing the shell process, preventing the main -# "neard run" command from ever executing. By removing "exec" here, -# the ping command runs in the background and doesn't block the main node. -# CHANGE: Removed "exec" before "timeout", added "&" to run in background only timeout -s SIGINT 900 neard ping --chain-id ${CHAIN_ID} --peer ed25519:E53qRwScBwN3WH9Pc5rVyZxDVHt3KcF9fMD1q6YjMtNQ@144.76.111.43:24567 --protocol-version 82 --latencies-csv-file $NEAR_HOME/latencieslogs.csv & -# ============ CHANGE 2: Keep "exec" only on the FINAL command ============ -# REASON: "exec" should only be used on the LAST command in the script. -# It replaces the shell process with the neard process, making it the -# main PID that Docker monitors. This ensures Docker doesn't exit -# when the ping diagnostic finishes. -# CHANGE: Kept "exec" here - this is correct and necessary exec neard "$NEARD_FLAGS" run ${TELEMETRY_URL:+--telemetry-url="$TELEMETRY_URL"} ${BOOT_NODES:+--boot-nodes="$BOOT_NODES"} "$@"