Page MenuHomePhabricator

[Chronik-client] Upgrade for in-node chronik (WIP)
AbandonedPublic

Authored by emack on Oct 3 2023, 14:27.

Details

Reviewers
bytesofman
Group Reviewers
Restricted Project
Summary

Depends on D14269

This diff uses D14269 as a baseline and points to https://chronik-native.fabien.cash for validation.

In-Node chronik:
https://github.com/Bitcoin-ABC/bitcoin-abc/blob/master/chronik/chronik-proto/proto/chronik.proto

Current chronik:
https://github.com/raipay/chronik/blob/master/chronik-http/proto/chronik.proto

Initial vomit from chronik-client test suite when hooked up to the in-node chronik:

  • No blockDetails: I couldn't find any trace of block version, merkle root or nonce
  • No slp or token: no reference to any SLP APIs or properties, is SLP still supported?
  • No validate-utxos API
  • No BroadcastTx API
  • Network returning as BCH: which is due to the client interpreting 0 as the value for network. Probably because there's no Network enum in the in-node chronik
  • There'll be more in the onion peeling exercise
Test Plan

npm test

Diff Detail

Repository
rABC Bitcoin ABC
Branch
urlCycler
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 25248
Build 50082: Build Diffchronik-client-tests
Build 50081: arc lint + arc unit

Event Timeline

emack requested review of this revision.Oct 3 2023, 14:27
emack planned changes to this revision.Oct 3 2023, 14:28

For discussion in tg

Tail of the build log:

> chronik-client@0.9.0 test
> mocha -r ts-node/register test/test.ts --reporter mocha-junit-reporter --reporter-options mochaFile=test_results/chronik-client-junit.xml --reporter-options testsuitesTitle=Chronik Client Unit Tests --reporter-options rootSuiteTitle=Chronik Client

Error response received from https://chronik-native.fabien.cash
No GET response from https://chronikaaaa.be.cash/xec
No GET response from https://chronikaaaa.be.cash/xec
No GET response from https://chronikzzzz.be.cash/xec
No GET response from https://chronikfffff.be.cash/xec
Error response received from https://chronik-native.fabien.cash
Error response received from https://chronik-native.fabien.cash
Error response received from https://chronik-native.fabien.cash
Error response received from https://chronik-native.fabien.cash
Error response received from https://chronik-native.fabien.cash

<--- Last few GCs --->

[79:0x52b5120]   661299 ms: Mark-sweep 4045.6 (4141.6) -> 4042.8 (4142.9) MB, 1345.0 / 5.9 ms  (average mu = 0.158, current mu = 0.172) allocation failure scavenge might not succeed
[79:0x52b5120]   663788 ms: Mark-sweep 4046.7 (4143.1) -> 4044.0 (4152.4) MB, 2455.2 / 4.9 ms  (average mu = 0.072, current mu = 0.013) task scavenge might not succeed


<--- JS stacktrace --->

FATAL ERROR: Reached heap limit Allocation failed - JavaScript heap out of memory
 1: 0xb090e0 node::Abort() [node]
 2: 0xa1b70e  [node]
 3: 0xce1a20 v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [node]
 4: 0xce1dc7 v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [node]
 5: 0xe99435  [node]
 6: 0xea90fd v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [node]
 7: 0xf0c324 v8::internal::ScavengeJob::Task::RunInternal() [node]
 8: 0xd9f9db non-virtual thunk to v8::internal::CancelableTask::Run() [node]
 9: 0xb720d4  [node]
10: 0xb756b7 node::PerIsolatePlatformData::FlushForegroundTasksInternal() [node]
11: 0x154c706  [node]
12: 0x155ee34  [node]
13: 0x154d058 uv_run [node]
14: 0xa43975 node::SpinEventLoop(node::Environment*) [node]
15: 0xb4b146 node::NodeMainInstance::Run() [node]
16: 0xaccbcc node::Start(int, char**) [node]
17: 0x7f7fe3f05d0a __libc_start_main [/lib/x86_64-linux-gnu/libc.so.6]
18: 0xa408ec  [node]
Aborted (core dumped)
----------|---------|----------|---------|---------|-------------------
File      | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
----------|---------|----------|---------|---------|-------------------
All files |       0 |        0 |       0 |       0 |                   
----------|---------|----------|---------|---------|-------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='0']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='0']
##teamcity[blockClosed name='Code Coverage Summary']
Build chronik-client-tests failed with exit code 134