Page MenuHomePhabricator

[Chronik] Add `/plugin/:plugin_name/groups` HTTP endpoint
ClosedPublic

Authored by tobias_ruck on Jul 30 2024, 23:27.

Details

Reviewers
Fabien
Group Reviewers
Restricted Project
Commits
rABCc0eba5d32d58: [Chronik] Add `/plugin/:plugin_name/groups` HTTP endpoint
Summary

The purpose of this endpoint is to allow users an easy way to explore the groups indexed by a plugin.

Under normal usage, this API will be extremely fast, as it just slices exactly the requested info from the DB. This is because the way users query data is very close to how it's layed out in the DB.

There's one edge case where adjacent groups with lots of UTXOs that are all spent in the mempool could require a bigger DB scan; we prevent this by setting an upper limit on the number of skipped groups, and use a heuristic where groups with more than 500 UTXOs in the DB are assumed to have some unspent UTXOs (even if all are spent in the mempool). Worst case, an attacker could create a setup that makes us waste around 500k UTXO reads per request (~20MB), which will be cached and adjacent in storage anyway, which worse case should be around 100ms without cache.

This will make the API return incorrect results (i.e. too many groups) in certain edge cases, but this is entirely acceptable:

  1. There's no guarantee that the returned groups will still be correct after the request returned anyway, as someone could've made transactions spending the UTXOs of the group, so users of the API will have to expect this behavior anyway for different reasons.
  2. The inconsistency will be resolved once the txs are mined.
  3. The API will never incorrectly leave out groups, only incorrectly keep them.
  4. The danger of having an API spin for a long time is much bigger, as it could "stun lock" Chronik by keeping read access on the RwLock for a long time.

The prefix param is intended to make plugins prefix different kinds of groups with different prefixes (e.g. "T" for token IDs, and "P" for public keys, etc.), so this allows a simple selection of "sub-groups" of a plugin.

The start params is intended to allow a form of pagination; users can put the last group of the last query here to get the next page.

For convenience, the API returns a next_start value which, if provided as start, will guarantee to make progress on the next call. If empty, it indicates if there's no more values.

Note that this diff changes how PluginMember is serialized (and therefore is a DB schema update), but since currently nobody is using the system yet, this is fine. The change is needed as postcard prefixes the length of the group, which makes it impossible to use for a prefix search.

An example how this endpoint would be useful is for the Agora plugin:

  1. It allows the user to get every token ID that has an offer in a paginated way, so they can have an overview what tokens even exists.
  2. Then, when the user clicks on a token ID, the app queries all the offered UTXOs for this token ID and can display them.

This is especially interesting for NFTs, as one sub-group could have all the NFT collections ("NFT Groups"), another sub-group could have all the NFTs of a specific collection, etc., allowing for a drill-down without any indexing outside of the Chronik plugin. This would make integration of Agora into other wallets very convenient.

Depends on D16551.

Test Plan

./test/functional/test_runner.py chronik_plugin_groups

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

privatize block_height_by_tx_num again

tobias_ruck edited the summary of this revision. (Show Details)

better unify both endpoints into one

tobias_ruck retitled this revision from [Chronik] Add `/plugin/:plugin_name/(un)confirmed-groups` HTTP endpoints to [Chronik] Add `/plugin/:plugin_name/groups` HTTP endpoints.Jul 31 2024, 10:39
tobias_ruck edited the summary of this revision. (Show Details)

Tail of the build log:

   Doc-tests chronik-bridge

running 0 tests

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

   Doc-tests chronik-db

running 0 tests

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

   Doc-tests chronik-http

running 1 test
test chronik/chronik-http/src/protobuf.rs - protobuf::Protobuf (line 29) ... ok

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

   Doc-tests chronik-indexer

running 0 tests

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

   Doc-tests chronik-plugin

running 0 tests

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

   Doc-tests chronik-plugin-common

running 0 tests

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

   Doc-tests chronik-plugin-impl

running 0 tests

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

   Doc-tests chronik-proto

running 0 tests

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

   Doc-tests chronik-util

running 2 tests
test chronik/chronik-util/src/log.rs - log::log (line 65) ... ignored
test chronik/chronik-util/src/log.rs - log::log_chronik (line 87) ... ignored

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

ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik failed with exit code 1

