utxostack / ckb-bitcoin-spv-service

Synchronize headers to Bitcoin SPV clients running on the CKB chain.
MIT License
2 stars 4 forks source link

fix: failed to reorg when only one stale block #21

Closed yangby-cryptape closed 7 months ago

yangby-cryptape commented 7 months ago

Description

This is a contract issue:

They have exactly the same structure, but different tip-client-id in the SPV info cell.

So, the contract couldn't distinguish the operation for them.

Solution (Urgent, maybe Temporary)

Reorg two Bitcoin SPV clients when they are only 1 stale block.

PROS:

CONS:

My Own Opionion

I think it may be a good final solution.

Since update and reorg-1 are so similar, and reorg are small probability events, adding a tag to all operations is not a good deal.