Skip to content

Spaces daemon dies via getptrblockmeta #121

@randomlogin

Description

@randomlogin

I had some random regtest chain state and discovered that calling RPC method getptrblockmeta kills spaced.
Deleting regtest data folder and resyncing helped, problem no longer occurs.
It seems I somehow corrupted block data, but not sure how and when it happened.
I have not encountered the problem in any live chains.
For the sake of completeness I paste here the data that made the crash.

Steps to reproduce:

  • download bitcoin block data, override your /regtest bitcoin chain data folder
  • download spaced block data, override your /regtest spaced chain data folder
  • call the following
curl -v -X POST http://127.0.0.1:7218/ -u "your_rpc_user:your_rpc_password" -H "Content-Type: application/json" -d '{"jsonrpc":"2.0","id":1337,"method":"getptrblockmeta","params":["2e77e7b819849626059c55969e3179f2914331b6dd17fc92166cb4580aa08980"]}'

Logs:

[2025-12-09T17:19:52Z INFO  spaces_client::rpc] Listening at 127.0.0.1:7218
[2025-12-09T17:19:52Z INFO  spaces_client::rpc] Listening at [::1]:7218
[2025-12-09T17:19:52Z INFO  spaces_client::spaces] Start block=2b4e388a51752f29aad7ab51a60cc771a82fc35eaac7ea9777456a89b5d1fe42 height=5292
[2025-12-09T17:19:52Z INFO  spaces_client::spaces] block=542604528a7d5834e643750f924cd8df5fe386811cd1837be020df2666d3ccb2 height=5293
[2025-12-09T17:19:52Z INFO  spaces_client::spaces] block=0b1ccacd2cf21aca91b21a86513452de2845ad2de4145d46bbaa5b25735fc63e height=5294
[2025-12-09T17:19:57Z INFO  jsonrpsee_server::server] connection; remote_addr=127.0.0.1:54536 conn_id=0
memory allocation of 2852009279487 bytes failed
Aborted (core dumped)

Chaindata:
bitcoind_crash_data.zip
spaced_crash_data.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions