jamesob / jamesob/tinychain

AssertionError: assert len(string) == curve.baselen, (len(string), curve.baselen)

Open
#4 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
1.4k
Forks
123
PR merge metrics
No merged PRs in 30d

Description

I get the following error after running:

`./bin/sync_wallets`

```
Traceback (most recent call last):
File "./client.py", line 137, in
main(docopt(__doc__, version='tinychain client 0.1'))
File "./client.py", line 37, in main
t.init_wallet(args.get('--wallet')))
File "/Users/jeffkrantz/Apps/sandbox/tinychain/tinychain.py", line 1068, in init_wallet
f.read(), curve=ecdsa.SECP256k1)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/ecdsa/keys.py", line 149, in from_string
assert len(string) == curve.baselen, (len(string), curve.baselen)
AssertionError: (33, 32)
```

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

Reproduce the failure with ./bin/sync_wallets, then trace the wallet initialization from client.py line 37 to tinychain.py line 1068. Inspect how the wallet data passed to ecdsa.SECP256k1 is read, and use the reported length mismatch to guide the investigation. Done means wallet initialization completes without the AssertionError.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.