ordinals/ord
Ver no GitHubImplement own `Transport` with `Reqwest` for `bitcoincore_rpc`
Open
#2.707 aberto em 21 de nov. de 2023
enhancementgood first issue
Métricas do repositório
- Stars
- (3.955 stars)
- Métricas de merge de PR
- (Mesclagem média 15d 21h) (5 fundiu PRs em 30d)
Description
❯ RUST_LOG=debug ./target/release/ord --chain testnet --bitcoin-rpc-user user --bitcoin-rpc-pass pass --rpc-url nd-111-222-333.p2pify.com:80 server
[2023-11-21T06:55:38Z INFO ord::options] Connecting to Bitcoin Core at nd-111-222-333.p2pify.com:80/wallet/ord
[2023-11-21T06:55:38Z DEBUG bitcoincore_rpc] JSON-RPC request: getblockchaininfo []
[2023-11-21T06:55:38Z DEBUG bitcoincore_rpc] JSON-RPC failed parsing reply of getblockchaininfo: JsonRpc(Transport(HttpErrorCode(404)))
error: JSON-RPC error: transport error: unexpected HTTP code: 404
Whereas
❯ ./src/bitcoin-cli -rpcconnect=nd-111-222-333.p2pify.com -rpcport=80 -rpcuser=user -rpcpassword=pass getblockchaininfo
{
"chain": "test",
"blocks": 2539577,
"headers": 2539577,
...
}
And
❯ curl --data-binary '{"jsonrpc": "1.0", "id": "1", "method": "getblockchaininfo", "params": []}' -H 'content-type: text/plain;' http://user:pass@nd-111-222-333.p2pify.com/wallet/ord
{"result":{"chain":"test","blocks":2539577,"headers":2539577, ... },"error":null,"id":"1"}
After looking into the traffic it becomes apparent that ord is resolving the hostname to IP and then querying it instead of making a query using the provided hostname
Looks like something that should be fixed