You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
dateKeys-dart/test/vectors/release_archive_texts.json

90 lines
9.9 KiB

Specification 0.15: the release object, a release in hand and step 9.c specVersion is 0.15 and testdata is synced with datekeys-go at 3c3e737 (branch v0.15): every file changes its spec field, mutations.json gains the field source and four cases, and vectors/release.json and releases/ are new (142 files). release.dart, as provider of Go at 2eeca40, with its texts: encodeRelease and decodeRelease of the release object (spec v0.15, 47.1) with the CBOR profile of the library, its size first, then its type and version, then its schema; parseRelease, which also reads drand's JSON with the rules of encoding/json of Go for its three fields; verifyRelease checks the chain hash a release names, ERR_PROFILE_MISMATCH, before its round and its signature; ReleaseSupplier, EncodedRelease and supplyRelease, a release in the caller's hand; and ReleaseArchive, the lookup of a local release archive (50), whose failures are ERR_RELEASE_UNAVAILABLE at step 9. open: OpenOptions.release takes a release in hand, exclusive with source. It is not compared with the clock (step 9.c); Opened.clockBehind reports a clock behind it, and the step 9 detail is Go's. Step 10 starts with the layers of the object. A network source keeps its behaviour. Opened.release carries the chain hash of the pinned profile. Vectors: mutation_texts.json is regenerated with tool/mutation_go_texts.go, which now replays each case with its source as testkit does: 149 cases change only the detail of step 9 ("release supplied by the caller"), the case "round not reached yet" now opens, and the four new cases are added. release_vectors.json, the open vectors, and the formats, locator, security and seal vectors come out the same at 3c3e737 but for their spec field. tool/release_archive_go_texts.go writes the texts of provider.Archive on edited archives; tool/release_copy.dart copies release.json, releases/ and those texts to release.g.dart for the tests compiled to JavaScript. errors_spec_test reads the spec at the commit of testdata/SOURCE.json rather than at its tag. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2 days ago
{
"cases": [
{
"name": "round 999",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 999,
"text": "provider: release archive: round 999 is not in the archive, which holds 5 rounds from 1000: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "round 1002",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 1002,
"text": "provider: release archive: round 1002 is missing: its entry is zeros: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "round 1005",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 1005,
"text": "provider: release archive: round 1005 is not in the archive, which holds 5 rounds from 1000: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "another chain",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e970031903e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 1000,
"text": "provider: release archive: archive of chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e970, the pinned profile datekeys:quicknet:v1 is chain 52db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "a byte missing",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864",
"round": 1000,
"text": "provider: release archive: 310 bytes, its header announces 5 rounds of 48 bytes: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "a byte more",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa00",
"round": 1000,
"text": "provider: release archive: 312 bytes, its header announces 5 rounds of 48 bytes: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "empty",
"bytes": "",
"round": 1000,
"text": "provider: release archive: not an archive of version 1: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "a release object",
"bytes": "a50070646174656b6579732d72656c65617365010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e8045830b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39",
"round": 1000,
"text": "provider: release archive: not an archive of version 1: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "header version 2",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010202582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 1000,
"text": "provider: release archive: not an archive of version 1: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "count 0",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80400b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 1000,
"text": "provider: release archive: round 1000 is not in the archive, which holds 0 rounds from 1000: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "first round in four bytes",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031a000003e80405b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 1000,
"text": "provider: release archive: its header does not decode: key 3: codec: offset 66: 1000 is not in its shortest form (initial byte 0x1a): ERR_NON_CANONICAL_CBOR: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "four keys",
"bytes": "a4007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa",
"round": 1000,
"text": "provider: release archive: its header does not decode: 4 keys, want all 5: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "only the header",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80405",
"round": 1000,
"text": "provider: release archive: 71 bytes, its header announces 5 rounds of 48 bytes: ERR_RELEASE_UNAVAILABLE"
},
{
"name": "count 6 and 6 entries",
"bytes": "a5007818646174656b6579732d72656c656173652d61726368697665010102582052db9ba70e0cc0f6eaf7803dd07447a1f5477735fd3f661792ba94600c84e971031903e80406b44679b9a59af2ec876b1a6b1ad52ea9b1615fc3982b19576350f93447cb1125e342b73a8dd2bacbe47e4b6b63ed5e39b33bf3667cbd5a82de3a24b4e0e9fe5513cc1a0e840368c6e31f5fcfa79bea03f73896b25883abf2853d10337fb8fa41000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000a40658b820c0f8c10207524179a2031ba9537688a0d04e4851b58026be9a341fee3b96fb48ffad28483d84b40a5864aa000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
"round": 1005,
"text": "provider: release archive: round 1005 is missing: its entry is zeros: ERR_RELEASE_UNAVAILABLE"
}
],
"generator": "tool/release_archive_go_texts.go"
}

Powered by TurnKey Linux.