trezor / blockbook

:blue_book: Trezor address/account balance backend
https://trezor.io
GNU Affero General Public License v3.0
650 stars 645 forks source link

Duplicated txs id with one address #999

Closed yida-l closed 4 months ago

yida-l commented 9 months ago

Hello, we are running two blockbook nodes with Bitcoin, and we found out a weird issue about duplicated txs id existed in one address, snapshot as follows:

api/v2/address/1CNT2kAGy2chgVKdZ7L28EoX1AnM2pvpAK

image Node1 got 587 txs

image Node2 got 588 txs with same address

Then we compare the all txs between these two nodes, got one duplicated txs id with Node2

1e6da195ec78ba18b2d5455a6b2441dd4596206660f168dd2bc79e20d3e3b639 this is the duplicated txs id, any suggestion for this one? thanks

martinboehm commented 9 months ago

I tested on our production instances and all show the same data at this moment:

image

Unless the screenshots are several days old, it seems that your database is corrupted, as the number of transactions differs a lot from our instances. Obviously, a duplicate transaction is wrong.

yida-l commented 9 months ago

Yes, you are right, we did run many nodes cross different regions, only one node having this issue, but all of them using same version and spec, no idea about why this issue, could you please show us more hints about how to detect this one, or even prevent this issue happen again, thanks