Tail of the build log:

    Checking chronik-plugin v0.1.0 (/work/chronik/chronik-plugin)
    Checking pin-project v1.1.5
    Checking serde_spanned v0.6.6
    Checking toml_datetime v0.6.6
   Compiling pyo3 v0.22.2
    Checking seahash v4.1.0
    Checking hyper v1.2.0
    Checking winnow v0.6.13
    Checking sync_wrapper v0.1.2
    Checking mime v0.3.17
    Checking topo_sort v0.4.0
    Checking axum-core v0.4.3
    Checking tokio-tungstenite v0.21.0
    Checking tower v0.4.13
    Checking memoffset v0.9.1
    Checking serde_json v1.0.115
    Checking serde_urlencoded v0.7.1
    Checking hyper-util v0.1.3
    Checking futures-executor v0.3.30
    Checking serde_path_to_error v0.1.16
    Checking matchit v0.7.3
    Checking unicode-segmentation v1.11.0
    Checking base64 v0.21.7
    Checking sync_wrapper v1.0.1
   Compiling chronik-proto v0.1.0 (/work/chronik/chronik-proto)
    Checking unindent v0.2.3
    Checking futures v0.3.30
    Checking tower-http v0.5.2
    Checking convert_case v0.6.0
    Checking toml_edit v0.22.14
   Compiling chronik-bridge v0.1.0 (/work/chronik/chronik-bridge)
   Compiling librocksdb-sys v0.11.0+8.1.1
    Checking axum v0.7.5
   Compiling pyo3-macros v0.22.2
    Checking toml v0.8.14
    Checking chronik-plugin-impl v0.1.0 (/work/chronik/chronik-plugin-impl)
    Checking rocksdb v0.21.0
    Checking chronik-db v0.1.0 (/work/chronik/chronik-db)
error: bounds on generic parameters are not enforced in type aliases
  --> chronik/chronik-db/src/io/group_utxos.rs:28:25
   |
28 | pub type DbGroupUtxo<G: Group> = UtxoEntry<G::UtxoData>;
   |                         ^^^^^
   |
help: use fully disambiguated paths (i.e., `<T as Trait>::Assoc`) to refer to associated types in type aliases
  --> chronik/chronik-db/src/io/group_utxos.rs:28:44
   |
