Page MenuHomePhabricator

Chronik - Add script and address subscription to websocket.rs in bitcoinsuite-chroni-client
AbandonedPublicDraft

Authored by hazzarust on May 19 2025, 09:23.

Details

Reviewers
None
Group Reviewers
Restricted Owners Package(Owns No Changed Paths)
Restricted Project
Test Plan

Please set BUILD_DIR env to export BUILD_DIR="/path/to/build_dir
UNIX: ./contrib/teamcity/build-configurations.py build-bitcoinsuite-chronik-client

Diff Detail

Repository
rABC Bitcoin ABC
Branch
script_sub
Lint
Lint Passed
SeverityLocationCodeMessage
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:230WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:266WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:270WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:274WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:278WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:285WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:286WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:295WHITESPACE1Found trailing whitespace(s).
Auto-Fixmodules/bitcoinsuite-chronik-client/tests/websocket.rs:324WHITESPACE1Found trailing whitespace(s).
Unit
No Test Coverage
Build Status
Buildable 33401
Build 66281: Build Diffchronik-client-integration-tests · ecash-lib-integration-tests · ecash-agora-integration-tests · build-chronik-plugins · build-chronik · build-bitcoinsuite-chronik-client
Build 66280: arc lint + arc unit

Event Timeline

Tail of the build log:

     Running tests/block_and_blocks.rs (/work/target/debug/deps/block_and_blocks-2f2bd7ea801a8ce2)

running 1 test
test block_and_blocks ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.55s

     Running tests/blockchain_info.rs (/work/target/debug/deps/blockchain_info-9881c06338da78c2)

running 1 test
test blockchain_info ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.71s

     Running tests/blocktxs_and_tx_and_rawtx.rs (/work/target/debug/deps/blocktxs_and_tx_and_rawtx-856e2b0926d038d7)

running 1 test
test blocktxs_and_tx_and_rawtx ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 3.43s

     Running tests/broadcast_txs_and_validate_rawtx.rs (/work/target/debug/deps/broadcast_txs_and_validate_rawtx-629c65f52834cc77)

running 1 test
test broadcast_txs_and_validate_rawtx ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.27s

     Running tests/chronik_info.rs (/work/target/debug/deps/chronik_info-4934908305083cd1)

running 1 test
test test_chronik_version ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.69s

     Running tests/test_chronik_client.rs (/work/target/debug/deps/test_chronik_client-e38e281bb0df5755)

running 14 tests
test test_blockchain_info ... ok
test test_raw_tx_missing ... ok
test test_broadcast_tx ... ok
test test_broadcast_txs ... ok
test test_slpv2_token ... ok
test test_slpv1_token ... ok
test test_history ... ok
test test_blocks ... ok
test test_raw_tx ... ok
test test_chronik_info ... ok
test test_block ... ok
test test_tx ... ok
test test_tx_missing ... ok
test test_block_txs ... ok

test result: ok. 14 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 2.31s

     Running tests/websocket.rs (/work/target/debug/deps/websocket-fb54ac2e50c0c3ef)

running 1 test
test websocket has been running for over 60 seconds
Build build-bitcoinsuite-chronik-client timed out after 1200.0s

This fails - just pushing to show progress (failing due to subscription queue but that's okay)x

Tail of the build log:

thread 'websocket' panicked at modules/bitcoinsuite-chronik-client/tests/websocket.rs:459:21:
assertion `left == right` failed
  left: Some(WsMsg { msg_type: Some(Tx(MsgTx { msg_type: TxConfirmed, txid: [209, 131, 214, 158, 221, 101, 140, 158, 243, 107, 17, 117, 109, 17, 20, 140, 47, 245, 167, 99, 221, 208, 233, 46, 168, 24, 71, 166, 131, 92, 39, 251] })) })
 right: Some(WsMsg { msg_type: Some(Block(MsgBlock { msg_type: BlkFinalized, block_hash: [245, 100, 54, 198, 1, 89, 60, 32, 224, 157, 232, 40, 213, 251, 169, 219, 133, 240, 232, 192, 133, 44, 211, 28, 216, 125, 152, 21, 65, 158, 108, 84], block_height: 218, block_timestamp: 1747925530, coinbase_data: None })) })
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

Output: 2025-05-22T14:52:02.212000Z TestFramework (INFO): Initializing test directory /work/abc-ci-builds/build-bitcoinsuite-chronik-client/test/tmp/test_runner_₿₵_🏃_20250522_145202_16605/setup_scripts/chronik-client_websocket_0
2025-05-22T14:52:03.413000Z TestFramework (INFO): Passed test setup data to mocha
2025-05-22T14:52:10.198000Z TestFramework (INFO): Step 1: Avalanche finalize a block
2025-05-22T14:52:12.596000Z TestFramework (INFO): Step 2: Broadcast 1 tx to a p2pk, p2pkh, and p2sh address
2025-05-22T14:52:12.726000Z TestFramework (INFO): Step 3: Mine a block with these txs
2025-05-22T14:52:12.745000Z TestFramework (INFO): Step 4: Finalize the block containing these txs with Avalanche
2025-05-22T14:52:14.775000Z TestFramework (ERROR): Unexpected exception caught during testing
Traceback (most recent call last):
  File "/work/test/functional/setup_scripts/../test_framework/test_framework.py", line 152, in main
    self._run_test_internal()
  File "/work/test/functional/setup_scripts/setup_framework.py", line 51, in _run_test_internal
    cmds = receive_ipc_messages(timeout)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/work/test/functional/setup_scripts/ipc.py", line 67, in receive_ipc_messages
    if messages[-1].endswith(b"\n"):
       ~~~~~~~~^^^^
IndexError: list index out of range
2025-05-22T14:52:14.826000Z TestFramework (INFO): Stopping nodes
2025-05-22T14:52:14.927000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/build-bitcoinsuite-chronik-client/test/tmp/test_runner_₿₵_🏃_20250522_145202_16605/setup_scripts/chronik-client_websocket_0
2025-05-22T14:52:14.928000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/build-bitcoinsuite-chronik-client/test/tmp/test_runner_₿₵_🏃_20250522_145202_16605/setup_scripts/chronik-client_websocket_0/test_framework.log
2025-05-22T14:52:14.928000Z TestFramework (ERROR): 
2025-05-22T14:52:14.928000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/build-bitcoinsuite-chronik-client/test/tmp/test_runner_₿₵_🏃_20250522_145202_16605/setup_scripts/chronik-client_websocket_0' to consolidate all logs
2025-05-22T14:52:14.928000Z TestFramework (ERROR): 
2025-05-22T14:52:14.928000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2025-05-22T14:52:14.929000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2025-05-22T14:52:14.929000Z TestFramework (ERROR): 
Running Unit Tests for Test Framework Modules
setup_scripts/chronik-client_websocket.py started
setup_scripts/chronik-client_websocket.py failed, Duration: 13 s

stdout:

stderr:


TEST                                      | STATUS    | DURATION

setup_scripts/chronik-client_websocket.py | ✖ Failed  | 13 s

ALL                                       | ✖ Failed  | 13 s (accumulated) 
Runtime: 13 s


thread 'websocket' panicked at /work/modules/bitcoinsuite-chronik-client/src/test_runner.rs:82:9:
Test chronik-client_websocket failed!


failures:
    websocket

test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 13.05s

error: test failed, to rerun pass `-p bitcoinsuite-chronik-client --test websocket`
Build build-bitcoinsuite-chronik-client failed with exit code 101

Needs cleaning for sure but everything seems to be working