Related to D17949.
Initializing the failover proxy with only one url can give rise to an unintended DDoS state if the sole url throws an error and chronik-client goes into a loop attempting reconnection.
This is a rare occurence however, so mandating a minimum of two urls upon initialization would significantly reduce the likelihood of this scenario.
Details
- Reviewers
bytesofman - Group Reviewers
Restricted Project
npm test
Diff Detail
- Repository
- rABC Bitcoin ABC
- Branch
- chronikUrlMinimum
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Event Timeline
Tail of the build log:
f.write(f"port={p2p_port(n)}\n") ^^^^^^^^^^^ File "/work/test/functional/setup_scripts/../test_framework/util.py", line 431, in p2p_port return UniquePort.get(PortName.P2P, n) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/work/test/functional/setup_scripts/../test_framework/util.py", line 425, in get raise RuntimeError( RuntimeError: Could not find available PortName.P2P port after 5 attempts (tried ports [20000, 20768, 21536, 22304, 20137]). 2025-04-20T00:25:22.956000Z TestFramework (INFO): Stopping nodes 2025-04-20T00:25:22.956000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/ecash-agora-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002522/setup_scripts/ecash-agora_base_0 2025-04-20T00:25:22.956000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/ecash-agora-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002522/setup_scripts/ecash-agora_base_0/test_framework.log 2025-04-20T00:25:22.956000Z TestFramework (ERROR): 2025-04-20T00:25:22.956000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/ecash-agora-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002522/setup_scripts/ecash-agora_base_0' to consolidate all logs 2025-04-20T00:25:22.956000Z TestFramework (ERROR): 2025-04-20T00:25:22.956000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log. 2025-04-20T00:25:22.956000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues 2025-04-20T00:25:22.956000Z TestFramework (ERROR): [1mWARNING![0m There is already a bitcoind process running on this system. Tests may fail unexpectedly due to resource contention! Running Unit Tests for Test Framework Modules [1msetup_scripts/ecash-agora_base.py[0m started [1msetup_scripts/ecash-agora_base.py[0m failed, Duration: 0 s [1mstdout:[0m [1mstderr:[0m [1m TEST | STATUS | DURATION [0m[0;31msetup_scripts/ecash-agora_base.py | ✖ Failed | 0 s [0m[0;31m[1m ALL | ✖ Failed | 0 s (accumulated) [0m[0mRuntime: 0 s Test runner completed with code 1 ------------|---------|----------|---------|---------|---------------------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------|---------|----------|---------|---------|---------------------------------------------- All files | 3.73 | 6.59 | 3.33 | 7.06 | ad.ts | 6.6 | 15.62 | 20 | 12.72 | 6,33-100,127-146 agora.ts | 3.54 | 2.9 | 1.56 | 6.97 | 14,40,45,110-490,542-973,993-999 consts.ts | 57.14 | 83.33 | 100 | 100 | 1 index.ts | 0 | 0 | 0 | 0 | inputs.ts | 0 | 0 | 0 | 0 | 17-155 oneshot.ts | 5 | 22.72 | 4 | 9.87 | 5,77-223,234-251,263-270,279-286 partial.ts | 2.2 | 3.62 | 1.92 | 4.32 | ...6,1331-1341,1351-1370,1387-1394,1404-1411 ------------|---------|----------|---------|---------|---------------------------------------------- ##teamcity[blockOpened name='Code Coverage Summary'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='43'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='1151'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='25'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='379'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='5'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='150'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='43'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='609'] ##teamcity[blockClosed name='Code Coverage Summary'] mv: cannot stat 'test_results/ecash-agora-integration-tests-junit.xml': No such file or directory Build ecash-agora-integration-tests failed with exit code 1
Failed tests logs:
====== ALP: "before all" hook for "TxBuilder P2PKH ALP".ALP "before all" hook for "TxBuilder P2PKH ALP" ====== Error: the event {} was thrown, throw an Error :) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ====== ALP: "after all" hook for "TxBuilder P2PKH ALP".ALP "after all" hook for "TxBuilder P2PKH ALP" ====== TypeError: Cannot read properties of undefined (reading 'stop') at Context.<anonymous> (tests/alp.test.ts:46:16) at process.processImmediate (node:internal/timers:483:21) ====== SLP Integration Test: "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE".SLP Integration Test "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE" ====== Error: the event {} was thrown, throw an Error :) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ====== SLP Integration Test: "after all" hook for "TxBuilder P2PKH SLP NFT1".SLP Integration Test "after all" hook for "TxBuilder P2PKH SLP NFT1" ====== TypeError: Cannot read properties of undefined (reading 'stop') at Context.<anonymous> (tests/slp.test.ts:70:16) at process.processImmediate (node:internal/timers:483:21) ====== TxBuilder: "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))".TxBuilder "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))" ====== Error: the event {} was thrown, throw an Error :) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ====== TxBuilder: "after all" hook for "TxBuilder leftover failure".TxBuilder "after all" hook for "TxBuilder leftover failure" ====== TypeError: Cannot read properties of undefined (reading 'stop') at Context.<anonymous> (tests/txBuilder.test.ts:62:16) at process.processImmediate (node:internal/timers:483:21)
Each failure log is accessible here:
ALP: "before all" hook for "TxBuilder P2PKH ALP".ALP "before all" hook for "TxBuilder P2PKH ALP"
ALP: "after all" hook for "TxBuilder P2PKH ALP".ALP "after all" hook for "TxBuilder P2PKH ALP"
SLP Integration Test: "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE".SLP Integration Test "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE"
SLP Integration Test: "after all" hook for "TxBuilder P2PKH SLP NFT1".SLP Integration Test "after all" hook for "TxBuilder P2PKH SLP NFT1"
TxBuilder: "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))".TxBuilder "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))"
TxBuilder: "after all" hook for "TxBuilder leftover failure".TxBuilder "after all" hook for "TxBuilder leftover failure"
Tail of the build log:
f.write(f"port={p2p_port(n)}\n") ^^^^^^^^^^^ File "/work/test/functional/setup_scripts/../test_framework/util.py", line 431, in p2p_port return UniquePort.get(PortName.P2P, n) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/work/test/functional/setup_scripts/../test_framework/util.py", line 425, in get raise RuntimeError( RuntimeError: Could not find available PortName.P2P port after 5 attempts (tried ports [20000, 20768, 21536, 22304, 20137]). 2025-04-20T00:27:32.767000Z TestFramework (INFO): Stopping nodes 2025-04-20T00:27:32.767000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/ecash-agora-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002732/setup_scripts/ecash-agora_base_0 2025-04-20T00:27:32.767000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/ecash-agora-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002732/setup_scripts/ecash-agora_base_0/test_framework.log 2025-04-20T00:27:32.767000Z TestFramework (ERROR): 2025-04-20T00:27:32.767000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/ecash-agora-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002732/setup_scripts/ecash-agora_base_0' to consolidate all logs 2025-04-20T00:27:32.767000Z TestFramework (ERROR): 2025-04-20T00:27:32.768000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log. 2025-04-20T00:27:32.768000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues 2025-04-20T00:27:32.768000Z TestFramework (ERROR): [1mWARNING![0m There is already a bitcoind process running on this system. Tests may fail unexpectedly due to resource contention! Running Unit Tests for Test Framework Modules [1msetup_scripts/ecash-agora_base.py[0m started [1msetup_scripts/ecash-agora_base.py[0m failed, Duration: 0 s [1mstdout:[0m [1mstderr:[0m [1m TEST | STATUS | DURATION [0m[0;31msetup_scripts/ecash-agora_base.py | ✖ Failed | 0 s [0m[0;31m[1m ALL | ✖ Failed | 0 s (accumulated) [0m[0mRuntime: 0 s Test runner completed with code 1 ------------|---------|----------|---------|---------|---------------------------------------------- File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ------------|---------|----------|---------|---------|---------------------------------------------- All files | 3.73 | 6.59 | 3.33 | 7.06 | ad.ts | 6.6 | 15.62 | 20 | 12.72 | 6,33-100,127-146 agora.ts | 3.54 | 2.9 | 1.56 | 6.97 | 14,40,45,110-490,542-973,993-999 consts.ts | 57.14 | 83.33 | 100 | 100 | 1 index.ts | 0 | 0 | 0 | 0 | inputs.ts | 0 | 0 | 0 | 0 | 17-155 oneshot.ts | 5 | 22.72 | 4 | 9.87 | 5,77-223,234-251,263-270,279-286 partial.ts | 2.2 | 3.62 | 1.92 | 4.32 | ...6,1331-1341,1351-1370,1387-1394,1404-1411 ------------|---------|----------|---------|---------|---------------------------------------------- ##teamcity[blockOpened name='Code Coverage Summary'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='43'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='1151'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='25'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='379'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='5'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='150'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='43'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='609'] ##teamcity[blockClosed name='Code Coverage Summary'] mv: cannot stat 'test_results/ecash-agora-integration-tests-junit.xml': No such file or directory Build ecash-agora-integration-tests failed with exit code 1
Failed tests logs:
====== ALP: "before all" hook for "TxBuilder P2PKH ALP".ALP "before all" hook for "TxBuilder P2PKH ALP" ====== Error: the event {} was thrown, throw an Error :) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ====== ALP: "after all" hook for "TxBuilder P2PKH ALP".ALP "after all" hook for "TxBuilder P2PKH ALP" ====== TypeError: Cannot read properties of undefined (reading 'stop') at Context.<anonymous> (tests/alp.test.ts:46:16) at process.processImmediate (node:internal/timers:483:21) ====== SLP Integration Test: "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE".SLP Integration Test "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE" ====== Error: the event {} was thrown, throw an Error :) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ====== SLP Integration Test: "after all" hook for "TxBuilder P2PKH SLP NFT1".SLP Integration Test "after all" hook for "TxBuilder P2PKH SLP NFT1" ====== TypeError: Cannot read properties of undefined (reading 'stop') at Context.<anonymous> (tests/slp.test.ts:70:16) at process.processImmediate (node:internal/timers:483:21) ====== TxBuilder: "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))".TxBuilder "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))" ====== Error: the event {} was thrown, throw an Error :) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) ====== TxBuilder: "after all" hook for "TxBuilder leftover failure".TxBuilder "after all" hook for "TxBuilder leftover failure" ====== TypeError: Cannot read properties of undefined (reading 'stop') at Context.<anonymous> (tests/txBuilder.test.ts:62:16) at process.processImmediate (node:internal/timers:483:21)
Each failure log is accessible here:
ALP: "before all" hook for "TxBuilder P2PKH ALP".ALP "before all" hook for "TxBuilder P2PKH ALP"
ALP: "after all" hook for "TxBuilder P2PKH ALP".ALP "after all" hook for "TxBuilder P2PKH ALP"
SLP Integration Test: "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE".SLP Integration Test "before all" hook for "TxBuilder P2PKH SLP FUNGIBLE"
SLP Integration Test: "after all" hook for "TxBuilder P2PKH SLP NFT1".SLP Integration Test "after all" hook for "TxBuilder P2PKH SLP NFT1"
TxBuilder: "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))".TxBuilder "before all" hook for "TxBuilder P2PKH Wallet with mixed outputs (TxOutput, TxOutput with Script.fromAddress(p2pkh), TxOutput with Script.fromAddress(p2sh))"
TxBuilder: "after all" hook for "TxBuilder leftover failure".TxBuilder "after all" hook for "TxBuilder leftover failure"
Tail of the build log:
2025-04-20T00:28:57.497000Z TestFramework (INFO): Step 1: Send an SLP NFT1 genesis tx 2025-04-20T00:28:57.499000Z TestFramework (INFO): Step 2: Mint a child token 2025-04-20T00:28:57.501000Z TestFramework (INFO): Step 3: Send a child token 2025-04-20T00:28:57.502000Z TestFramework (INFO): Step 4: NFT 1 child genesis 2025-04-20T00:28:57.504000Z TestFramework (INFO): Step 5: Mine a block token_slp_nft1.ts tests complete, shutting down child process 2025-04-20T00:28:57.508000Z TestFramework (INFO): Got a next message but no more step, exiting 2025-04-20T00:28:57.559000Z TestFramework (INFO): Stopping nodes 2025-04-20T00:28:57.711000Z TestFramework (INFO): Cleaning up /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002855/setup_scripts/chronik-client_token_slp_nft1_0 on exit 2025-04-20T00:28:57.711000Z TestFramework (INFO): Tests successful Running Unit Tests for Test Framework Modules [1msetup_scripts/chronik-client_token_slp_nft1.py[0m started [1msetup_scripts/chronik-client_token_slp_nft1.py[0m passed, Duration: 2 s [1m TEST | STATUS | DURATION [0m[0;32msetup_scripts/chronik-client_token_slp_nft1.py | ✓ Passed | 2 s [0m[1m ALL | ✓ Passed | 2 s (accumulated) [0mRuntime: 2 s testRunner complete in token_slp_nft1.ts Starting test_runner for chronik-client_websocket Test runner for chronik-client_websocket started 2025-04-20T00:28:58.028000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_002857/setup_scripts/chronik-client_websocket_0 chronikUrl set to ["http://127.0.0.1:26000"] Mocha timeout set to 240 seconds 2025-04-20T00:29:00.040000Z TestFramework (INFO): Passed test setup data to mocha 2025-04-20T00:29:06.986000Z TestFramework (INFO): Step 1: Avalanche finalize a block 2025-04-20T00:30:08.866000Z TestFramework (INFO): Step 2: Broadcast 1 tx to a p2pk, p2pkh, and p2sh address 2025-04-20T00:31:09.116000Z TestFramework (INFO): Step 3: Mine a block with these txs 2025-04-20T00:32:09.130000Z TestFramework (INFO): Step 4: Finalize the block containing these txs with Avalanche Exited websocket.ts test setup after exceeding mocha timeout. ----------------------|---------|----------|---------|---------|------------------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------------------|---------|----------|---------|---------|------------------------------------ All files | 4.91 | 0.76 | 1.54 | 4.82 | chronik-client | 100 | 100 | 100 | 100 | index.ts | 100 | 100 | 100 | 100 | chronik-client/proto | 3.82 | 0.62 | 1.38 | 3.85 | chronik.ts | 3.82 | 0.62 | 1.38 | 3.85 | ...6,6451-6490,6498-6603,6607-6616 chronik-client/src | 9.59 | 2.35 | 2.04 | 8.98 | ChronikClient.ts | 6.14 | 1.63 | 1.76 | 6.18 | ...26-498,511-568,582-686,754-1557 failoverProxy.ts | 8.33 | 6.45 | 3.84 | 8.57 | 26-43,62-327 hex.ts | 31.57 | 0 | 0 | 33.33 | 33-37,41-45,49-62,66-68 validation.ts | 26.82 | 0 | 0 | 18.91 | 14-49,54-55,62-63,73-88 ----------------------|---------|----------|---------|---------|------------------------------------ ##teamcity[blockOpened name='Code Coverage Summary'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='158'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='3212'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='16'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='2102'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='9'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='581'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='153'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='3174'] ##teamcity[blockClosed name='Code Coverage Summary'] mv: cannot stat 'test_results/chronik-client-integration-tests-junit.xml': No such file or directory Build chronik-client-integration-tests failed with exit code 1
Tail of the build log:
2025-04-20T00:32:31.774000Z TestFramework (INFO): Step 1: Send an SLP NFT1 genesis tx 2025-04-20T00:32:31.777000Z TestFramework (INFO): Step 2: Mint a child token 2025-04-20T00:32:31.779000Z TestFramework (INFO): Step 3: Send a child token 2025-04-20T00:32:31.781000Z TestFramework (INFO): Step 4: NFT 1 child genesis 2025-04-20T00:32:31.783000Z TestFramework (INFO): Step 5: Mine a block token_slp_nft1.ts tests complete, shutting down child process 2025-04-20T00:32:31.788000Z TestFramework (INFO): Got a next message but no more step, exiting 2025-04-20T00:32:31.839000Z TestFramework (INFO): Stopping nodes 2025-04-20T00:32:31.941000Z TestFramework (INFO): Cleaning up /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_003230/setup_scripts/chronik-client_token_slp_nft1_0 on exit 2025-04-20T00:32:31.941000Z TestFramework (INFO): Tests successful Running Unit Tests for Test Framework Modules [1msetup_scripts/chronik-client_token_slp_nft1.py[0m started [1msetup_scripts/chronik-client_token_slp_nft1.py[0m passed, Duration: 1 s [1m TEST | STATUS | DURATION [0m[0;32msetup_scripts/chronik-client_token_slp_nft1.py | ✓ Passed | 1 s [0m[1m ALL | ✓ Passed | 1 s (accumulated) [0mRuntime: 1 s testRunner complete in token_slp_nft1.ts Starting test_runner for chronik-client_websocket Test runner for chronik-client_websocket started 2025-04-20T00:32:32.281000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_₿₵_🏃_20250420_003232/setup_scripts/chronik-client_websocket_0 chronikUrl set to ["http://127.0.0.1:26000"] Mocha timeout set to 240 seconds 2025-04-20T00:32:33.494000Z TestFramework (INFO): Passed test setup data to mocha 2025-04-20T00:32:41.243000Z TestFramework (INFO): Step 1: Avalanche finalize a block 2025-04-20T00:33:43.404000Z TestFramework (INFO): Step 2: Broadcast 1 tx to a p2pk, p2pkh, and p2sh address 2025-04-20T00:34:43.481000Z TestFramework (INFO): Step 3: Mine a block with these txs 2025-04-20T00:35:43.496000Z TestFramework (INFO): Step 4: Finalize the block containing these txs with Avalanche Exited websocket.ts test setup after exceeding mocha timeout. ----------------------|---------|----------|---------|---------|------------------------------------ File | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s ----------------------|---------|----------|---------|---------|------------------------------------ All files | 4.91 | 0.76 | 1.54 | 4.82 | chronik-client | 100 | 100 | 100 | 100 | index.ts | 100 | 100 | 100 | 100 | chronik-client/proto | 3.82 | 0.62 | 1.38 | 3.85 | chronik.ts | 3.82 | 0.62 | 1.38 | 3.85 | ...6,6451-6490,6498-6603,6607-6616 chronik-client/src | 9.59 | 2.35 | 2.04 | 8.98 | ChronikClient.ts | 6.14 | 1.63 | 1.76 | 6.18 | ...26-498,511-568,582-686,754-1557 failoverProxy.ts | 8.33 | 6.45 | 3.84 | 8.57 | 26-43,62-327 hex.ts | 31.57 | 0 | 0 | 33.33 | 33-37,41-45,49-62,66-68 validation.ts | 26.82 | 0 | 0 | 18.91 | 14-49,54-55,62-63,73-88 ----------------------|---------|----------|---------|---------|------------------------------------ ##teamcity[blockOpened name='Code Coverage Summary'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='158'] ##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='3212'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='16'] ##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='2102'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='9'] ##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='581'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='153'] ##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='3174'] ##teamcity[blockClosed name='Code Coverage Summary'] mv: cannot stat 'test_results/chronik-client-integration-tests-junit.xml': No such file or directory Build chronik-client-integration-tests failed with exit code 1
Requiring 2 URLs is a breaking update that changes the API behavior because our failoverProxy is not just for fault handling, it's the entry point for requests. For _request, if there's only 1 URL in the array, it will function normally when encountering failures. For the "throw err;" on line 152, regarding WebSocket, the reconnection issue in ws.onclose will correctly throw an error and won't enter a loop if there's only 1 URL, on line 327.
The loop occurs when an "already connected node" encounters a failure, continuously throwing ws.onclose without closing the WebSocket, causing it to keep triggering reconnection.
This is absurd. This doesn't fix any problem at all and adds a requirement that makes absolutely zero sense.
If it's that easy to DoS a chronik instance one can spam messages with curl.