Page MenuHomePhabricator

[Chronik] Add block_and_blocks integration test into bitcoinsuite-chronik-client
Needs ReviewPublic

Authored by hazzarust on Sat, Feb 22, 14:02.

Details

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

Depends on D17595 - this diff uses features from D17595 such as the test_runner and handler.

Tests verify block and blocks range retrieval from the Chronik client. They check:

Block retrieval by height and hash.
Block order and consistency in ranges.
Error handling for invalid, parked, or invalidated blocks.
This ensures the Chronik client correctly handles block queries and edge cases.

Added detailed comments from TypeScript tests to Rust code, aligned test logic, and ensured error handling and block order validation.

Use the bitcoinsuite-chronik-client to return the tip height and tip hash length, thus we can compare with the python bitcoin tests and assert if they are equal.

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
To ensure no breaking changes from the updated IPC file, run ./contrib/teamcity/build-configurations.py chronik-client-integration-tests from bitcoin-abc to run typescript tests.

Diff Detail

Repository
rABC Bitcoin ABC
Branch
new_blocks
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 32457
Build 64402: Build Diffbuild-bitcoinsuite-chronik-client
Build 64401: arc lint + arc unit

Event Timeline

Owners added a reviewer: Restricted Owners Package.Sat, Feb 22, 14:02
hazzarust updated this revision to Diff 52725.

lint