28 | pub type DbGroupUtxo<G: Group> = UtxoEntry<G::UtxoData>;
   |                                            ^^^^^^^^^^^
   = note: `-D type-alias-bounds` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(type_alias_bounds)]`
help: the bound will not be checked when the type alias is used, and should be removed
   |
28 - pub type DbGroupUtxo<G: Group> = UtxoEntry<G::UtxoData>;
28 + pub type DbGroupUtxo<G> = UtxoEntry<G::UtxoData>;
   |

error: could not compile `chronik-db` (lib) due to 1 previous error
ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik-plugins failed with exit code 1

Tail of the build log:

  File "/work/abc-ci-builds/ecash-lib-integration-tests/test/functional/test_runner.py", line 361, in main
    os.makedirs(tmpdir)
  File "/usr/lib/python3.9/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/work/abc-ci-builds/ecash-lib-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240731_104805'
Test runner completed with code 1
----------------------------|---------|----------|---------|---------|------------------------------
File                        | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s            
----------------------------|---------|----------|---------|---------|------------------------------
All files                   |   62.06 |    52.25 |   62.26 |   62.08 |                              
 ecash-lib                  |       0 |        0 |       0 |       0 |                              
  eslint.config.js          |       0 |        0 |       0 |       0 |                              
 ecash-lib/src              |   71.13 |    54.46 |   72.15 |   70.85 |                              
  ecc.ts                    |   57.14 |    83.33 |      40 |   57.14 | 23-31                        
  hash.ts                   |   88.88 |    83.33 |      80 |   88.88 | 14                           
  index.ts                  |       0 |        0 |       0 |       0 |                              
  indexBrowser.ts           |       0 |        0 |       0 |       0 |                              
  indexNodeJs.ts            |       0 |        0 |       0 |       0 |                              
  initBrowser.ts            |       0 |      100 |       0 |       0 | 11-13                        
  initNodeJs.ts             |     100 |      100 |     100 |     100 |                              
  op.ts                     |      40 |    44.44 |   66.66 |      40 | ...4,107,109,117-122,133-161 
  opcode.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  script.ts                 |   52.63 |    38.09 |      60 |    50.9 | ...4-135,146,156,166,188-199 
  sigHashType.ts            |   77.77 |       44 |   85.71 |   77.77 | 26-38                        
  tx.ts                     |   93.47 |    79.16 |    90.9 |   93.18 | 123-125                      
  txBuilder.ts              |   52.74 |    46.42 |   66.66 |   51.72 | ...3-107,124-179,214,244-248 
  unsignedTx.ts             |    73.8 |    57.14 |   78.57 |   74.07 | ...3,151,159,184,192,198-201 
 ecash-lib/src/ffi          |   28.26 |    15.94 |   16.98 |   28.98 |                              
  ecash_lib_wasm_browser.js |       0 |        0 |       0 |       0 | 3-336                        
  ecash_lib_wasm_nodejs.js  |    61.9 |       55 |   39.13 |   62.75 | ...1,197-215,237,250-251,255 
 ecash-lib/src/io           |   59.55 |    60.29 |   70.58 |   58.77 |                              
  bytes.ts                  |     7.4 |    71.42 |    12.5 |     7.4 | 13-64                        
  hex.ts                    |   82.05 |     62.5 |      80 |   82.35 | 41-45,50,58                  
  int.ts                    |       0 |        0 |       0 |       0 |                              
  str.ts                    |   85.71 |    83.33 |   66.66 |   85.71 | 15                           
  varsize.ts                |      32 |    36.36 |   66.66 |      32 | 14-24,40-47                  
  writer.ts                 |       0 |        0 |       0 |       0 |                              
  writerbytes.ts            |   83.33 |    68.42 |     100 |   83.33 | 33,43,53,63,79               
  writerlength.ts           |     100 |    83.33 |     100 |     100 | 1                            
 ecash-lib/src/test         |   87.67 |    53.33 |    87.5 |   88.23 |                              
  testRunner.ts             |   87.67 |    53.33 |    87.5 |   88.23 | 69-71,84-85,108,119,162      
 ecash-lib/src/token        |   87.15 |    72.85 |   93.33 |   87.07 |                              
  alp.ts                    |   82.92 |    89.47 |   83.33 |   82.92 | 110-123,142                  
  common.ts                 |     100 |    83.33 |     100 |     100 | 1                            
  empp.ts                   |    92.3 |       75 |     100 |   91.66 | 12                           
  slp.ts                    |   89.74 |    62.16 |     100 |   89.74 | ...9,161,167,175,178,197,202 
----------------------------|---------|----------|---------|---------|------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='774']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='1247']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='243']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='465']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='132']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='212']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='755']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='1216']
##teamcity[blockClosed name='Code Coverage Summary']
mv: cannot stat 'test_results/ecash-lib-integration-tests-junit.xml': No such file or directory
Build ecash-lib-integration-tests failed with exit code 1

Tail of the build log:

  File "/work/test/functional/setup_scripts/../test_framework/util.py", line 296, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
            self.wait_until(lambda: is_finalblock(next_blockhash))
''' not true after 60.0 seconds
2024-07-31T11:05:01.228000Z TestFramework (INFO): Stopping nodes
2024-07-31T11:05:01.482000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240731_110348/setup_scripts/chronik-client_websocket_0
2024-07-31T11:05:01.482000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240731_110348/setup_scripts/chronik-client_websocket_0/test_framework.log
2024-07-31T11:05:01.482000Z TestFramework (ERROR): 
2024-07-31T11:05:01.483000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240731_110348/setup_scripts/chronik-client_websocket_0' to consolidate all logs
2024-07-31T11:05:01.483000Z TestFramework (ERROR): 
2024-07-31T11:05:01.483000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-07-31T11:05:01.484000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-07-31T11:05:01.484000Z TestFramework (ERROR): 
Running Unit Tests for Test Framework Modules
setup_scripts/chronik-client_websocket.py started
setup_scripts/chronik-client_websocket.py failed, Duration: 72 s

stdout:

stderr:


TEST                                      | STATUS    | DURATION

setup_scripts/chronik-client_websocket.py | โœ– Failed  | 72 s

ALL                                       | โœ– Failed  | 72 s (accumulated) 
Runtime: 72 s

Test runner for chronik-client_websocket completed with code 1
-----------------------|---------|----------|---------|---------|-----------------------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                 
-----------------------|---------|----------|---------|---------|-----------------------------------
All files              |   28.35 |     8.64 |   24.57 |   28.35 |                                   
 chronik-client        |     100 |      100 |     100 |     100 |                                   
  index.ts             |     100 |      100 |     100 |     100 |                                   
 chronik-client/proto  |    21.6 |     6.07 |    13.9 |   21.74 |                                   
  chronik.ts           |     6.1 |     0.83 |    2.54 |    6.09 | ...,3978-3985,3990-4027,4031-4036 
  chronikNode.ts       |   33.03 |    10.56 |    23.6 |   33.28 | ...,4991-5030,5038-5111,5146-5151 
 chronik-client/src    |   65.77 |    42.39 |   63.41 |   65.38 |                                   
  ChronikClient.ts     |    4.24 |        0 |       0 |    4.29 | 33-163,178-222,290-692            
  ChronikClientNode.ts |   90.84 |     72.8 |   96.38 |   90.84 | ...,1068,1078,1103,1115,1121,1127 
  failoverProxy.ts     |   75.22 |    51.61 |   62.06 |   74.52 | ...67,275-285,294,301,305,310,314 
  hex.ts               |   89.47 |       50 |      75 |   87.87 | 58,66-68                          
  validation.ts        |   93.33 |    81.81 |     100 |   92.59 | 33,39                             
-----------------------|---------|----------|---------|---------|-----------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='1188']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='4189']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='337']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='3897']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='187']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='761']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1176']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='4148']
##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

avoid DOS by setting reasonable limits

tobias_ruck edited the summary of this revision. (Show Details)
tobias_ruck retitled this revision from [Chronik] Add `/plugin/:plugin_name/groups` HTTP endpoints to [Chronik] Add `/plugin/:plugin_name/groups` HTTP endpoint.Jul 31 2024, 13:28
Fabien requested changes to this revision.Aug 1 2024, 10:30

only nits, generally lgtm

chronik/chronik-db/src/io/txs.rs
237 โ†—(On Diff #48950)

Any reason for having this be it's own function instead of inlining it into txids_by_tx_nums ? afaict it's unused outside of this callsite

chronik/chronik-indexer/src/query/plugins.rs
192 โ†—(On Diff #48950)
This revision now requires changes to proceed.Aug 1 2024, 10:30
This revision is now accepted and ready to land.Aug 1 2024, 11:15

Tail of the build log:

    Checking url v2.5.0
    Checking rand v0.8.5
    Checking tracing v0.1.40
    Checking http-body-util v0.1.1
    Checking chronik-util v0.1.0 (/work/chronik/chronik-util)
    Checking sha1 v0.10.6
    Checking smallvec v1.13.2
    Checking httpdate v1.0.3
    Checking ryu v1.0.17
    Checking cobs v0.2.3
    Checking embedded-io v0.4.0
    Checking utf-8 v0.7.6
    Checking data-encoding v2.5.0
    Checking postcard v1.0.8
    Checking pin-project v1.1.5
    Checking chronik-plugin-common v0.1.0 (/work/chronik/chronik-plugin-common)
    Checking tungstenite v0.21.0
   Compiling prost-build v0.11.9
    Checking chronik-plugin v0.1.0 (/work/chronik/chronik-plugin)
    Checking serde_spanned v0.6.6
    Checking toml_datetime v0.6.6
   Compiling pyo3 v0.22.2
    Checking hyper v1.2.0
    Checking mime v0.3.17
    Checking sync_wrapper v0.1.2
    Checking seahash v4.1.0
    Checking winnow v0.6.13
    Checking topo_sort v0.4.0
    Checking axum-core v0.4.3
    Checking tokio-tungstenite v0.21.0
    Checking tower v0.4.13
    Checking memoffset v0.9.1
    Checking serde_json v1.0.115
    Checking serde_urlencoded v0.7.1
    Checking hyper-util v0.1.3
    Checking futures-executor v0.3.30
    Checking serde_path_to_error v0.1.16
    Checking matchit v0.7.3
    Checking unicode-segmentation v1.11.0
    Checking base64 v0.21.7
    Checking unindent v0.2.3
    Checking sync_wrapper v1.0.1
    Checking tower-http v0.5.2
    Checking futures v0.3.30
    Checking convert_case v0.6.0
   Compiling chronik-proto v0.1.0 (/work/chronik/chronik-proto)
   Compiling chronik-bridge v0.1.0 (/work/chronik/chronik-bridge)
    Checking toml_edit v0.22.14
   Compiling librocksdb-sys v0.11.0+8.1.1
    Checking axum v0.7.5
   Compiling pyo3-macros v0.22.2
    Checking toml v0.8.14
    Checking chronik-plugin-impl v0.1.0 (/work/chronik/chronik-plugin-impl)
    Checking rocksdb v0.21.0
    Checking chronik-db v0.1.0 (/work/chronik/chronik-db)
    Checking chronik-indexer v0.1.0 (/work/chronik/chronik-indexer)
    Checking chronik-http v0.1.0 (/work/chronik/chronik-http)
    Finished dev [unoptimized + debuginfo] target(s) in 4m 43s
ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik failed with exit code 1

Tail of the build log:

   Doc-tests chronik-bridge

running 0 tests

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

   Doc-tests chronik-db

running 0 tests

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

   Doc-tests chronik-http

running 1 test
test chronik/chronik-http/src/protobuf.rs - protobuf::Protobuf (line 29) ... ok

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

   Doc-tests chronik-indexer

running 0 tests

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

   Doc-tests chronik-plugin

running 0 tests

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

   Doc-tests chronik-plugin-common

running 0 tests

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

   Doc-tests chronik-plugin-impl

running 0 tests

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

   Doc-tests chronik-proto

running 0 tests

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

   Doc-tests chronik-util

running 2 tests
test chronik/chronik-util/src/log.rs - log::log (line 65) ... ignored
test chronik/chronik-util/src/log.rs - log::log_chronik (line 87) ... ignored

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

ninja: build stopped: cannot make progress due to previous errors.
Build build-chronik-plugins failed with exit code 1

Tail of the build log:

  File "/work/test/functional/setup_scripts/../test_framework/util.py", line 296, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
            self.wait_until(lambda: is_finalblock(next_blockhash))
''' not true after 60.0 seconds
2024-08-01T11:46:26.275000Z TestFramework (INFO): Stopping nodes
2024-08-01T11:46:26.529000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240801_114513/setup_scripts/chronik-client_websocket_0
2024-08-01T11:46:26.529000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240801_114513/setup_scripts/chronik-client_websocket_0/test_framework.log
2024-08-01T11:46:26.529000Z TestFramework (ERROR): 
2024-08-01T11:46:26.529000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240801_114513/setup_scripts/chronik-client_websocket_0' to consolidate all logs
2024-08-01T11:46:26.529000Z TestFramework (ERROR): 
2024-08-01T11:46:26.529000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-08-01T11:46:26.529000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-08-01T11:46:26.529000Z TestFramework (ERROR): 
Running Unit Tests for Test Framework Modules
setup_scripts/chronik-client_websocket.py started
setup_scripts/chronik-client_websocket.py failed, Duration: 73 s

stdout:

stderr:


TEST                                      | STATUS    | DURATION

setup_scripts/chronik-client_websocket.py | โœ– Failed  | 73 s

ALL                                       | โœ– Failed  | 73 s (accumulated) 
Runtime: 73 s

Test runner for chronik-client_websocket completed with code 1
-----------------------|---------|----------|---------|---------|-----------------------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                 
-----------------------|---------|----------|---------|---------|-----------------------------------
All files              |   28.35 |     8.64 |   24.57 |   28.35 |                                   
 chronik-client        |     100 |      100 |     100 |     100 |                                   
  index.ts             |     100 |      100 |     100 |     100 |                                   
 chronik-client/proto  |    21.6 |     6.07 |    13.9 |   21.74 |                                   
  chronik.ts           |     6.1 |     0.83 |    2.54 |    6.09 | ...,3978-3985,3990-4027,4031-4036 
  chronikNode.ts       |   33.03 |    10.56 |    23.6 |   33.28 | ...,4991-5030,5038-5111,5146-5151 
 chronik-client/src    |   65.77 |    42.39 |   63.41 |   65.38 |                                   
  ChronikClient.ts     |    4.24 |        0 |       0 |    4.29 | 33-163,178-222,290-692            
  ChronikClientNode.ts |   90.84 |     72.8 |   96.38 |   90.84 | ...,1068,1078,1103,1115,1121,1127 
  failoverProxy.ts     |   75.22 |    51.61 |   62.06 |   74.52 | ...67,275-285,294,301,305,310,314 
  hex.ts               |   89.47 |       50 |      75 |   87.87 | 58,66-68                          
  validation.ts        |   93.33 |    81.81 |     100 |   92.59 | 33,39                             
-----------------------|---------|----------|---------|---------|-----------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='1188']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='4189']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='337']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='3897']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='187']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='761']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1176']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='4148']
##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:

  File "/work/test/functional/setup_scripts/../test_framework/util.py", line 296, in wait_until_helper
    raise AssertionError(
AssertionError: Predicate ''''
            self.wait_until(lambda: is_finalblock(next_blockhash))
''' not true after 60.0 seconds
2024-08-01T13:32:39.551000Z TestFramework (INFO): Stopping nodes
2024-08-01T13:32:39.805000Z TestFramework (WARNING): Not cleaning up dir /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240801_133126/setup_scripts/chronik-client_websocket_0
2024-08-01T13:32:39.805000Z TestFramework (ERROR): Test failed. Test logging available at /work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240801_133126/setup_scripts/chronik-client_websocket_0/test_framework.log
2024-08-01T13:32:39.805000Z TestFramework (ERROR): 
2024-08-01T13:32:39.806000Z TestFramework (ERROR): Hint: Call /work/test/functional/combine_logs.py '/work/abc-ci-builds/chronik-client-integration-tests/test/tmp/test_runner_โ‚ฟโ‚ต_๐Ÿƒ_20240801_133126/setup_scripts/chronik-client_websocket_0' to consolidate all logs
2024-08-01T13:32:39.806000Z TestFramework (ERROR): 
2024-08-01T13:32:39.806000Z TestFramework (ERROR): If this failure happened unexpectedly or intermittently, please file a bug and provide a link or upload of the combined log.
2024-08-01T13:32:39.807000Z TestFramework (ERROR): https://github.com/Bitcoin-ABC/bitcoin-abc/issues
2024-08-01T13:32:39.807000Z TestFramework (ERROR): 
Running Unit Tests for Test Framework Modules
setup_scripts/chronik-client_websocket.py started
setup_scripts/chronik-client_websocket.py failed, Duration: 73 s

stdout:

stderr:


TEST                                      | STATUS    | DURATION

setup_scripts/chronik-client_websocket.py | โœ– Failed  | 73 s

ALL                                       | โœ– Failed  | 73 s (accumulated) 
Runtime: 73 s

Test runner for chronik-client_websocket completed with code 1
-----------------------|---------|----------|---------|---------|-----------------------------------
File                   | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s                 
-----------------------|---------|----------|---------|---------|-----------------------------------
All files              |   28.35 |     8.64 |   24.57 |   28.35 |                                   
 chronik-client        |     100 |      100 |     100 |     100 |                                   
  index.ts             |     100 |      100 |     100 |     100 |                                   
 chronik-client/proto  |    21.6 |     6.07 |    13.9 |   21.74 |                                   
  chronik.ts           |     6.1 |     0.83 |    2.54 |    6.09 | ...,3978-3985,3990-4027,4031-4036 
  chronikNode.ts       |   33.03 |    10.56 |    23.6 |   33.28 | ...,4991-5030,5038-5111,5146-5151 
 chronik-client/src    |   65.77 |    42.39 |   63.41 |   65.38 |                                   
  ChronikClient.ts     |    4.24 |        0 |       0 |    4.29 | 33-163,178-222,290-692            
  ChronikClientNode.ts |   90.84 |     72.8 |   96.38 |   90.84 | ...,1068,1078,1103,1115,1121,1127 
  failoverProxy.ts     |   75.22 |    51.61 |   62.06 |   74.52 | ...67,275-285,294,301,305,310,314 
  hex.ts               |   89.47 |       50 |      75 |   87.87 | 58,66-68                          
  validation.ts        |   93.33 |    81.81 |     100 |   92.59 | 33,39                             
-----------------------|---------|----------|---------|---------|-----------------------------------

##teamcity[blockOpened name='Code Coverage Summary']
##teamcity[buildStatisticValue key='CodeCoverageAbsBCovered' value='1188']
##teamcity[buildStatisticValue key='CodeCoverageAbsBTotal' value='4189']
##teamcity[buildStatisticValue key='CodeCoverageAbsRCovered' value='337']
##teamcity[buildStatisticValue key='CodeCoverageAbsRTotal' value='3897']
##teamcity[buildStatisticValue key='CodeCoverageAbsMCovered' value='187']
##teamcity[buildStatisticValue key='CodeCoverageAbsMTotal' value='761']
##teamcity[buildStatisticValue key='CodeCoverageAbsLCovered' value='1176']
##teamcity[buildStatisticValue key='CodeCoverageAbsLTotal' value='4148']
##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

CI failure unrelated, will land anyway

This revision was landed with ongoing or failed builds.Aug 1 2024, 17:59
This revision was automatically updated to reflect the committed changes.