spesmilo / spesmilo/electrum

[REQ] Make commands 'serialize' and 'deserialize' fully reversible with each other.

Open
#6,478 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CLI/RPC ▶
Dominant language
Python
Stars
8.6k
Forks
3.5k
Avg merge
2d 8h
Merged PRs (30d)
61

Description

Ideally the following commands should both print "success" from the console:

_pbst = 'cHNidP ...'
_json = '{"inputs": ... }'
if _pbst == serialize(deserialize(_pbst)): print("success")
if _json == deserialize(serialize(_json)): print("success")

As it stands right now, it looks like serialize is is dropping the following fields:

  • jsontx.inputs(i).address
  • jsontx.inputs(i).bip32_paths
  • jsontx.inputs(i).utxo
  • jsontx.inputs(i).value_sats
  • jsontx.outputs(i).bip32_paths

The PR #6476 resolves locktime, and will at least parse jsontx.inputs(i).value_sats, but it fails to persist the latter.

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 the console commands serialize and deserialize and review PR #6476, especially its handling of locktime and inputs(i).value_sats. Trace how the listed input and output fields are parsed and emitted. Done means both round-trip examples print "success" without dropping address, bip32_paths, utxo, or value_sats data.

Written by the indexing model from the issue text.

Assessment

Tech stack
json, python
Domain
backend, cli
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.