spesmilo / spesmilo/electrumx

electrumx_rpc error query

Open
#121 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
568
Forks
447
PR merge metrics
No merged PRs in 30d

Description

Error with command electrumx_rpc -p 8000 query --limit 5 xxxxxxxxxxxxxxx

Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: File "/usr/local/lib/python3.7/dist-packages/electrumx/server/session.py", line 552, in rpc_query
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: hashX = arg_to_hashX(arg)
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: File "/usr/local/lib/python3.7/dist-packages/electrumx/server/session.py", line 535, in arg_to_hashX
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: hashX = coin.address_to_hashX(arg)
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: File "/usr/local/lib/python3.7/dist-packages/electrumx/lib/coins.py", line 185, in address_to_hashX
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: return cls.hashX_from_script(cls.pay_to_address_script(address))
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: File "/usr/local/lib/python3.7/dist-packages/electrumx/lib/coins.py", line 214, in pay_to_address_script
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: raise CoinError(f'invalid address: {address}')
Apr 17 07:56:46 iZd7ocw3tu8tq6mw1gjvvwZ electrumx_server[21442]: electrumx.lib.coins.CoinError: invalid address: xxxxx

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with server/session.py at rpc_query and arg_to_hashX, then follow the address conversion in lib/coins.py through address_to_hashX and pay_to_address_script. Reproduce the electrumx_rpc query with the reported argument and determine the expected handling for the invalid-address error; done means the intended behavior is verified by a focused test or a clearly documented diagnosis.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.