Skip to content

teleport attempts to use jsonrpc 2.0 despite it not being supported by Core #43

@Kixunil

Description

@Kixunil

After unsuccessful attempt to try this out I recorded the communication and it looks like jsonrpc 2.0 is the problem:

Recorded request from teleport:

POST /wallet/teleport HTTP/1.1
Host: localhost:18441
Content-Type: application/json
Authorization: Basic X19jb29raWVfXzowMzM4Nzc1MTMyOGVmOTJiNGEzOGIxNDg2MDY5NmNkNzg3YWQ2ZWNkNWNiYmE1NGFjOTI2YzM2YmQwMjYwNThm
Content-Length: 65

{"method":"getblockchaininfo","params":[],"id":1,"jsonrpc":"2.0"}

Request from bitcoin-cli:

POST / HTTP/1.1
Host: 127.0.0.1
Connection: close
Content-Type: application/json
Authorization: Basic X19jb29raWVfXzowMzM4Nzc1MTMyOGVmOTJiNGEzOGIxNDg2MDY5NmNkNzg3YWQ2ZWNkNWNiYmE1NGFjOTI2YzM2YmQwMjYwNThm
Content-Length: 50

{"method":"getblockchaininfo","params":[],"id":1}

(don't worry about the "leak", it's a disposable VM :))

  • Commit: edbc4b7
  • Using cookie authentication (with patched path)
  • Command used to record the request: socat TCP-LISTEN:18441,fork,reuseaddr SYSTEM:'tee /proc/self/fd/2 | nc 127.0.0.1 18444 | tee /proc/self/fd/2' (yes, my ports are correct)
  • Attempted teleport command: sudo -u bitcoin-regtest ./target/debug/teleport --wallet-file-name=maker1.teleport generate-wallet
  • Bitcoin Core version: 0.21.1
  • No relevant logs in bitcoind debug.log
  • Yes, the network was initialized by mining a bunch of blocks (101)

I'm still confused how come this wasn't discovered already...

P.S.: thanks a lot for working on this project!!!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions