question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SerializationTruncationError with addrindex 0.13.2 on testnet

See original GitHub issue

Got this twice after restarting a formerly (when Core was addrindex 0.12.1) valid CP DB following an in-place upgrade from addrindex 0.12.1 to 0.13.2 beta. This appears right away and counterparty-server stops. I “solved” this by recreating the DB from scratch using reparse.

  • v9.55.1
  • addrindex 0.13.2 beta
  • Ubuntu 16
  File "/usr/local/lib/python3.5/dist-packages/counterparty_lib-9.55.1-py3.5.egg/counterpartylib/server.py", line 408, in start_all
    blocks.follow(db)
  File "/usr/local/lib/python3.5/dist-packages/counterparty_lib-9.55.1-py3.5.egg/counterpartylib/lib/blocks.py", line 1106, in follow
    current_cblock = backend.getblock(current_hash)
  File "/usr/local/lib/python3.5/dist-packages/counterparty_lib-9.55.1-py3.5.egg/counterpartylib/lib/backend/__init__.py", line 49, in getblock
    return CBlock.deserialize(util.unhexlify(block_hex))
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/serialize.py", line 115, in deserialize
    r = cls.stream_deserialize(fd)
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/__init__.py", line 506, in stream_deserialize
    vtx = VectorSerializer.stream_deserialize(CTransaction, f)
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/serialize.py", line 250, in stream_deserialize
    r.append(inner_cls.stream_deserialize(f))
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/__init__.py", line 329, in stream_deserialize
    vin = VectorSerializer.stream_deserialize(CTxIn, f)
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/serialize.py", line 250, in stream_deserialize
    r.append(inner_cls.stream_deserialize(f))
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/__init__.py", line 199, in stream_deserialize
    scriptSig = script.CScript(BytesSerializer.stream_deserialize(f))
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/serialize.py", line 234, in stream_deserialize
    return ser_read(f, l)
  File "/usr/local/lib/python3.5/dist-packages/bitcoin/core/serialize.py", line 81, in ser_read
    raise SerializationTruncationError('Asked to read %i bytes, but only got %i' % (n, len(r)))
bitcoin.core.serialize.SerializationTruncationError: Asked to read 21246 bytes, but only got 561

<bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/40551607-serializationtruncationerror-with-addrindex-0-13-2-on-testnet?utm_campaign=plugin&utm_content=tracker%2F494307&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F494307&utm_medium=issues&utm_source=github). </bountysource-plugin>

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:16 (10 by maintainers)

github_iconTop GitHub Comments

2reactions
robby-dermodycommented, Apr 15, 2017

Hi guys, the most recent counterparty-lib develop branch commit seems to reparse testnet fine now. what you’d need to do (on a fednode install, assuming you are using develop and not master):

fednode rebuild counterparty-testnet
fednode reparse counterparty-testnet
0reactions
chiguireitorcommented, Jun 13, 2018

Solved with latest python-bitcoinlib

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found