Closed yangby-cryptape closed 7 months ago
This is a contract issue:
When update Bitcoin SPV instance:
Cell Deps: - Type Lock - SPV Client (id=k) - ... ... Inputs: - SPV Info (tip_client_id=k) - SPV Client (id=k+1) - ... ... Outputs: - SPV Info (tip_client_id=k+1) - SPV Client (id=k+1) - ... ... Witnesses: - SPV Update - ... ...
When reorg Bitcoin SPV instance when only 1 stale block:
Cell Deps: - Type Lock - SPV Client (id=k) - ... ... Inputs: - SPV Info (tip_client_id=k+1) - SPV Client (id=k+1) - ... ... Outputs: - SPV Info (tip_client_id=k+1) - SPV Client (id=k+1) - ... ... Witnesses: - SPV Update - ... ...
They have exactly the same structure, but different tip-client-id in the SPV info cell.
tip-client-id
So, the contract couldn't distinguish the operation for them.
Reorg two Bitcoin SPV clients when they are only 1 stale block.
PROS:
CONS:
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.
Description
This is a contract issue:
When update Bitcoin SPV instance:
When reorg Bitcoin SPV instance when only 1 stale block:
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.