Skip to content

Commit a7f320b

Browse files
ordered accumulation dataset (#128)
Addresses: * #125 (part 2) - assurances/2_011 panics then checkpoints but should bring in assign result Added tiny readme explanation
1 parent 56613e0 commit a7f320b

File tree

440 files changed

+82559
-14445
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

440 files changed

+82559
-14445
lines changed

README.md

+142-1
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,151 @@ See [services](./services) for `bootstrap` and `fib` service code, which has bee
114114

115115
As of Feb 2025, Several teams have reported success at importing both fallback and safrole.
116116

117+
#### Assurances
118+
119+
The assurances dataset, after setting up a "Bootstrap" and "Fib" service (using the Bootstrap service), tests out the majority of host functions, and writes out the result of the host function result in many of the calls.
120+
121+
* ASSIGN
122+
* BLESS
123+
* CHECKPOINT
124+
* EJECT
125+
* FORGET
126+
* GAS
127+
* INFO
128+
* LOOKUP
129+
* NEW
130+
* QUERY
131+
* READ
132+
* SOLICIT
133+
* TRANSFER
134+
* UPGRADE
135+
* WRITE
136+
* YIELD
137+
138+
```
139+
INFO [03-05|19:44:12.138] Fib2-(1) result with key 0 result=010000000100000000000000
140+
INFO [03-05|19:44:12.138] Fib2-(1) result with key 1 result=
141+
INFO [03-05|19:44:12.138] Fib2-(1) result with key 2 result=
142+
INFO [03-05|19:44:12.138] Fib2-(1) result with key 5 result=
143+
INFO [03-05|19:44:12.138] Fib2-(1) result with key 6 result=
144+
INFO [03-05|19:44:12.138] Fib2-(1) result with key 8 result=0000000000000000
145+
INFO [03-05|19:44:12.138] Fib2-(1) result with key 9 result=6f23000000000000
146+
INFO [03-05|19:44:22.145] Fib2-(2) result with key 0 result=020000000100000001000000
147+
INFO [03-05|19:44:22.145] Fib2-(2) result with key 1 result=ffffffffffffffff
148+
INFO [03-05|19:44:22.145] Fib2-(2) result with key 2 result=0300000000000000
149+
INFO [03-05|19:44:22.145] Fib2-(2) result with key 5 result=0300000000000000
150+
INFO [03-05|19:44:22.145] Fib2-(2) result with key 6 result=f7ffffffffffffff
151+
INFO [03-05|19:44:22.145] Fib2-(2) result with key 8 result=0000000000000000
152+
INFO [03-05|19:44:22.145] Fib2-(2) result with key 9 result=1f23000000000000
153+
INFO [03-05|19:44:34.154] Fib2-(3) result with key 0 result=030000000200000001000000
154+
INFO [03-05|19:44:34.155] Fib2-(3) result with key 1 result=0000000000000000
155+
INFO [03-05|19:44:34.155] Fib2-(3) result with key 2 result=0000000000000000
156+
INFO [03-05|19:44:34.155] Fib2-(3) result with key 5 result=ffffffffffffffff
157+
INFO [03-05|19:44:34.155] Fib2-(3) result with key 6 result=f7ffffffffffffff
158+
INFO [03-05|19:44:34.155] Fib2-(3) result with key 8 result=0000000000000000
159+
INFO [03-05|19:44:34.155] Fib2-(3) result with key 9 result=3323000000000000
160+
INFO [03-05|19:44:52.163] Fib2-(4) result with key 0 result=040000000300000002000000
161+
INFO [03-05|19:44:52.163] Fib2-(4) result with key 1 result=0000000000000000
162+
INFO [03-05|19:44:52.163] Fib2-(4) result with key 2 result=020000001d000000
163+
INFO [03-05|19:44:52.163] Fib2-(4) result with key 5 result=ffffffffffffffff
164+
INFO [03-05|19:44:52.163] Fib2-(4) result with key 6 result=faffffffffffffff
165+
INFO [03-05|19:44:52.163] Fib2-(4) result with key 8 result=0000000000000000
166+
INFO [03-05|19:44:52.163] Fib2-(4) result with key 9 result=1f23000000000000
167+
INFO [03-05|19:45:04.171] Fib2-(5) result with key 0 result=050000000500000003000000
168+
INFO [03-05|19:45:04.171] Fib2-(5) result with key 1 result=0300000000000000
169+
INFO [03-05|19:45:04.171] Fib2-(5) result with key 2 result=020000001d000000
170+
INFO [03-05|19:45:04.171] Fib2-(5) result with key 5 result=fcffffffffffffff
171+
INFO [03-05|19:45:04.171] Fib2-(5) result with key 6 result=fcffffffffffffff
172+
INFO [03-05|19:45:04.171] Fib2-(5) result with key 8 result=0000000000000000
173+
INFO [03-05|19:45:04.171] Fib2-(5) result with key 9 result=1f23000000000000
174+
INFO [03-05|19:45:19.182] Fib2-(6) result with key 0 result=060000000800000005000000
175+
INFO [03-05|19:45:19.182] Fib2-(6) result with key 1 result=0000000000000000
176+
INFO [03-05|19:45:19.182] Fib2-(6) result with key 2 result=030000001d000000
177+
INFO [03-05|19:45:19.182] Fib2-(6) result with key 5 result=0000000000000000
178+
INFO [03-05|19:45:19.182] Fib2-(6) result with key 6 result=fcffffffffffffff
179+
INFO [03-05|19:45:19.182] Fib2-(6) result with key 8 result=0000000000000000
180+
INFO [03-05|19:45:19.182] Fib2-(6) result with key 9 result=3323000000000000
181+
INFO [03-05|19:45:35.202] Fib2-(7) result with key 0 result=070000000d00000008000000
182+
INFO [03-05|19:45:35.202] Fib2-(7) result with key 1 result=0000000000000000
183+
INFO [03-05|19:45:35.202] Fib2-(7) result with key 2 result=0200000023000000
184+
INFO [03-05|19:45:35.203] Fib2-(7) result with key 5 result=0000000000000000
185+
INFO [03-05|19:45:35.203] Fib2-(7) result with key 6 result=fcffffffffffffff
186+
INFO [03-05|19:45:35.203] Fib2-(7) result with key 8 result=0000000000000000
187+
INFO [03-05|19:45:35.203] Fib2-(7) result with key 9 result=4723000000000000
188+
INFO [03-05|19:45:46.210] Fib2-(8) result with key 0 result=08000000150000000d000000
189+
INFO [03-05|19:45:46.210] Fib2-(8) result with key 1 result=0300000000000000
190+
INFO [03-05|19:45:46.210] Fib2-(8) result with key 2 result=0200000023000000
191+
INFO [03-05|19:45:46.210] Fib2-(8) result with key 5 result=0000000000000000
192+
INFO [03-05|19:45:46.210] Fib2-(8) result with key 6 result=fcffffffffffffff
193+
INFO [03-05|19:45:46.210] Fib2-(8) result with key 8 result=0000000000000000
194+
INFO [03-05|19:45:46.210] Fib2-(8) result with key 9 result=4723000000000000
195+
INFO [03-05|19:45:58.219] Fib2-(9) result with key 0 result=08000000150000000d000000
196+
INFO [03-05|19:45:58.219] Fib2-(9) result with key 1 result=0300000000000000
197+
INFO [03-05|19:45:58.219] Fib2-(9) result with key 2 result=0200000023000000
198+
INFO [03-05|19:45:58.219] Fib2-(9) result with key 5 result=0000000000000000
199+
INFO [03-05|19:45:58.220] Fib2-(9) result with key 6 result=fcffffffffffffff
200+
INFO [03-05|19:45:58.220] Fib2-(9) result with key 8 result=0000000000000000
201+
INFO [03-05|19:45:58.220] Fib2-(9) result with key 9 result=4723000000000000
202+
```
203+
204+
In key 0 is a 12 byte representation of (n, Fib(n), Fib(n-1)). This is actually exported in the refine operation as well.
205+
206+
This dataset enables broad testing of accumulate invocation.
207+
208+
We are currently developing a broader set of refine test vectors in a similar way to test:
209+
210+
* EXPORT
211+
* EXPUNGE
212+
* FETCH
213+
* GAS
214+
* HISTORICAL_LOOKUP
215+
* INVOKE
216+
* MACHINE
217+
* PEEK
218+
* POKE
219+
220+
We will defer basic testing DESIGNATE, UPGRADE, EJECT, VOID+ZERO to after a live tiny testnet has been set up.
221+
222+
#### Ordered Accumulation
223+
224+
The ordered accumulation data, after setting up a Fib+Trib+Megatron service, has the megatron work package depend on the Fib+Trib work package.
225+
226+
`Meg(N) = Fib(N) + Trib(N)` computed in the same state transition, which forces _ordered accumulation_ (See Sec 12).
227+
228+
* Fib is basically like the above but does not have any host function testing -- it just does Fib(N) = Fib(N-1) + Fib(N-2)
229+
* Trib is like Fib but Trib(N) = Trib(N-1) + Trib(N-2) + Trib(N-3)
230+
* The Fib+Trib workpackage has TWO work items. Meg(N) is computed in a separate work package but with the Fib+Trib work package as prereqs.
231+
232+
You can see the results of these in:
233+
234+
```
235+
INFO [03-05|19:37:38.366] JAMTEST Fib SUCC n=1 result="[1 0 0 0 1 0 0 0 0 0 0 0]"
236+
INFO [03-05|19:37:38.366] JAMTEST Trib SUCC n=1 result="[1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0]"
237+
INFO [03-05|19:37:52.652] JAMTEST Megatron SUCC n=1 result="[1 0 0 0 2 0 0 0 0 0 0 0]"
238+
INFO [03-05|19:38:04.159] JAMTEST Fib SUCC n=2 result="[2 0 0 0 1 0 0 0 1 0 0 0]"
239+
INFO [03-05|19:38:04.159] JAMTEST Trib SUCC n=2 result="[2 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0]"
240+
INFO [03-05|19:38:04.159] JAMTEST Megatron SUCC n=2 result="[2 0 0 0 2 0 0 0 2 0 0 0]"
241+
INFO [03-05|19:38:22.257] JAMTEST Megatron SUCC n=3 result="[3 0 0 0 4 0 0 0 2 0 0 0]"
242+
INFO [03-05|19:38:22.258] JAMTEST Fib SUCC n=3 result="[3 0 0 0 2 0 0 0 1 0 0 0]"
243+
INFO [03-05|19:38:22.258] JAMTEST Trib SUCC n=3 result="[3 0 0 0 2 0 0 0 1 0 0 0 1 0 0 0]"
244+
INFO [03-05|19:38:38.555] JAMTEST Fib SUCC n=4 result="[4 0 0 0 3 0 0 0 2 0 0 0]"
245+
INFO [03-05|19:38:38.555] JAMTEST Trib SUCC n=4 result="[4 0 0 0 4 0 0 0 2 0 0 0 1 0 0 0]"
246+
INFO [03-05|19:38:38.569] JAMTEST Megatron SUCC n=4 result="[4 0 0 0 7 0 0 0 4 0 0 0]"
247+
INFO [03-05|19:38:56.555] JAMTEST Fib SUCC n=5 result="[5 0 0 0 5 0 0 0 3 0 0 0]"
248+
INFO [03-05|19:38:56.555] JAMTEST Trib SUCC n=5 result="[5 0 0 0 7 0 0 0 4 0 0 0 2 0 0 0]"
249+
INFO [03-05|19:38:56.555] JAMTEST Megatron SUCC n=5 result="[5 0 0 0 12 0 0 0 7 0 0 0]"
250+
INFO [03-05|19:39:16.452] JAMTEST Megatron SUCC n=6 result="[6 0 0 0 21 0 0 0 12 0 0 0]"
251+
INFO [03-05|19:39:16.452] JAMTEST Fib SUCC n=6 result="[6 0 0 0 8 0 0 0 5 0 0 0]"
252+
INFO [03-05|19:39:16.452] JAMTEST Trib SUCC n=6 result="[6 0 0 0 13 0 0 0 7 0 0 0 4 0 0 0]"
253+
INFO [03-05|19:39:34.160] JAMTEST Megatron SUCC n=7 result="[7 0 0 0 37 0 0 0 21 0 0 0]"
254+
INFO [03-05|19:39:34.160] JAMTEST Fib SUCC n=7 result="[7 0 0 0 13 0 0 0 8 0 0 0]"
255+
INFO [03-05|19:39:34.160] JAMTEST Trib SUCC n=7 result="[7 0 0 0 24 0 0 0 13 0 0 0 7 0 0 0]"
256+
...
257+
```
117258

118259
## Fuzzed State Transitions
119260

120-
In additiion, inside `data` are additional "fuzzed" datasets consisting of **INVALID** state transitions:
261+
In addition, inside `data` are additional "fuzzed" datasets consisting of **INVALID** state transitions:
121262

122263
* [safrole/state_transitions_fuzzed](./data/safrole/state_transitions_fuzzed)
123264
* [assurances/state_transitions_fuzzed](./data/assurances/state_transitions_fuzzed)

0 commit comments

Comments
 (0)