@sanning/proof 0.12.0 → 0.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +25 -12
- package/dist/agent-proof.d.ts +2 -2
- package/dist/agent-proof.js +4 -4
- package/dist/case-file.d.ts +126 -0
- package/dist/case-file.js +353 -0
- package/dist/case.d.ts +217 -26
- package/dist/case.js +535 -124
- package/dist/cli.d.ts +64 -8
- package/dist/cli.js +799 -219
- package/dist/compose.js +6 -1
- package/dist/crypto.d.ts +1 -1
- package/dist/crypto.js +5 -1
- package/dist/declaration.d.ts +58 -52
- package/dist/declaration.js +256 -33
- package/dist/evidence.d.ts +38 -0
- package/dist/evidence.js +238 -22
- package/dist/exit-codes.d.ts +17 -0
- package/dist/exit-codes.js +50 -0
- package/dist/file-match.d.ts +105 -0
- package/dist/file-match.js +374 -0
- package/dist/grading.d.ts +28 -13
- package/dist/grading.js +90 -31
- package/dist/index.d.ts +14 -7
- package/dist/index.js +20 -6
- package/dist/message-parts.d.ts +18 -10
- package/dist/message-parts.js +25 -15
- package/dist/types.d.ts +1 -0
- package/dist/verifier.d.ts +63 -4
- package/dist/verifier.js +223 -15
- package/dist/witness-cache.d.ts +85 -0
- package/dist/witness-cache.js +264 -0
- package/dist/zip-reader.d.ts +50 -0
- package/dist/zip-reader.js +220 -0
- package/package.json +2 -2
- package/src/agent-proof.ts +4 -4
- package/src/case-file.ts +422 -0
- package/src/case.ts +671 -131
- package/src/cli.ts +932 -217
- package/src/compose.ts +8 -1
- package/src/crypto.ts +5 -1
- package/src/declaration.ts +248 -52
- package/src/evidence.ts +257 -23
- package/src/exit-codes.ts +54 -0
- package/src/file-match.ts +461 -0
- package/src/grading.ts +109 -52
- package/src/index.ts +101 -2
- package/src/message-parts.ts +25 -15
- package/src/types.ts +5 -0
- package/src/verifier.ts +225 -16
- package/src/witness-cache.ts +306 -0
- package/src/zip-reader.ts +229 -0
- package/vectors/README.md +66 -8
- package/vectors/case-file-index.json +668 -0
- package/vectors/case-split.json +218 -9
- package/vectors/file-match.json +1808 -0
- package/vectors/jcs-reader.json +82 -3
- package/vectors/pack-grading.json +68 -4
- package/vectors/stamp-on-chain.json +20 -5
- package/vectors/witness-cache.json +1304 -0
|
@@ -0,0 +1,1304 @@
|
|
|
1
|
+
{
|
|
2
|
+
"rule": "witness-cache",
|
|
3
|
+
"ruleVersion": 1,
|
|
4
|
+
"statement": "What a reader does with the witnessed-time cache, the file `witness-cache.json` beside a pack's `bundle.json` (evidence-bundle.md 5.5.6 and 5.6.6, v1.25, A30). The file is not part of the bundle and nobody signs it, so anyone holding the pack can edit it, and every member of it is unverified by construction. It never moves the headline, the pack grade, the bundle verdict or the signature, and a reader before v1.25 lists it as a file outside every pack and reads nothing else differently. Offline, each cached time is printed on the witness line, labelled not checked. With gateways, each is looked up: a block that differs from the cached one is a finding, the witness line reads `differs` and `case` exits 1; a matching block is printed as the public record's answer; a lookup that names no block leaves the cached value labelled not checked and moves nothing. A file that is absent or malformed reads as no cache. A `cache` member inside `bundle.json` is an unknown wrapper field in the signed scope, and is never read as a cache.",
|
|
5
|
+
"home": "@sanning/proof: ts/vectors/witness-cache.json, written by tools/gen-vectors/gen_witness_cache_table.py with every expectation by hand. The TypeScript kernel implements it in ts/src/witness-cache.ts and ts/src/cli.ts and is held to it by ts/test/witness-cache-vectors.test.ts; the Python kernel implements it in src/sanning_proof/witness_cache.py and src/sanning_proof/cli.py and is held to the SAME file by tests/test_witness_cache_vectors.py.",
|
|
6
|
+
"howToUse": "For each case, take `pack`, set its top-level `cache` to the case's `wrapperCache` where it has one (and leave the signature as it is), and write it as `<dir>/witness-pack/bundle.json`, with `sideContentHex` beside it as `<dir>/witness-pack/logs/<event_id>.json` and, where the case has `cacheFileHex`, those exact bytes as `<dir>/witness-pack/witness-cache.json`. Run the `case` command over that folder twice. The case's `headline` and `offlineExit`, where it has them, replace the table's. Offline: assert the headline, the exit, and the witness line's state and rendered text are `expect.offline`. Online, with `--gateways` set to `expect.online.gateways`: answer `<gateway>/<anchorId>` with the stamp's witnessed bytes where `bytes` says `witnessed`, and answer each POST to `<gateway>/graphql` whose body is `graphqlQuery` per the case's `graphql` answer for that gateway: `block` is `{\"data\":{\"transaction\":{\"block\":{\"height\":H,\"timestamp\":T}}}}`, `pending` is `{\"data\":{\"transaction\":{\"block\":null}}}`, `stringNumbers` is the block with both numbers written as JSON strings, and `unreachable` is a refused request. Assert the headline is unchanged, the exit, the on-chain verdict, the witness line's state and rendered text, how many time lookups were made, and that one byte lookup was made per gateway, or `byteRequests` where the case gives it.",
|
|
7
|
+
"cacheFileName": "witness-cache.json",
|
|
8
|
+
"cacheVersion": "sanning.witness-cache/v1",
|
|
9
|
+
"anchorId": "witnessCacheFixtureAnchorId0000000000000000",
|
|
10
|
+
"stampRef": "f74af46cf35175dec5c279c83802c82df30f8b772362f759eeac207106b2cd9c",
|
|
11
|
+
"stampBytesHex": "7b22696e74657276616c5f656e64223a22323032362d30392d30385431323a31303a30302e3030305a222c22696e74657276616c5f7374617274223a22323032362d30392d30385431323a30303a30302e3030305a222c226c6561665f636f756e74223a312c226d65726b6c655f726f6f74223a2236643835653661663061336331376538343235323064656561343731363635633561346136666639343863616338336562663764383563376662653231613733222c226f72675f726566223a2239393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939222c227374616d705f76657273696f6e223a2273616e6e696e672e7374616d702f7631222c227375627472656573223a7b2231313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131223a7b2266697273745f6c656166223a302c226c6561665f636f756e74223a312c22726f6f74223a2236643835653661663061336331376538343235323064656561343731363635633561346136666639343863616338336562663764383563376662653231613733227d7d7d",
|
|
12
|
+
"graphqlQuery": "{\"query\":\"query{transaction(id:\\\"witnessCacheFixtureAnchorId0000000000000000\\\"){block{height timestamp}}}\"}",
|
|
13
|
+
"headline": "verified",
|
|
14
|
+
"offlineExit": 0,
|
|
15
|
+
"pack": {
|
|
16
|
+
"spec_version": "sanning.evidence/v1",
|
|
17
|
+
"body_type": "sanning.stamp.evidence/v2",
|
|
18
|
+
"issuer": {
|
|
19
|
+
"kind": "sanning"
|
|
20
|
+
},
|
|
21
|
+
"generated_at": "2026-09-08T12:20:00.000Z",
|
|
22
|
+
"gateway": null,
|
|
23
|
+
"verdict": {
|
|
24
|
+
"status": "verified",
|
|
25
|
+
"summary": "witness-cache fixture"
|
|
26
|
+
},
|
|
27
|
+
"body": {
|
|
28
|
+
"stamps": [
|
|
29
|
+
{
|
|
30
|
+
"stamp_ref": "f74af46cf35175dec5c279c83802c82df30f8b772362f759eeac207106b2cd9c",
|
|
31
|
+
"stamp_bytes": "7b22696e74657276616c5f656e64223a22323032362d30392d30385431323a31303a30302e3030305a222c22696e74657276616c5f7374617274223a22323032362d30392d30385431323a30303a30302e3030305a222c226c6561665f636f756e74223a312c226d65726b6c655f726f6f74223a2236643835653661663061336331376538343235323064656561343731363635633561346136666639343863616338336562663764383563376662653231613733222c226f72675f726566223a2239393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939393939222c227374616d705f76657273696f6e223a2273616e6e696e672e7374616d702f7631222c227375627472656573223a7b2231313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131313131223a7b2266697273745f6c656166223a302c226c6561665f636f756e74223a312c22726f6f74223a2236643835653661663061336331376538343235323064656561343731363635633561346136666639343863616338336562663764383563376662653231613733227d7d7d",
|
|
32
|
+
"anchor_ref": {
|
|
33
|
+
"kind": "arweave",
|
|
34
|
+
"id": "witnessCacheFixtureAnchorId0000000000000000"
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"events": [
|
|
39
|
+
{
|
|
40
|
+
"envelope": {
|
|
41
|
+
"spec_version": "sanning.events/v2",
|
|
42
|
+
"event_id": "ad022c80-4c65-4fcf-9346-ed285802beba",
|
|
43
|
+
"payload_hash": "813b6fc58ad1789760f6a7d4ecb85a7de5287e7f2def95b6c65a01257ad68b9b",
|
|
44
|
+
"signed_at": "2026-09-08T12:00:00Z",
|
|
45
|
+
"environment": "production",
|
|
46
|
+
"public_key": "207a067892821e25d770f1fba0c47c11ff4b813e54162ece9eb839e076231ab6",
|
|
47
|
+
"signature": "1224935b022b2b932b1096d000dd303b0d8a57ba90a9bbbf13df821f7521a81c29d33880be7e2c586495921cd7f7b445f8bd563530bd823467a4887d03108005"
|
|
48
|
+
},
|
|
49
|
+
"inclusion": {
|
|
50
|
+
"stamp_ref": "f74af46cf35175dec5c279c83802c82df30f8b772362f759eeac207106b2cd9c",
|
|
51
|
+
"leaf_index": 0,
|
|
52
|
+
"leaf_count": 1,
|
|
53
|
+
"leaf_hash": "6d85e6af0a3c17e842520deea471665c5a4a6ff948cac83ebf7d85c7fbe21a73",
|
|
54
|
+
"audit_path": []
|
|
55
|
+
},
|
|
56
|
+
"event_bytes": "7b226576656e74223a7b22636f6e74656e745f68617368223a2239386230386337396439313831643034363337316166643139623438393431653633313434316361316530323531646535663238666632636533383533383033227d7d"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
"body_hash": "1c9a04502d8efa29d985b89cea5e3fb28438b03bf3ecc15b7a6be468a0eded67",
|
|
61
|
+
"previous_hash": "GENESIS",
|
|
62
|
+
"signature_alg": "ed25519",
|
|
63
|
+
"public_key": "207a067892821e25d770f1fba0c47c11ff4b813e54162ece9eb839e076231ab6",
|
|
64
|
+
"signature": "3603350967925d8cf101b33972a52d4d664be6894d02be873d6e71b79efd6ebc60e20156af7cd7deb95909bc9de0d470d5851dc14a53304a4a95e5a952b25a0f"
|
|
65
|
+
},
|
|
66
|
+
"sideContentHex": {
|
|
67
|
+
"ad022c80-4c65-4fcf-9346-ed285802beba": "7b2273746570223a227769746e6573732d63616368652066697874757265227d"
|
|
68
|
+
},
|
|
69
|
+
"cases": [
|
|
70
|
+
{
|
|
71
|
+
"id": "cache-absent",
|
|
72
|
+
"why": "A pack with no cache reads exactly as it did before the cache existed: the same line offline, the same line with a gateway, and no time is asked for.",
|
|
73
|
+
"expect": {
|
|
74
|
+
"offline": {
|
|
75
|
+
"state": "not_checked",
|
|
76
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
77
|
+
},
|
|
78
|
+
"online": {
|
|
79
|
+
"gateways": [
|
|
80
|
+
"http://gw.example"
|
|
81
|
+
],
|
|
82
|
+
"answers": {
|
|
83
|
+
"bytes": [
|
|
84
|
+
"witnessed"
|
|
85
|
+
],
|
|
86
|
+
"graphql": [
|
|
87
|
+
{
|
|
88
|
+
"kind": "block",
|
|
89
|
+
"block_height": 1996701,
|
|
90
|
+
"block_time": 1788869407
|
|
91
|
+
}
|
|
92
|
+
]
|
|
93
|
+
},
|
|
94
|
+
"state": "confirmed",
|
|
95
|
+
"onChainVerdict": "confirmed",
|
|
96
|
+
"exit": 0,
|
|
97
|
+
"graphqlRequests": 0,
|
|
98
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"id": "cache-matches",
|
|
104
|
+
"why": "Offline, the cached time is printed and labelled not checked, and the line stays not checked. With a gateway, the time the public record returns is printed as the record's, and the line is confirmed by the bytes, as it would be with no cache.",
|
|
105
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
106
|
+
"expect": {
|
|
107
|
+
"offline": {
|
|
108
|
+
"state": "not_checked",
|
|
109
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996701 at 2026-09-08T12:10:07Z"
|
|
110
|
+
},
|
|
111
|
+
"online": {
|
|
112
|
+
"gateways": [
|
|
113
|
+
"http://gw.example"
|
|
114
|
+
],
|
|
115
|
+
"answers": {
|
|
116
|
+
"bytes": [
|
|
117
|
+
"witnessed"
|
|
118
|
+
],
|
|
119
|
+
"graphql": [
|
|
120
|
+
{
|
|
121
|
+
"kind": "block",
|
|
122
|
+
"block_height": 1996701,
|
|
123
|
+
"block_time": 1788869407
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
"state": "confirmed",
|
|
128
|
+
"onChainVerdict": "confirmed",
|
|
129
|
+
"exit": 0,
|
|
130
|
+
"graphqlRequests": 1,
|
|
131
|
+
"rendered": "Witness: Confirmed on the public record: the public record dates the witness: block 1996701 at 2026-09-08T12:10:07Z (answered: http://gw.example)"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
"id": "cache-time-wrong",
|
|
137
|
+
"why": "A cache one hour late. Offline, the reader cannot tell, so it prints the cached value and says it is not checked, never that it is confirmed. With a gateway it is a finding: the line reads differs, the command exits 1, and the headline does not move.",
|
|
138
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383837333030372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
139
|
+
"expect": {
|
|
140
|
+
"offline": {
|
|
141
|
+
"state": "not_checked",
|
|
142
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996701 at 2026-09-08T13:10:07Z"
|
|
143
|
+
},
|
|
144
|
+
"online": {
|
|
145
|
+
"gateways": [
|
|
146
|
+
"http://gw.example"
|
|
147
|
+
],
|
|
148
|
+
"answers": {
|
|
149
|
+
"bytes": [
|
|
150
|
+
"witnessed"
|
|
151
|
+
],
|
|
152
|
+
"graphql": [
|
|
153
|
+
{
|
|
154
|
+
"kind": "block",
|
|
155
|
+
"block_height": 1996701,
|
|
156
|
+
"block_time": 1788869407
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
},
|
|
160
|
+
"state": "differs",
|
|
161
|
+
"onChainVerdict": "failed",
|
|
162
|
+
"exit": 1,
|
|
163
|
+
"graphqlRequests": 1,
|
|
164
|
+
"rendered": "Witness: The public record holds different bytes: a pack dates the witness block 1996701 at 2026-09-08T13:10:07Z, and the public record dates it block 1996701 at 2026-09-08T12:10:07Z (answered: http://gw.example)"
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
{
|
|
169
|
+
"id": "cache-height-wrong",
|
|
170
|
+
"why": "The right time and the wrong block. Both numbers are compared, so this differs too.",
|
|
171
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730322c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
172
|
+
"expect": {
|
|
173
|
+
"offline": {
|
|
174
|
+
"state": "not_checked",
|
|
175
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996702 at 2026-09-08T12:10:07Z"
|
|
176
|
+
},
|
|
177
|
+
"online": {
|
|
178
|
+
"gateways": [
|
|
179
|
+
"http://gw.example"
|
|
180
|
+
],
|
|
181
|
+
"answers": {
|
|
182
|
+
"bytes": [
|
|
183
|
+
"witnessed"
|
|
184
|
+
],
|
|
185
|
+
"graphql": [
|
|
186
|
+
{
|
|
187
|
+
"kind": "block",
|
|
188
|
+
"block_height": 1996701,
|
|
189
|
+
"block_time": 1788869407
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
"state": "differs",
|
|
194
|
+
"onChainVerdict": "failed",
|
|
195
|
+
"exit": 1,
|
|
196
|
+
"graphqlRequests": 1,
|
|
197
|
+
"rendered": "Witness: The public record holds different bytes: a pack dates the witness block 1996702 at 2026-09-08T12:10:07Z, and the public record dates it block 1996701 at 2026-09-08T12:10:07Z (answered: http://gw.example)"
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
{
|
|
202
|
+
"id": "cache-wrong-time-lookup-unsettled",
|
|
203
|
+
"why": "A wrong cache, and a time lookup that does not settle. The bytes still confirm, and the cached value stays labelled not checked: a wrong cache never reads as confirmed, and an unanswered time lookup accuses nobody and moves no exit code.",
|
|
204
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383837333030372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
205
|
+
"expect": {
|
|
206
|
+
"offline": {
|
|
207
|
+
"state": "not_checked",
|
|
208
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996701 at 2026-09-08T13:10:07Z"
|
|
209
|
+
},
|
|
210
|
+
"online": {
|
|
211
|
+
"gateways": [
|
|
212
|
+
"http://gw.example"
|
|
213
|
+
],
|
|
214
|
+
"answers": {
|
|
215
|
+
"bytes": [
|
|
216
|
+
"witnessed"
|
|
217
|
+
],
|
|
218
|
+
"graphql": [
|
|
219
|
+
{
|
|
220
|
+
"kind": "unreachable"
|
|
221
|
+
}
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
"state": "confirmed",
|
|
225
|
+
"onChainVerdict": "confirmed",
|
|
226
|
+
"exit": 0,
|
|
227
|
+
"graphqlRequests": 1,
|
|
228
|
+
"rendered": "Witness: Confirmed on the public record: the pack dates the witness, not checked: block 1996701 at 2026-09-08T13:10:07Z (answered: http://gw.example)"
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
{
|
|
233
|
+
"id": "cache-wrong-witness-pending",
|
|
234
|
+
"why": "The gateway holds the transaction and has no block for it yet. That names no block, so it settles nothing: the cached value stays not checked.",
|
|
235
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383837333030372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
236
|
+
"expect": {
|
|
237
|
+
"offline": {
|
|
238
|
+
"state": "not_checked",
|
|
239
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996701 at 2026-09-08T13:10:07Z"
|
|
240
|
+
},
|
|
241
|
+
"online": {
|
|
242
|
+
"gateways": [
|
|
243
|
+
"http://gw.example"
|
|
244
|
+
],
|
|
245
|
+
"answers": {
|
|
246
|
+
"bytes": [
|
|
247
|
+
"witnessed"
|
|
248
|
+
],
|
|
249
|
+
"graphql": [
|
|
250
|
+
{
|
|
251
|
+
"kind": "pending"
|
|
252
|
+
}
|
|
253
|
+
]
|
|
254
|
+
},
|
|
255
|
+
"state": "confirmed",
|
|
256
|
+
"onChainVerdict": "confirmed",
|
|
257
|
+
"exit": 0,
|
|
258
|
+
"graphqlRequests": 1,
|
|
259
|
+
"rendered": "Witness: Confirmed on the public record: the pack dates the witness, not checked: block 1996701 at 2026-09-08T13:10:07Z (answered: http://gw.example)"
|
|
260
|
+
}
|
|
261
|
+
}
|
|
262
|
+
},
|
|
263
|
+
{
|
|
264
|
+
"id": "cache-wrong-answer-not-a-block",
|
|
265
|
+
"why": "A gateway answers the time lookup with numbers spelled as strings. That is not an answer this reader reads, so it names no block and settles nothing.",
|
|
266
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383837333030372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
267
|
+
"expect": {
|
|
268
|
+
"offline": {
|
|
269
|
+
"state": "not_checked",
|
|
270
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996701 at 2026-09-08T13:10:07Z"
|
|
271
|
+
},
|
|
272
|
+
"online": {
|
|
273
|
+
"gateways": [
|
|
274
|
+
"http://gw.example"
|
|
275
|
+
],
|
|
276
|
+
"answers": {
|
|
277
|
+
"bytes": [
|
|
278
|
+
"witnessed"
|
|
279
|
+
],
|
|
280
|
+
"graphql": [
|
|
281
|
+
{
|
|
282
|
+
"kind": "stringNumbers"
|
|
283
|
+
}
|
|
284
|
+
]
|
|
285
|
+
},
|
|
286
|
+
"state": "confirmed",
|
|
287
|
+
"onChainVerdict": "confirmed",
|
|
288
|
+
"exit": 0,
|
|
289
|
+
"graphqlRequests": 1,
|
|
290
|
+
"rendered": "Witness: Confirmed on the public record: the pack dates the witness, not checked: block 1996701 at 2026-09-08T13:10:07Z (answered: http://gw.example)"
|
|
291
|
+
}
|
|
292
|
+
}
|
|
293
|
+
},
|
|
294
|
+
{
|
|
295
|
+
"id": "cache-one-gateway-differs",
|
|
296
|
+
"why": "Two gateways, one naming the cached block and one naming another. Worst answer wins, as it does for the bytes: the line reads differs.",
|
|
297
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
298
|
+
"expect": {
|
|
299
|
+
"offline": {
|
|
300
|
+
"state": "not_checked",
|
|
301
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996701 at 2026-09-08T12:10:07Z"
|
|
302
|
+
},
|
|
303
|
+
"online": {
|
|
304
|
+
"gateways": [
|
|
305
|
+
"http://gw.example",
|
|
306
|
+
"http://gw2.example"
|
|
307
|
+
],
|
|
308
|
+
"answers": {
|
|
309
|
+
"bytes": [
|
|
310
|
+
"witnessed",
|
|
311
|
+
"witnessed"
|
|
312
|
+
],
|
|
313
|
+
"graphql": [
|
|
314
|
+
{
|
|
315
|
+
"kind": "block",
|
|
316
|
+
"block_height": 1996701,
|
|
317
|
+
"block_time": 1788869407
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
"kind": "block",
|
|
321
|
+
"block_height": 1996701,
|
|
322
|
+
"block_time": 1788869347
|
|
323
|
+
}
|
|
324
|
+
]
|
|
325
|
+
},
|
|
326
|
+
"state": "differs",
|
|
327
|
+
"onChainVerdict": "failed",
|
|
328
|
+
"exit": 1,
|
|
329
|
+
"graphqlRequests": 2,
|
|
330
|
+
"rendered": "Witness: The public record holds different bytes: a pack dates the witness block 1996701 at 2026-09-08T12:10:07Z, and the public record dates it block 1996701 at 2026-09-08T12:09:07Z (answered: http://gw.example, http://gw2.example)"
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
"id": "cache-nested-to-512",
|
|
336
|
+
"why": "An entry carrying an unknown member that takes the file to exactly 512 levels, the most the file is read under. The file is not the bundle, so its depth is nothing the bundle's bounds read; the entry reads, and its unknown member is ignored.",
|
|
337
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c226e6f7465223a5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d2c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
338
|
+
"expect": {
|
|
339
|
+
"offline": {
|
|
340
|
+
"state": "not_checked",
|
|
341
|
+
"rendered": "Witness: Not checked: no lookup was run; the pack dates the witness, not checked: block 1996701 at 2026-09-08T12:10:07Z"
|
|
342
|
+
},
|
|
343
|
+
"online": {
|
|
344
|
+
"gateways": [
|
|
345
|
+
"http://gw.example"
|
|
346
|
+
],
|
|
347
|
+
"answers": {
|
|
348
|
+
"bytes": [
|
|
349
|
+
"witnessed"
|
|
350
|
+
],
|
|
351
|
+
"graphql": [
|
|
352
|
+
{
|
|
353
|
+
"kind": "block",
|
|
354
|
+
"block_height": 1996701,
|
|
355
|
+
"block_time": 1788869407
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
"state": "confirmed",
|
|
360
|
+
"onChainVerdict": "confirmed",
|
|
361
|
+
"exit": 0,
|
|
362
|
+
"graphqlRequests": 1,
|
|
363
|
+
"rendered": "Witness: Confirmed on the public record: the public record dates the witness: block 1996701 at 2026-09-08T12:10:07Z (answered: http://gw.example)"
|
|
364
|
+
}
|
|
365
|
+
}
|
|
366
|
+
},
|
|
367
|
+
{
|
|
368
|
+
"id": "wrapper-cache-is-an-unknown-field",
|
|
369
|
+
"why": "The v1.22 draft's shape: a good cache written as a `cache` member INSIDE bundle.json, after the wrapper was signed, and no file beside it. It is an unknown wrapper field, inside the signed scope exactly as on proof 0.13.0, so the wrapper signature fails and the pack reads failed. It is never read as a cache: nothing is printed for it and no time is asked for. A pack whose wrapper fails names no witness to look up, as on 0.13.0, so no byte lookup is made either.",
|
|
370
|
+
"wrapperCache": {
|
|
371
|
+
"cache_version": "sanning.witness-cache/v1",
|
|
372
|
+
"witnessed": [
|
|
373
|
+
{
|
|
374
|
+
"stamp_ref": "f74af46cf35175dec5c279c83802c82df30f8b772362f759eeac207106b2cd9c",
|
|
375
|
+
"block_height": 1996701,
|
|
376
|
+
"block_time": 1788869407
|
|
377
|
+
}
|
|
378
|
+
]
|
|
379
|
+
},
|
|
380
|
+
"headline": "failed",
|
|
381
|
+
"offlineExit": 1,
|
|
382
|
+
"expect": {
|
|
383
|
+
"offline": {
|
|
384
|
+
"state": "not_checked",
|
|
385
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
386
|
+
},
|
|
387
|
+
"online": {
|
|
388
|
+
"gateways": [
|
|
389
|
+
"http://gw.example"
|
|
390
|
+
],
|
|
391
|
+
"answers": {
|
|
392
|
+
"bytes": [
|
|
393
|
+
"witnessed"
|
|
394
|
+
],
|
|
395
|
+
"graphql": [
|
|
396
|
+
{
|
|
397
|
+
"kind": "block",
|
|
398
|
+
"block_height": 1996701,
|
|
399
|
+
"block_time": 1788869407
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
},
|
|
403
|
+
"state": "not_checked",
|
|
404
|
+
"onChainVerdict": "undetermined",
|
|
405
|
+
"exit": 1,
|
|
406
|
+
"graphqlRequests": 0,
|
|
407
|
+
"byteRequests": 0,
|
|
408
|
+
"rendered": "Witness: Not checked: a pack names no witness"
|
|
409
|
+
}
|
|
410
|
+
}
|
|
411
|
+
},
|
|
412
|
+
{
|
|
413
|
+
"id": "malformed-file-empty",
|
|
414
|
+
"why": "A malformed cache file, an empty file. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
415
|
+
"cacheFileHex": "",
|
|
416
|
+
"expect": {
|
|
417
|
+
"offline": {
|
|
418
|
+
"state": "not_checked",
|
|
419
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
420
|
+
},
|
|
421
|
+
"online": {
|
|
422
|
+
"gateways": [
|
|
423
|
+
"http://gw.example"
|
|
424
|
+
],
|
|
425
|
+
"answers": {
|
|
426
|
+
"bytes": [
|
|
427
|
+
"witnessed"
|
|
428
|
+
],
|
|
429
|
+
"graphql": [
|
|
430
|
+
{
|
|
431
|
+
"kind": "block",
|
|
432
|
+
"block_height": 1996701,
|
|
433
|
+
"block_time": 1788869407
|
|
434
|
+
}
|
|
435
|
+
]
|
|
436
|
+
},
|
|
437
|
+
"state": "confirmed",
|
|
438
|
+
"onChainVerdict": "confirmed",
|
|
439
|
+
"exit": 0,
|
|
440
|
+
"graphqlRequests": 0,
|
|
441
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"id": "malformed-file-not-json",
|
|
447
|
+
"why": "A malformed cache file, bytes that are not JSON. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
448
|
+
"cacheFileHex": "7b6e6f74206a736f6e",
|
|
449
|
+
"expect": {
|
|
450
|
+
"offline": {
|
|
451
|
+
"state": "not_checked",
|
|
452
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
453
|
+
},
|
|
454
|
+
"online": {
|
|
455
|
+
"gateways": [
|
|
456
|
+
"http://gw.example"
|
|
457
|
+
],
|
|
458
|
+
"answers": {
|
|
459
|
+
"bytes": [
|
|
460
|
+
"witnessed"
|
|
461
|
+
],
|
|
462
|
+
"graphql": [
|
|
463
|
+
{
|
|
464
|
+
"kind": "block",
|
|
465
|
+
"block_height": 1996701,
|
|
466
|
+
"block_time": 1788869407
|
|
467
|
+
}
|
|
468
|
+
]
|
|
469
|
+
},
|
|
470
|
+
"state": "confirmed",
|
|
471
|
+
"onChainVerdict": "confirmed",
|
|
472
|
+
"exit": 0,
|
|
473
|
+
"graphqlRequests": 0,
|
|
474
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"id": "malformed-file-byte-order-mark",
|
|
480
|
+
"why": "A malformed cache file, the good file after a byte-order mark. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
481
|
+
"cacheFileHex": "efbbbf7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
482
|
+
"expect": {
|
|
483
|
+
"offline": {
|
|
484
|
+
"state": "not_checked",
|
|
485
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
486
|
+
},
|
|
487
|
+
"online": {
|
|
488
|
+
"gateways": [
|
|
489
|
+
"http://gw.example"
|
|
490
|
+
],
|
|
491
|
+
"answers": {
|
|
492
|
+
"bytes": [
|
|
493
|
+
"witnessed"
|
|
494
|
+
],
|
|
495
|
+
"graphql": [
|
|
496
|
+
{
|
|
497
|
+
"kind": "block",
|
|
498
|
+
"block_height": 1996701,
|
|
499
|
+
"block_time": 1788869407
|
|
500
|
+
}
|
|
501
|
+
]
|
|
502
|
+
},
|
|
503
|
+
"state": "confirmed",
|
|
504
|
+
"onChainVerdict": "confirmed",
|
|
505
|
+
"exit": 0,
|
|
506
|
+
"graphqlRequests": 0,
|
|
507
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"id": "malformed-file-not-utf8",
|
|
513
|
+
"why": "A malformed cache file, the good file with an ill-formed UTF-8 byte in an unknown member. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
514
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d2c226e6f7465223a22ff227d",
|
|
515
|
+
"expect": {
|
|
516
|
+
"offline": {
|
|
517
|
+
"state": "not_checked",
|
|
518
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
519
|
+
},
|
|
520
|
+
"online": {
|
|
521
|
+
"gateways": [
|
|
522
|
+
"http://gw.example"
|
|
523
|
+
],
|
|
524
|
+
"answers": {
|
|
525
|
+
"bytes": [
|
|
526
|
+
"witnessed"
|
|
527
|
+
],
|
|
528
|
+
"graphql": [
|
|
529
|
+
{
|
|
530
|
+
"kind": "block",
|
|
531
|
+
"block_height": 1996701,
|
|
532
|
+
"block_time": 1788869407
|
|
533
|
+
}
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
"state": "confirmed",
|
|
537
|
+
"onChainVerdict": "confirmed",
|
|
538
|
+
"exit": 0,
|
|
539
|
+
"graphqlRequests": 0,
|
|
540
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
"id": "malformed-file-non-finite",
|
|
546
|
+
"why": "A malformed cache file, the good file with NaN in an unknown member. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
547
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d2c226e6f7465223a4e614e7d",
|
|
548
|
+
"expect": {
|
|
549
|
+
"offline": {
|
|
550
|
+
"state": "not_checked",
|
|
551
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
552
|
+
},
|
|
553
|
+
"online": {
|
|
554
|
+
"gateways": [
|
|
555
|
+
"http://gw.example"
|
|
556
|
+
],
|
|
557
|
+
"answers": {
|
|
558
|
+
"bytes": [
|
|
559
|
+
"witnessed"
|
|
560
|
+
],
|
|
561
|
+
"graphql": [
|
|
562
|
+
{
|
|
563
|
+
"kind": "block",
|
|
564
|
+
"block_height": 1996701,
|
|
565
|
+
"block_time": 1788869407
|
|
566
|
+
}
|
|
567
|
+
]
|
|
568
|
+
},
|
|
569
|
+
"state": "confirmed",
|
|
570
|
+
"onChainVerdict": "confirmed",
|
|
571
|
+
"exit": 0,
|
|
572
|
+
"graphqlRequests": 0,
|
|
573
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
},
|
|
577
|
+
{
|
|
578
|
+
"id": "malformed-file-duplicate-member",
|
|
579
|
+
"why": "A malformed cache file, witnessed named twice, an empty list first and the good list second. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
580
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b5d2c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
581
|
+
"expect": {
|
|
582
|
+
"offline": {
|
|
583
|
+
"state": "not_checked",
|
|
584
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
585
|
+
},
|
|
586
|
+
"online": {
|
|
587
|
+
"gateways": [
|
|
588
|
+
"http://gw.example"
|
|
589
|
+
],
|
|
590
|
+
"answers": {
|
|
591
|
+
"bytes": [
|
|
592
|
+
"witnessed"
|
|
593
|
+
],
|
|
594
|
+
"graphql": [
|
|
595
|
+
{
|
|
596
|
+
"kind": "block",
|
|
597
|
+
"block_height": 1996701,
|
|
598
|
+
"block_time": 1788869407
|
|
599
|
+
}
|
|
600
|
+
]
|
|
601
|
+
},
|
|
602
|
+
"state": "confirmed",
|
|
603
|
+
"onChainVerdict": "confirmed",
|
|
604
|
+
"exit": 0,
|
|
605
|
+
"graphqlRequests": 0,
|
|
606
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
607
|
+
}
|
|
608
|
+
}
|
|
609
|
+
},
|
|
610
|
+
{
|
|
611
|
+
"id": "malformed-file-nested-past-512",
|
|
612
|
+
"why": "A malformed cache file, the good file with an unknown member nested 513 levels deep. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
613
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d2c226e6f7465223a5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5b5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d7d",
|
|
614
|
+
"expect": {
|
|
615
|
+
"offline": {
|
|
616
|
+
"state": "not_checked",
|
|
617
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
618
|
+
},
|
|
619
|
+
"online": {
|
|
620
|
+
"gateways": [
|
|
621
|
+
"http://gw.example"
|
|
622
|
+
],
|
|
623
|
+
"answers": {
|
|
624
|
+
"bytes": [
|
|
625
|
+
"witnessed"
|
|
626
|
+
],
|
|
627
|
+
"graphql": [
|
|
628
|
+
{
|
|
629
|
+
"kind": "block",
|
|
630
|
+
"block_height": 1996701,
|
|
631
|
+
"block_time": 1788869407
|
|
632
|
+
}
|
|
633
|
+
]
|
|
634
|
+
},
|
|
635
|
+
"state": "confirmed",
|
|
636
|
+
"onChainVerdict": "confirmed",
|
|
637
|
+
"exit": 0,
|
|
638
|
+
"graphqlRequests": 0,
|
|
639
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
"id": "malformed-cache-not-an-object",
|
|
645
|
+
"why": "A malformed cache file, a string. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
646
|
+
"cacheFileHex": "227769746e657373656420323032362d30392d303822",
|
|
647
|
+
"expect": {
|
|
648
|
+
"offline": {
|
|
649
|
+
"state": "not_checked",
|
|
650
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
651
|
+
},
|
|
652
|
+
"online": {
|
|
653
|
+
"gateways": [
|
|
654
|
+
"http://gw.example"
|
|
655
|
+
],
|
|
656
|
+
"answers": {
|
|
657
|
+
"bytes": [
|
|
658
|
+
"witnessed"
|
|
659
|
+
],
|
|
660
|
+
"graphql": [
|
|
661
|
+
{
|
|
662
|
+
"kind": "block",
|
|
663
|
+
"block_height": 1996701,
|
|
664
|
+
"block_time": 1788869407
|
|
665
|
+
}
|
|
666
|
+
]
|
|
667
|
+
},
|
|
668
|
+
"state": "confirmed",
|
|
669
|
+
"onChainVerdict": "confirmed",
|
|
670
|
+
"exit": 0,
|
|
671
|
+
"graphqlRequests": 0,
|
|
672
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
673
|
+
}
|
|
674
|
+
}
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
"id": "malformed-cache-is-an-array",
|
|
678
|
+
"why": "A malformed cache file, an array, not an object. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
679
|
+
"cacheFileHex": "5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d",
|
|
680
|
+
"expect": {
|
|
681
|
+
"offline": {
|
|
682
|
+
"state": "not_checked",
|
|
683
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
684
|
+
},
|
|
685
|
+
"online": {
|
|
686
|
+
"gateways": [
|
|
687
|
+
"http://gw.example"
|
|
688
|
+
],
|
|
689
|
+
"answers": {
|
|
690
|
+
"bytes": [
|
|
691
|
+
"witnessed"
|
|
692
|
+
],
|
|
693
|
+
"graphql": [
|
|
694
|
+
{
|
|
695
|
+
"kind": "block",
|
|
696
|
+
"block_height": 1996701,
|
|
697
|
+
"block_time": 1788869407
|
|
698
|
+
}
|
|
699
|
+
]
|
|
700
|
+
},
|
|
701
|
+
"state": "confirmed",
|
|
702
|
+
"onChainVerdict": "confirmed",
|
|
703
|
+
"exit": 0,
|
|
704
|
+
"graphqlRequests": 0,
|
|
705
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
},
|
|
709
|
+
{
|
|
710
|
+
"id": "malformed-version-missing",
|
|
711
|
+
"why": "A malformed cache file, the v1.22 wrapper shape, no cache_version. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
712
|
+
"cacheFileHex": "7b227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
713
|
+
"expect": {
|
|
714
|
+
"offline": {
|
|
715
|
+
"state": "not_checked",
|
|
716
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
717
|
+
},
|
|
718
|
+
"online": {
|
|
719
|
+
"gateways": [
|
|
720
|
+
"http://gw.example"
|
|
721
|
+
],
|
|
722
|
+
"answers": {
|
|
723
|
+
"bytes": [
|
|
724
|
+
"witnessed"
|
|
725
|
+
],
|
|
726
|
+
"graphql": [
|
|
727
|
+
{
|
|
728
|
+
"kind": "block",
|
|
729
|
+
"block_height": 1996701,
|
|
730
|
+
"block_time": 1788869407
|
|
731
|
+
}
|
|
732
|
+
]
|
|
733
|
+
},
|
|
734
|
+
"state": "confirmed",
|
|
735
|
+
"onChainVerdict": "confirmed",
|
|
736
|
+
"exit": 0,
|
|
737
|
+
"graphqlRequests": 0,
|
|
738
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
739
|
+
}
|
|
740
|
+
}
|
|
741
|
+
},
|
|
742
|
+
{
|
|
743
|
+
"id": "malformed-version-unknown",
|
|
744
|
+
"why": "A malformed cache file, cache_version sanning.witness-cache/v2. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
745
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7632222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
746
|
+
"expect": {
|
|
747
|
+
"offline": {
|
|
748
|
+
"state": "not_checked",
|
|
749
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
750
|
+
},
|
|
751
|
+
"online": {
|
|
752
|
+
"gateways": [
|
|
753
|
+
"http://gw.example"
|
|
754
|
+
],
|
|
755
|
+
"answers": {
|
|
756
|
+
"bytes": [
|
|
757
|
+
"witnessed"
|
|
758
|
+
],
|
|
759
|
+
"graphql": [
|
|
760
|
+
{
|
|
761
|
+
"kind": "block",
|
|
762
|
+
"block_height": 1996701,
|
|
763
|
+
"block_time": 1788869407
|
|
764
|
+
}
|
|
765
|
+
]
|
|
766
|
+
},
|
|
767
|
+
"state": "confirmed",
|
|
768
|
+
"onChainVerdict": "confirmed",
|
|
769
|
+
"exit": 0,
|
|
770
|
+
"graphqlRequests": 0,
|
|
771
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
"id": "malformed-version-not-a-string",
|
|
777
|
+
"why": "A malformed cache file, cache_version 1. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
778
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a312c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
779
|
+
"expect": {
|
|
780
|
+
"offline": {
|
|
781
|
+
"state": "not_checked",
|
|
782
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
783
|
+
},
|
|
784
|
+
"online": {
|
|
785
|
+
"gateways": [
|
|
786
|
+
"http://gw.example"
|
|
787
|
+
],
|
|
788
|
+
"answers": {
|
|
789
|
+
"bytes": [
|
|
790
|
+
"witnessed"
|
|
791
|
+
],
|
|
792
|
+
"graphql": [
|
|
793
|
+
{
|
|
794
|
+
"kind": "block",
|
|
795
|
+
"block_height": 1996701,
|
|
796
|
+
"block_time": 1788869407
|
|
797
|
+
}
|
|
798
|
+
]
|
|
799
|
+
},
|
|
800
|
+
"state": "confirmed",
|
|
801
|
+
"onChainVerdict": "confirmed",
|
|
802
|
+
"exit": 0,
|
|
803
|
+
"graphqlRequests": 0,
|
|
804
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
805
|
+
}
|
|
806
|
+
}
|
|
807
|
+
},
|
|
808
|
+
{
|
|
809
|
+
"id": "malformed-witnessed-missing",
|
|
810
|
+
"why": "A malformed cache file, an object with no witnessed. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
811
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e65737365645f6174223a313738383836393430377d",
|
|
812
|
+
"expect": {
|
|
813
|
+
"offline": {
|
|
814
|
+
"state": "not_checked",
|
|
815
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
816
|
+
},
|
|
817
|
+
"online": {
|
|
818
|
+
"gateways": [
|
|
819
|
+
"http://gw.example"
|
|
820
|
+
],
|
|
821
|
+
"answers": {
|
|
822
|
+
"bytes": [
|
|
823
|
+
"witnessed"
|
|
824
|
+
],
|
|
825
|
+
"graphql": [
|
|
826
|
+
{
|
|
827
|
+
"kind": "block",
|
|
828
|
+
"block_height": 1996701,
|
|
829
|
+
"block_time": 1788869407
|
|
830
|
+
}
|
|
831
|
+
]
|
|
832
|
+
},
|
|
833
|
+
"state": "confirmed",
|
|
834
|
+
"onChainVerdict": "confirmed",
|
|
835
|
+
"exit": 0,
|
|
836
|
+
"graphqlRequests": 0,
|
|
837
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
},
|
|
841
|
+
{
|
|
842
|
+
"id": "malformed-witnessed-not-a-list",
|
|
843
|
+
"why": "A malformed cache file, witnessed is an object. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
844
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d7d",
|
|
845
|
+
"expect": {
|
|
846
|
+
"offline": {
|
|
847
|
+
"state": "not_checked",
|
|
848
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
849
|
+
},
|
|
850
|
+
"online": {
|
|
851
|
+
"gateways": [
|
|
852
|
+
"http://gw.example"
|
|
853
|
+
],
|
|
854
|
+
"answers": {
|
|
855
|
+
"bytes": [
|
|
856
|
+
"witnessed"
|
|
857
|
+
],
|
|
858
|
+
"graphql": [
|
|
859
|
+
{
|
|
860
|
+
"kind": "block",
|
|
861
|
+
"block_height": 1996701,
|
|
862
|
+
"block_time": 1788869407
|
|
863
|
+
}
|
|
864
|
+
]
|
|
865
|
+
},
|
|
866
|
+
"state": "confirmed",
|
|
867
|
+
"onChainVerdict": "confirmed",
|
|
868
|
+
"exit": 0,
|
|
869
|
+
"graphqlRequests": 0,
|
|
870
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
871
|
+
}
|
|
872
|
+
}
|
|
873
|
+
},
|
|
874
|
+
{
|
|
875
|
+
"id": "malformed-entry-not-an-object",
|
|
876
|
+
"why": "A malformed cache file, an entry that is a number. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
877
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b313738383836393430375d7d",
|
|
878
|
+
"expect": {
|
|
879
|
+
"offline": {
|
|
880
|
+
"state": "not_checked",
|
|
881
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
882
|
+
},
|
|
883
|
+
"online": {
|
|
884
|
+
"gateways": [
|
|
885
|
+
"http://gw.example"
|
|
886
|
+
],
|
|
887
|
+
"answers": {
|
|
888
|
+
"bytes": [
|
|
889
|
+
"witnessed"
|
|
890
|
+
],
|
|
891
|
+
"graphql": [
|
|
892
|
+
{
|
|
893
|
+
"kind": "block",
|
|
894
|
+
"block_height": 1996701,
|
|
895
|
+
"block_time": 1788869407
|
|
896
|
+
}
|
|
897
|
+
]
|
|
898
|
+
},
|
|
899
|
+
"state": "confirmed",
|
|
900
|
+
"onChainVerdict": "confirmed",
|
|
901
|
+
"exit": 0,
|
|
902
|
+
"graphqlRequests": 0,
|
|
903
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
904
|
+
}
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
{
|
|
908
|
+
"id": "malformed-time-as-a-string",
|
|
909
|
+
"why": "A malformed cache file, block_time a string. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
910
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a22323032362d30392d30385431323a31303a30375a222c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
911
|
+
"expect": {
|
|
912
|
+
"offline": {
|
|
913
|
+
"state": "not_checked",
|
|
914
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
915
|
+
},
|
|
916
|
+
"online": {
|
|
917
|
+
"gateways": [
|
|
918
|
+
"http://gw.example"
|
|
919
|
+
],
|
|
920
|
+
"answers": {
|
|
921
|
+
"bytes": [
|
|
922
|
+
"witnessed"
|
|
923
|
+
],
|
|
924
|
+
"graphql": [
|
|
925
|
+
{
|
|
926
|
+
"kind": "block",
|
|
927
|
+
"block_height": 1996701,
|
|
928
|
+
"block_time": 1788869407
|
|
929
|
+
}
|
|
930
|
+
]
|
|
931
|
+
},
|
|
932
|
+
"state": "confirmed",
|
|
933
|
+
"onChainVerdict": "confirmed",
|
|
934
|
+
"exit": 0,
|
|
935
|
+
"graphqlRequests": 0,
|
|
936
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
937
|
+
}
|
|
938
|
+
}
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
"id": "malformed-time-not-whole",
|
|
942
|
+
"why": "A malformed cache file, block_time 1788869407.5. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
943
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372e352c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
944
|
+
"expect": {
|
|
945
|
+
"offline": {
|
|
946
|
+
"state": "not_checked",
|
|
947
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
948
|
+
},
|
|
949
|
+
"online": {
|
|
950
|
+
"gateways": [
|
|
951
|
+
"http://gw.example"
|
|
952
|
+
],
|
|
953
|
+
"answers": {
|
|
954
|
+
"bytes": [
|
|
955
|
+
"witnessed"
|
|
956
|
+
],
|
|
957
|
+
"graphql": [
|
|
958
|
+
{
|
|
959
|
+
"kind": "block",
|
|
960
|
+
"block_height": 1996701,
|
|
961
|
+
"block_time": 1788869407
|
|
962
|
+
}
|
|
963
|
+
]
|
|
964
|
+
},
|
|
965
|
+
"state": "confirmed",
|
|
966
|
+
"onChainVerdict": "confirmed",
|
|
967
|
+
"exit": 0,
|
|
968
|
+
"graphqlRequests": 0,
|
|
969
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
},
|
|
973
|
+
{
|
|
974
|
+
"id": "malformed-time-negative",
|
|
975
|
+
"why": "A malformed cache file, block_time -1. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
976
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a2d312c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
977
|
+
"expect": {
|
|
978
|
+
"offline": {
|
|
979
|
+
"state": "not_checked",
|
|
980
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
981
|
+
},
|
|
982
|
+
"online": {
|
|
983
|
+
"gateways": [
|
|
984
|
+
"http://gw.example"
|
|
985
|
+
],
|
|
986
|
+
"answers": {
|
|
987
|
+
"bytes": [
|
|
988
|
+
"witnessed"
|
|
989
|
+
],
|
|
990
|
+
"graphql": [
|
|
991
|
+
{
|
|
992
|
+
"kind": "block",
|
|
993
|
+
"block_height": 1996701,
|
|
994
|
+
"block_time": 1788869407
|
|
995
|
+
}
|
|
996
|
+
]
|
|
997
|
+
},
|
|
998
|
+
"state": "confirmed",
|
|
999
|
+
"onChainVerdict": "confirmed",
|
|
1000
|
+
"exit": 0,
|
|
1001
|
+
"graphqlRequests": 0,
|
|
1002
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1003
|
+
}
|
|
1004
|
+
}
|
|
1005
|
+
},
|
|
1006
|
+
{
|
|
1007
|
+
"id": "malformed-time-past-9999",
|
|
1008
|
+
"why": "A malformed cache file, block_time one second past 9999-12-31T23:59:59Z. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1009
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a3235333430323330303830302c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
1010
|
+
"expect": {
|
|
1011
|
+
"offline": {
|
|
1012
|
+
"state": "not_checked",
|
|
1013
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1014
|
+
},
|
|
1015
|
+
"online": {
|
|
1016
|
+
"gateways": [
|
|
1017
|
+
"http://gw.example"
|
|
1018
|
+
],
|
|
1019
|
+
"answers": {
|
|
1020
|
+
"bytes": [
|
|
1021
|
+
"witnessed"
|
|
1022
|
+
],
|
|
1023
|
+
"graphql": [
|
|
1024
|
+
{
|
|
1025
|
+
"kind": "block",
|
|
1026
|
+
"block_height": 1996701,
|
|
1027
|
+
"block_time": 1788869407
|
|
1028
|
+
}
|
|
1029
|
+
]
|
|
1030
|
+
},
|
|
1031
|
+
"state": "confirmed",
|
|
1032
|
+
"onChainVerdict": "confirmed",
|
|
1033
|
+
"exit": 0,
|
|
1034
|
+
"graphqlRequests": 0,
|
|
1035
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1036
|
+
}
|
|
1037
|
+
}
|
|
1038
|
+
},
|
|
1039
|
+
{
|
|
1040
|
+
"id": "malformed-time-a-boolean",
|
|
1041
|
+
"why": "A malformed cache file, block_time true. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1042
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a747275652c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
1043
|
+
"expect": {
|
|
1044
|
+
"offline": {
|
|
1045
|
+
"state": "not_checked",
|
|
1046
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1047
|
+
},
|
|
1048
|
+
"online": {
|
|
1049
|
+
"gateways": [
|
|
1050
|
+
"http://gw.example"
|
|
1051
|
+
],
|
|
1052
|
+
"answers": {
|
|
1053
|
+
"bytes": [
|
|
1054
|
+
"witnessed"
|
|
1055
|
+
],
|
|
1056
|
+
"graphql": [
|
|
1057
|
+
{
|
|
1058
|
+
"kind": "block",
|
|
1059
|
+
"block_height": 1996701,
|
|
1060
|
+
"block_time": 1788869407
|
|
1061
|
+
}
|
|
1062
|
+
]
|
|
1063
|
+
},
|
|
1064
|
+
"state": "confirmed",
|
|
1065
|
+
"onChainVerdict": "confirmed",
|
|
1066
|
+
"exit": 0,
|
|
1067
|
+
"graphqlRequests": 0,
|
|
1068
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1069
|
+
}
|
|
1070
|
+
}
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
"id": "malformed-time-missing",
|
|
1074
|
+
"why": "A malformed cache file, no block_time. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1075
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
1076
|
+
"expect": {
|
|
1077
|
+
"offline": {
|
|
1078
|
+
"state": "not_checked",
|
|
1079
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1080
|
+
},
|
|
1081
|
+
"online": {
|
|
1082
|
+
"gateways": [
|
|
1083
|
+
"http://gw.example"
|
|
1084
|
+
],
|
|
1085
|
+
"answers": {
|
|
1086
|
+
"bytes": [
|
|
1087
|
+
"witnessed"
|
|
1088
|
+
],
|
|
1089
|
+
"graphql": [
|
|
1090
|
+
{
|
|
1091
|
+
"kind": "block",
|
|
1092
|
+
"block_height": 1996701,
|
|
1093
|
+
"block_time": 1788869407
|
|
1094
|
+
}
|
|
1095
|
+
]
|
|
1096
|
+
},
|
|
1097
|
+
"state": "confirmed",
|
|
1098
|
+
"onChainVerdict": "confirmed",
|
|
1099
|
+
"exit": 0,
|
|
1100
|
+
"graphqlRequests": 0,
|
|
1101
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1102
|
+
}
|
|
1103
|
+
}
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
"id": "malformed-height-missing",
|
|
1107
|
+
"why": "A malformed cache file, no block_height. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1108
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
1109
|
+
"expect": {
|
|
1110
|
+
"offline": {
|
|
1111
|
+
"state": "not_checked",
|
|
1112
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1113
|
+
},
|
|
1114
|
+
"online": {
|
|
1115
|
+
"gateways": [
|
|
1116
|
+
"http://gw.example"
|
|
1117
|
+
],
|
|
1118
|
+
"answers": {
|
|
1119
|
+
"bytes": [
|
|
1120
|
+
"witnessed"
|
|
1121
|
+
],
|
|
1122
|
+
"graphql": [
|
|
1123
|
+
{
|
|
1124
|
+
"kind": "block",
|
|
1125
|
+
"block_height": 1996701,
|
|
1126
|
+
"block_time": 1788869407
|
|
1127
|
+
}
|
|
1128
|
+
]
|
|
1129
|
+
},
|
|
1130
|
+
"state": "confirmed",
|
|
1131
|
+
"onChainVerdict": "confirmed",
|
|
1132
|
+
"exit": 0,
|
|
1133
|
+
"graphqlRequests": 0,
|
|
1134
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
"id": "malformed-height-unsafe",
|
|
1140
|
+
"why": "A malformed cache file, block_height 2^53. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1141
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a393030373139393235343734303939322c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
1142
|
+
"expect": {
|
|
1143
|
+
"offline": {
|
|
1144
|
+
"state": "not_checked",
|
|
1145
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1146
|
+
},
|
|
1147
|
+
"online": {
|
|
1148
|
+
"gateways": [
|
|
1149
|
+
"http://gw.example"
|
|
1150
|
+
],
|
|
1151
|
+
"answers": {
|
|
1152
|
+
"bytes": [
|
|
1153
|
+
"witnessed"
|
|
1154
|
+
],
|
|
1155
|
+
"graphql": [
|
|
1156
|
+
{
|
|
1157
|
+
"kind": "block",
|
|
1158
|
+
"block_height": 1996701,
|
|
1159
|
+
"block_time": 1788869407
|
|
1160
|
+
}
|
|
1161
|
+
]
|
|
1162
|
+
},
|
|
1163
|
+
"state": "confirmed",
|
|
1164
|
+
"onChainVerdict": "confirmed",
|
|
1165
|
+
"exit": 0,
|
|
1166
|
+
"graphqlRequests": 0,
|
|
1167
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1168
|
+
}
|
|
1169
|
+
}
|
|
1170
|
+
},
|
|
1171
|
+
{
|
|
1172
|
+
"id": "malformed-ref-uppercase",
|
|
1173
|
+
"why": "A malformed cache file, stamp_ref in uppercase hex. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1174
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2246373441463436434633353137354445433543323739433833383032433832444633304638423737323336324637353945454143323037313036423243443943227d5d7d",
|
|
1175
|
+
"expect": {
|
|
1176
|
+
"offline": {
|
|
1177
|
+
"state": "not_checked",
|
|
1178
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1179
|
+
},
|
|
1180
|
+
"online": {
|
|
1181
|
+
"gateways": [
|
|
1182
|
+
"http://gw.example"
|
|
1183
|
+
],
|
|
1184
|
+
"answers": {
|
|
1185
|
+
"bytes": [
|
|
1186
|
+
"witnessed"
|
|
1187
|
+
],
|
|
1188
|
+
"graphql": [
|
|
1189
|
+
{
|
|
1190
|
+
"kind": "block",
|
|
1191
|
+
"block_height": 1996701,
|
|
1192
|
+
"block_time": 1788869407
|
|
1193
|
+
}
|
|
1194
|
+
]
|
|
1195
|
+
},
|
|
1196
|
+
"state": "confirmed",
|
|
1197
|
+
"onChainVerdict": "confirmed",
|
|
1198
|
+
"exit": 0,
|
|
1199
|
+
"graphqlRequests": 0,
|
|
1200
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1201
|
+
}
|
|
1202
|
+
}
|
|
1203
|
+
},
|
|
1204
|
+
{
|
|
1205
|
+
"id": "malformed-ref-names-no-stamp",
|
|
1206
|
+
"why": "A malformed cache file, stamp_ref of no stamp in the body. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1207
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2265656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565656565227d5d7d",
|
|
1208
|
+
"expect": {
|
|
1209
|
+
"offline": {
|
|
1210
|
+
"state": "not_checked",
|
|
1211
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1212
|
+
},
|
|
1213
|
+
"online": {
|
|
1214
|
+
"gateways": [
|
|
1215
|
+
"http://gw.example"
|
|
1216
|
+
],
|
|
1217
|
+
"answers": {
|
|
1218
|
+
"bytes": [
|
|
1219
|
+
"witnessed"
|
|
1220
|
+
],
|
|
1221
|
+
"graphql": [
|
|
1222
|
+
{
|
|
1223
|
+
"kind": "block",
|
|
1224
|
+
"block_height": 1996701,
|
|
1225
|
+
"block_time": 1788869407
|
|
1226
|
+
}
|
|
1227
|
+
]
|
|
1228
|
+
},
|
|
1229
|
+
"state": "confirmed",
|
|
1230
|
+
"onChainVerdict": "confirmed",
|
|
1231
|
+
"exit": 0,
|
|
1232
|
+
"graphqlRequests": 0,
|
|
1233
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1234
|
+
}
|
|
1235
|
+
}
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
"id": "malformed-ref-named-twice",
|
|
1239
|
+
"why": "A malformed cache file, two entries for the one stamp, the same values in both. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1240
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d2c7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
1241
|
+
"expect": {
|
|
1242
|
+
"offline": {
|
|
1243
|
+
"state": "not_checked",
|
|
1244
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1245
|
+
},
|
|
1246
|
+
"online": {
|
|
1247
|
+
"gateways": [
|
|
1248
|
+
"http://gw.example"
|
|
1249
|
+
],
|
|
1250
|
+
"answers": {
|
|
1251
|
+
"bytes": [
|
|
1252
|
+
"witnessed"
|
|
1253
|
+
],
|
|
1254
|
+
"graphql": [
|
|
1255
|
+
{
|
|
1256
|
+
"kind": "block",
|
|
1257
|
+
"block_height": 1996701,
|
|
1258
|
+
"block_time": 1788869407
|
|
1259
|
+
}
|
|
1260
|
+
]
|
|
1261
|
+
},
|
|
1262
|
+
"state": "confirmed",
|
|
1263
|
+
"onChainVerdict": "confirmed",
|
|
1264
|
+
"exit": 0,
|
|
1265
|
+
"graphqlRequests": 0,
|
|
1266
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
"id": "malformed-ref-named-twice-one-malformed",
|
|
1272
|
+
"why": "A malformed cache file, two entries for the one stamp, one of them malformed. It reads as no cache: nothing is printed for it, no time is asked for, and nothing moves.",
|
|
1273
|
+
"cacheFileHex": "7b2263616368655f76657273696f6e223a2273616e6e696e672e7769746e6573732d63616368652f7631222c227769746e6573736564223a5b7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a313738383836393430372c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d2c7b22626c6f636b5f686569676874223a313939363730312c22626c6f636b5f74696d65223a22736f6f6e222c227374616d705f726566223a2266373461663436636633353137356465633563323739633833383032633832646633306638623737323336326637353965656163323037313036623263643963227d5d7d",
|
|
1274
|
+
"expect": {
|
|
1275
|
+
"offline": {
|
|
1276
|
+
"state": "not_checked",
|
|
1277
|
+
"rendered": "Witness: Not checked: no lookup was run"
|
|
1278
|
+
},
|
|
1279
|
+
"online": {
|
|
1280
|
+
"gateways": [
|
|
1281
|
+
"http://gw.example"
|
|
1282
|
+
],
|
|
1283
|
+
"answers": {
|
|
1284
|
+
"bytes": [
|
|
1285
|
+
"witnessed"
|
|
1286
|
+
],
|
|
1287
|
+
"graphql": [
|
|
1288
|
+
{
|
|
1289
|
+
"kind": "block",
|
|
1290
|
+
"block_height": 1996701,
|
|
1291
|
+
"block_time": 1788869407
|
|
1292
|
+
}
|
|
1293
|
+
]
|
|
1294
|
+
},
|
|
1295
|
+
"state": "confirmed",
|
|
1296
|
+
"onChainVerdict": "confirmed",
|
|
1297
|
+
"exit": 0,
|
|
1298
|
+
"graphqlRequests": 0,
|
|
1299
|
+
"rendered": "Witness: Confirmed on the public record (answered: http://gw.example)"
|
|
1300
|
+
}
|
|
1301
|
+
}
|
|
1302
|
+
}
|
|
1303
|
+
]
|
|
1304
|
+
}
|