Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lastest version of JSONRPC is not compatible with ckb-transaction-dumper #4295

Closed
doitian opened this issue Jan 10, 2024 · 2 comments
Closed
Assignees
Labels
t:bug Type: This doesn't seem right.

Comments

@doitian
Copy link
Member

doitian commented Jan 10, 2024

Bug Report

Current Behavior

Run npx ckb-transaction-dumper -x 0xbba69ef3b3a32071836823e59080fbc00423106063eb95b1255453c0135474b2

Any tx hash is OK, even non exists.

The command fails because of ECONNRESET error.

Expected Behavior

THe command reports that the tx does not exist or dumps the tx as dump.json

Environment

  • CKB version: v0.113.0-rc versions
  • Chain: dev
  • Operating system: macOS 14.2.1
  • Arch: x64
  • Installation: Built from source
  • Node.js v21.5.0, npm 10.2.4, ckb-transaction-dumper 0.2.1

Related Repos:

Additional context/Screenshots

If pass "0x" as a tx hash, ckb-transaction-dumps will report the JSONRPC error.

The CKB has no errors. When setting log level to debug, the logs show CKB has sent the response.

Details

2024-01-10 02:56:37.441 +00:00 GlobalRt-8 TRACE hyper::proto::h1::conn  Conn::read_head
2024-01-10 02:56:37.441 +00:00 GlobalRt-8 TRACE hyper::proto::h1::conn  flushed({role=server}): State { reading: Init, writing: Init, keep_alive: Busy }
2024-01-10 02:56:37.443 +00:00 GlobalRt-13 TRACE hyper::proto::h1::conn  Conn::read_head
2024-01-10 02:56:37.443 +00:00 GlobalRt-13 TRACE hyper::proto::h1::io  received 362 bytes
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE tracing::span  parse_headers;
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE tracing::span::active  -> parse_headers;
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE hyper::proto::h1::role  Request.parse bytes=362
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE hyper::proto::h1::role  Request.parse Complete(225)
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE tracing::span::active  <- parse_headers;
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE tracing::span  -- parse_headers;
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 DEBUG hyper::proto::h1::io  parsed 7 headers
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 DEBUG hyper::proto::h1::conn  incoming body is content-length (137 bytes)
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE hyper::proto::h1::conn  remote disabling keep-alive
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE hyper::proto::h1::decode  decode; state=Length(137)
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 DEBUG hyper::proto::h1::conn  incoming body completed
2024-01-10 02:56:37.444 +00:00 GlobalRt-13 TRACE rpc  Request: {"jsonrpc":"2.0","id":4880744,"method":"get_transaction","params":["0xbba69ef3b3a32071836823e59080fbc00423106063eb95b1255453c0135474b2"]}.
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 DEBUG rpc  Response: {"jsonrpc":"2.0","result":{"cycles":"0x17bdd3","fee":null,"min_replace_fee":null,"time_added_to_pool":null,"transaction":{"cell_deps":[{"dep_type":"code","out_point":{"index":"0x2","tx_hash":"0x50e53af4ce7f2cc0a27c1fe1e2d7f227565c3edd3c9410a9f33e9150459c4086"}},{"dep_type":"dep_group","out_point":{"index":"0x0","tx_hash":"0xaf04bc78b83a9de8605affb6fbb98d1db3359d6acea944463a8100f5d8f055c9"}},{"dep_type":"dep_group","out_point":{"index":"0x0","tx_hash":"0x0fb96f39b4398eadca15a766f995869d8424b280b5eb920f7384a44bb3562e9c"}}],"hash":"0xbba69ef3b3a32071836823e59080fbc00423106063eb95b1255453c0135474b2","header_deps":[],"inputs":[{"previous_output":{"index":"0x1","tx_hash":"0xaa633e3b7f87c9a07401934b4c75e43bef4aca847c121f58facbcf28950ce69f"},"since":"0x0"}],"outputs":[{"capacity":"0x4a817c800","lock":{"args":"0x0425656d45267d4d8247d56203895a1d3ad091d415","code_hash":"0x21fa1f9e741ea96a287593e91290b4632b01797e6433173d416968a3a1795972","hash_type":"type"},"type":{"args":"0x","code_hash":"0x82d76d1b75fe2fd9a27dfbaa65a039221a380d76c926f378d3f81cf3e7e13f2e","hash_type":"type"}},{"capacity":"0x1b364af8abb4","lock":{"args":"0x0425656d45267d4d8247d56203895a1d3ad091d415","code_hash":"0x21fa1f9e741ea96a287593e91290b4632b01797e6433173d416968a3a1795972","hash_type":"type"},"type":null}],"outputs_data":["0x0000000000000000","0x"],"version":"0x0","witnesses":["0x5500000010000000550000005500000041000000271deb5e0b13d9bcd86aae4293a457ecd8276cbd6ba548e87cdd9ac8aa4f3806556e48e7fcb6f03b5b234bcef9d879c2314d91eab5a582b0e4afaa71807097c6f4"]},"tx_status":{"block_hash":"0xe4a9b2f7da4b25f75ed25d2afebca4c1569871075bf3450244f87e61ff9b78d0","reason":null,"status":"committed"}},"id":4880744}.
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE tracing::span  encode_headers;
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE tracing::span::active  -> encode_headers;
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE hyper::proto::h1::role  Server::encode status=200, body=Some(Known(1682)), req_method=Some(POST)
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE tracing::span::active  <- encode_headers;
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE tracing::span  -- encode_headers;
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE hyper::proto::h1::encode  sized write, len = 1682
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE hyper::proto::h1::io  buffer.queue self.len=110 buf.len=1682
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 DEBUG hyper::proto::h1::io  flushed 1792 bytes
2024-01-10 02:56:37.445 +00:00 GlobalRt-13 TRACE hyper::proto::h1::conn  State::close()
2024-01-10 02:56:37.446 +00:00 GlobalRt-13 TRACE hyper::proto::h1::conn  flushed({role=server}): State { reading: Closed, writing: Closed, keep_alive: Disabled }
2024-01-10 02:56:37.446 +00:00 GlobalRt-13 TRACE hyper::proto::h1::conn  shut down IO complete

@doitian doitian added the t:bug Type: This doesn't seem right. label Jan 10, 2024
@doitian
Copy link
Member Author

doitian commented Jan 10, 2024

A new version of ckb-transaction-dumper ( https://github.com/nervosnetwork/ckb-transaction-dumper/releases/tag/0.3.5 ) has fixed the issue.

@doitian
Copy link
Member Author

doitian commented Jan 10, 2024

A related requirements has been sent to ckb-cli:

nervosnetwork/ckb-cli#576

@doitian doitian closed this as completed Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t:bug Type: This doesn't seem right.
Projects
None yet
Development

No branches or pull requests

2 participants