pocketnetteam / pocketnet.core

Decentralized social network based on the blockchain
https://pocketnet.app
Apache License 2.0
114 stars 28 forks source link

Missing transactions payload #114

Closed andyoknen closed 2 years ago

andyoknen commented 2 years ago

Missing additional transaction data was found in the database, the blockchain is not affected. Presumably the loss is caused by incorrect logic of cleaning the mempool: https://github.com/pocketnetteam/pocketnet.core/commit/0b0494ffd9fc2f3aaf41cebcfa6cf7f8ec1faf02

To check the consistency of the database, you can use the following query in the pocketdb/main.sqlite3 database:

select *
from Transactions
where Height>1021
group by Height
having count() != max(BlockNum)

Nodes remain in the network without leaks, so it remains possible to restore data from backup snapshots.

To solve the problem, I propose to perform a complete database reindexation to make sure the consistency of the block chain. Also publish a snapshot of the database in parallel.

andyoknen commented 2 years ago

Reindexing does not start the process of loading a lost transaction - research is needed

pocketnetteam commented 2 years ago

Fixed in https://github.com/pocketnetteam/pocketnet.core/releases/tag/v0.20.16