From 92055df2a776e1ca2c967da87ced43f2762b85b5 Mon Sep 17 00:00:00 2001 From: David Lutterkort Date: Wed, 14 Sep 2022 11:43:34 -0700 Subject: [PATCH] docker: Restore old behvior around BLOCK_INGESTOR PR https://github.com/graphprotocol/graph-node/pull/3688 introduced a regression where the setting of BLOCK_INGESTOR had to be changed from unmangled to mangled. Fixes https://github.com/graphprotocol/graph-node/issues/3936 --- docker/start | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docker/start b/docker/start index 0c003ccefd1..435fbe5429f 100755 --- a/docker/start +++ b/docker/start @@ -80,17 +80,12 @@ run_graph_node() { } start_query_node() { + # Query nodes are never the block ingestor export DISABLE_BLOCK_INGESTOR=true run_graph_node } start_index_node() { - # Only the index node with the name set in BLOCK_INGESTOR should ingest - # blocks - if [[ ${node_id} != "${BLOCK_INGESTOR}" ]]; then - export DISABLE_BLOCK_INGESTOR=true - fi - run_graph_node } @@ -98,6 +93,14 @@ start_combined_node() { run_graph_node } +# Only the index node with the name set in BLOCK_INGESTOR should ingest +# blocks. For historical reasons, that name is set to the unmangled version +# of `node_id` and we need to check whether we are the block ingestor +# before possibly mangling the node_id. +if [[ ${node_id} != "${BLOCK_INGESTOR}" ]]; then + export DISABLE_BLOCK_INGESTOR=true +fi + # Allow operators to opt out of legacy character # restrictions on the node ID by setting enablement # variable to a non-zero length string: