ElementsProject / ElementsProject/elements

Peg related RPC calls should error if there is no parent chain set

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

Nobody has claimed this yet.

Dominant language
C++
Stars
1.2k
Forks
417
Avg merge
1d 23h
Merged PRs (30d)
15

Description

Currently (tested in 0.18.1.9 and 0.18.11):

If I set chain=whatever, con_has_parent_chain=0 or parentgenesisblockhash=Null in elements.conf I can still call getpeginaddress from a connected client without error and get a mainchain_address and claim_script returned.

I would have expected any peg related RPC calls to error if the parent chain is nothing.

Contributor guide

Open the contributing guide

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

Reproduce the behavior using elements.conf with chain=whatever, con_has_parent_chain=0, or parentgenesisblockhash=Null, then call getpeginaddress from a connected client. Trace the peg-related RPC entry points and make their behavior consistent when no parent chain is configured; done means these calls return an error instead of mainchain_address and claim_script.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
api, blockchain
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.