lbryio / lbryio/lbry-sdk

Cannot download 2 files with same sdhash

Open
#1,729 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

area: downloads area: files type: bug
Dominant language
Python
Stars
7.2k
Forks
493
PR merge metrics
No merged PRs in 30d

Description

The Issue

Lower priority since this shouldn't happen in most cases (.i.e. claim is created manually)

Example: lbry://doit2 / lbry://doitlive

{
  "code": -32500,
  "data": [
    "  File \"twisted\\internet\\defer.py\", line 654, in _runCallbacks",
    "    ",
    "  File \"lbrynet\\extras\\daemon\\auth\\server.py\", line 96, in trap",
    "    ",
    "  File \"twisted\\python\\failure.py\", line 439, in trap",
    "    ",
    "  File \"twisted\\python\\failure.py\", line 467, in raiseException",
    "    ",
    "  File \"twisted\\internet\\defer.py\", line 824, in adapt",
    "    ",
    "  File \"lbrynet\\extras\\daemon\\Daemon.py\", line 1852, in jsonrpc_get",
    "    ",
    "  File \"lbrynet\\extras\\wallet\\manager.py\", line 280, in resolve",
    "    ",
    "  File \"twisted\\internet\\defer.py\", line 1416, in _inlineCallbacks",
    "    ",
    "  File \"twisted\\python\\failure.py\", line 491, in throwExceptionIntoGenerator",
    "    ",
    "  File \"lbrynet\\extras\\daemon\\storage.py\", line 654, in save_claims",
    "    ",
    "  File \"twisted\\python\\threadpool.py\", line 250, in inContext",
    "    ",
    "  File \"twisted\\python\\threadpool.py\", line 266, in <lambda>",
    "    ",
    "  File \"twisted\\python\\context.py\", line 122, in callWithContext",
    "    ",
    "  File \"twisted\\python\\context.py\", line 85, in callWithContext",
    "    ",
    "  File \"twisted\\enterprise\\adbapi.py\", line 475, in _runInteraction",
    "    ",
    "  File \"twisted\\python\\compat.py\", line 463, in reraise",
    "    ",
    "  File \"twisted\\enterprise\\adbapi.py\", line 465, in _runInteraction",
    "    ",
    "  File \"lbrynet\\extras\\daemon\\storage.py\", line 649, in _save_claims",
    "    ",
    "  File \"lbrynet\\extras\\daemon\\storage.py\", line 715, in _save_content_claim",
    "    ",
    "builtins.Exception: mismatching claim ids when updating stream d7da743bdc051598978e99d5f5a560639c8d23e6 vs 9dd49da250874d2641916ba098bc86a9a5f29c6e"
  ],
  "message": "mismatching claim ids when updating stream d7da743bdc051598978e99d5f5a560639c8d23e6 vs 9dd49da250874d2641916ba098bc86a9a5f29c6e"

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

Internal Use

Acceptance Criteria
Definition of Done
  • Tested against acceptance criteria
  • Tested against the assumptions of user story
  • The project builds without errors
  • Unit tests are written and passing
  • Tests on devices/browsers listed in the issue have passed
  • QA performed & issues resolved
  • Refactoring completed
  • Any configuration or build changes documented
  • Documentation updated
  • Peer Code Review performed

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

Start in lbrynet/extras/daemon/storage.py around _save_claims at line 649 and _save_content_claim at line 715, using the reported two-file same-sdhash example and traceback. Trace how the two claim IDs are handled during download and add a regression test showing both files can be downloaded without the mismatching-claim-ids error.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.