@@ -197,6 +197,13 @@ When you want to verify a transaction with Bitcoin SPV Client cell:
197
197
198
198
A simple example could be found in [this test](https://github.com/ckb-cell/ckb-bitcoin-spv/blob/2464c8f/prover/src/tests/service.rs#L132-L181).
199
199
200
+ # ## Limits
201
+
202
+ - The lower limit of SPV client cells count is 3.
203
+
204
+ - The upper limit of SPV client cells count is not set, but base on the data type, `u8`,
205
+ any number larger than `250` is not recommended.
206
+
200
207
# ## Known Issues
201
208
202
209
- `VM Internal Error : MemWriteOnExecutablePage`
@@ -205,6 +212,32 @@ When you want to verify a transaction with Bitcoin SPV Client cell:
205
212
206
213
` Data1` is introduced from [CKB RFC 0032], and `Data2` is introduced from [CKB RFC 0051].
207
214
215
+ - Failed to reorg when there is only 1 stale SPV client.
216
+
217
+ When only 1 SPV client is stale, in the normal case, the reorg transaction
218
+ contains 1 input SPV client cell and 1 output SPV client cell is enough.
219
+
220
+ But, the structure of this transaction is totally the same as an update
221
+ transaction, this leads to ambiguity.
222
+
223
+ So, we define a rule to resolve this case :
224
+
225
+ - When there is only 1 SPV client is stale, the reorg transaction has to
226
+ rebuild 2 SPV client.
227
+
228
+ That means, the reorg transaction for 1 stale SPV client should contain 2
229
+ output SPV client cells and 2 output SPV client cells.
230
+
231
+ Since the reorg rarely happens in Bitcoin mainnet, the cost is acceptable.
232
+
233
+ - Throw "arithmetic operation overflow" when update a Bitcoin SPV instance for
234
+ a Bitcoin dev chain.
235
+
236
+ The bitcoin dev chain doesn't follow the rule of difficulty change.
237
+
238
+ So, calculate the next target and partial chain work may lead to an
239
+ arithmetic operation overflow.
240
+
208
241
[^1] : [Section "Code Locating"] in "CKB RFC 0022: CKB Transaction Structure".
209
242
210
243
[Bitcoin] : https://bitcoin.org/
0 commit comments