counterparty-core: SerializationTruncationError with addrindex 0.13.2 on testnet

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>

About this issue

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

Most upvoted comments

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