@@ -7,8 +7,9 @@ A type script for Bitcoin SPV clients which synchronize [Bitcoin] state into [CK
7
7
A [ Bitcoin] SPV in [ CKB] contains a set of cells, this type script is used
8
8
to manage them.
9
9
10
- Since this type script has a unique ID in its script [ ` args ` ] , so the size of
11
- the set of cells is immutable after they created.
10
+ The set is identified by the script [ ` args ` ] . The number of live cells with this
11
+ specific ` args ` script is fixed once created, and all cells in the set are
12
+ destroyed together.
12
13
13
14
### Cells
14
15
@@ -57,7 +58,7 @@ There are 4 kinds of operations:
57
58
Inputs :
58
59
- Enough Capacity Cells
59
60
Outputs :
60
- - SPV Info (last_client_id =0)
61
+ - SPV Info (tip_client_id =0)
61
62
- SPV Client (id=0)
62
63
- SPV Client (id=1)
63
64
- SPV Client (id=2)
@@ -82,7 +83,7 @@ There are 4 kinds of operations:
82
83
- Type Lock
83
84
- ... ...
84
85
Inputs :
85
- - SPV Info (last_client_id =0)
86
+ - SPV Info (tip_client_id =0)
86
87
- SPV Client (id=0)
87
88
- SPV Client (id=1)
88
89
- SPV Client (id=2)
@@ -106,7 +107,8 @@ There are 4 kinds of operations:
106
107
we consider that it has the latest data.
107
108
108
109
The client cell who has the next ID of the `tip_client_id` in the info cell,
109
- we consider that it has the oldest data. The next ID of ID `n-1` is `0`.
110
+ we consider that it has the oldest data. These client cells form a ring, where
111
+ the next ID after `n-1` is `0`.
110
112
111
113
Once we update the Bitcoin SPV instance, we put the new data into the client
112
114
cell which has the oldest data, and update the `tip_client_id` in the client
@@ -122,11 +124,11 @@ There are 4 kinds of operations:
122
124
- SPV Client (id=k)
123
125
- ... ...
124
126
Inputs:
125
- - SPV Info (last_client_id =k)
127
+ - SPV Info (tip_client_id =k)
126
128
- SPV Client (id=k+1)
127
129
- ... ...
128
130
Outputs:
129
- - SPV Info (last_client_id =k+1)
131
+ - SPV Info (tip_client_id =k+1)
130
132
- SPV Client (id=k+1)
131
133
- ... ...
132
134
Witnesses:
@@ -153,14 +155,14 @@ There are 4 kinds of operations:
153
155
- SPV Client (id=t)
154
156
- ... ...
155
157
Inputs:
156
- - SPV Info (last_client_id =k)
158
+ - SPV Info (tip_client_id =k)
157
159
- SPV Client (id=t+1)
158
160
- SPV Client (id=t+2)
159
161
- SPV Client (id=...)
160
162
- SPV Client (id=k)
161
163
- ... ...
162
164
Outputs:
163
- - SPV Info (last_client_id =t+1)
165
+ - SPV Info (tip_client_id =t+1)
164
166
- SPV Client (id=t+1)
165
167
- SPV Client (id=t+2)
166
168
- SPV Client (id=...)
0 commit comments