diff --git a/cmd/proofgen/main.go b/cmd/proofgen/main.go index 50145c4..44f9fdb 100644 --- a/cmd/proofgen/main.go +++ b/cmd/proofgen/main.go @@ -90,6 +90,74 @@ var ( }}, } + subtreeConsistencyProofs = []struct { + start uint64 + end uint64 + size uint64 + proof [][]byte + root1 []byte + root2 []byte + }{ + // start = zero: + {0, 1, 1, nil, roots[0], roots[0]}, + {0, 1, 8, [][]byte{ + dh("96a296d224f285c67bee93c30f8a309157f0daa35dc5b87e410b78630a09cfc7", 32), + dh("5f083f0a1a33ca076a95279832580db3e0ef4584bdff1f54c8a360f50de3031e", 32), + dh("6b47aaf29ee3c2af9af889bc1fb9254dabd31177f16232dd6aab035ca39bf6e4", 32), + }, roots[0], roots[7]}, + {0, 6, 8, [][]byte{ + dh("0ebc5d3437fbe2db158b9f126a1d118e308181031d0a949f8dededebc558ef6a", 32), + dh("ca854ea128ed050b41b35ffc1b87b8eb2bde461e9e3b5596ece6b9d5975a0ae0", 32), + dh("d37ee418976dd95753c1c73862b9398fa2a2cf9b4ff0fdfe8b30cd95209614b7", 32), + }, roots[5], roots[7]}, + {0, 2, 5, [][]byte{ + dh("5f083f0a1a33ca076a95279832580db3e0ef4584bdff1f54c8a360f50de3031e", 32), + dh("bc1a0643b12e4d2d7c77918f44e0f4f79a838b6cf9ec5b5c283e1f4d88599e6b", 32), + }, roots[1], roots[4]}, + {0, 6, 7, [][]byte{ + dh("0ebc5d3437fbe2db158b9f126a1d118e308181031d0a949f8dededebc558ef6a", 32), + dh("b08693ec2e721597130641e8211e7eedccb4c26413963eee6c1e2ed16ffb1a5f", 32), + dh("d37ee418976dd95753c1c73862b9398fa2a2cf9b4ff0fdfe8b30cd95209614b7", 32), + }, roots[5], roots[6]}, + // start > 0: + // end = size and single entry: + {7, 8, 8, [][]byte{ + dh("b08693ec2e721597130641e8211e7eedccb4c26413963eee6c1e2ed16ffb1a5f", 32), + dh("0ebc5d3437fbe2db158b9f126a1d118e308181031d0a949f8dededebc558ef6a", 32), + roots[3], + }, dh("46f6ffadd3d06a09ff3c5860d2755c8b9819db7df44251788c7d8e3180de8eb1", 32), roots[7]}, + // end = size and perfect: + {4, 8, 8, [][]byte{ + roots[3], // left sibling [0, 4) + }, dh("6b47aaf29ee3c2af9af889bc1fb9254dabd31177f16232dd6aab035ca39bf6e4", 32), roots[7]}, + {6, 8, 8, [][]byte{ + dh("0ebc5d3437fbe2db158b9f126a1d118e308181031d0a949f8dededebc558ef6a", 32), + roots[3], + }, dh("ca854ea128ed050b41b35ffc1b87b8eb2bde461e9e3b5596ece6b9d5975a0ae0", 32), roots[7]}, + // end = size and not perfect: + {4, 7, 7, [][]byte{ + roots[3], + }, dh("837dbb152e9b079010717e84e865da4ebc0fa198a806d59d31bf15accef22d0e", 32), roots[6]}, + // end < size and single entry: + {4, 5, 8, [][]byte{ + dh("4271a26be0d8a84f0bd54c8c302e7cb3a3b5d1fa6780a40bcce2873477dab658", 32), + dh("ca854ea128ed050b41b35ffc1b87b8eb2bde461e9e3b5596ece6b9d5975a0ae0", 32), + roots[3], + }, dh("bc1a0643b12e4d2d7c77918f44e0f4f79a838b6cf9ec5b5c283e1f4d88599e6b", 32), roots[7]}, + // end < size and perfect: + {2, 4, 8, [][]byte{ + dh("fac54203e7cc696cf0dfcb42c92a1d9dbaf70ad9e621f4bd8d98662f00e3c125", 32), + dh("6b47aaf29ee3c2af9af889bc1fb9254dabd31177f16232dd6aab035ca39bf6e4", 32), + }, dh("5f083f0a1a33ca076a95279832580db3e0ef4584bdff1f54c8a360f50de3031e", 32), roots[7]}, + // end < size and not perfect: + {4, 7, 8, [][]byte{ + dh("b08693ec2e721597130641e8211e7eedccb4c26413963eee6c1e2ed16ffb1a5f", 32), + dh("46f6ffadd3d06a09ff3c5860d2755c8b9819db7df44251788c7d8e3180de8eb1", 32), + dh("0ebc5d3437fbe2db158b9f126a1d118e308181031d0a949f8dededebc558ef6a", 32), + roots[3], + }, dh("837dbb152e9b079010717e84e865da4ebc0fa198a806d59d31bf15accef22d0e", 32), roots[7]}, + } + roots = [][]byte{ dh("6e340b9cffb37a989ca544e6bb780a2c78901d3fb33738768511a30617afa01d", 32), dh("fac54203e7cc696cf0dfcb42c92a1d9dbaf70ad9e621f4bd8d98662f00e3c125", 32), @@ -671,14 +739,14 @@ type subtreeConsistencyProbe struct { } func subtreeConsistencyProbes(rootDir string) error { - for i, p := range consistencyProofs { + for i, p := range subtreeConsistencyProofs { dir := filepath.Join(rootDir, strconv.Itoa(i)) if err := os.MkdirAll(dir, 0755); err != nil { return err } - if err := corruptedSubtreeConsistencyProbes(dir, p.size1, p.size2, p.proof, - roots[p.size1-1], roots[p.size2-1]); err != nil { + if err := corruptedSubtreeConsistencyProbes(dir, p.start, p.end, p.size, p.proof, + p.root1, p.root2); err != nil { return fmt.Errorf("write subtree consistency test data: %s", err) } } @@ -695,8 +763,8 @@ func subtreeConsistencyProbes(rootDir string) error { return nil } -func corruptedSubtreeConsistencyProbes(dir string, size1, size2 uint64, proof [][]byte, root1, root2 []byte) error { - happyPath := subtreeConsistencyProbe{0, size1, size2, root1, root2, proof, "happy path", false} +func corruptedSubtreeConsistencyProbes(dir string, start, end, size uint64, proof [][]byte, root1, root2 []byte) error { + happyPath := subtreeConsistencyProbe{start, end, size, root1, root2, proof, "happy path", false} if err := writeSubtreeConsistencyProbe(dir, happyPath); err != nil { return err } @@ -705,7 +773,7 @@ func corruptedSubtreeConsistencyProbes(dir string, size1, size2 uint64, proof [] return nil } - probes := invalidSubtreeConsistencyProof(size1, size2, root1, root2, proof) + probes := invalidSubtreeConsistencyProof(start, end, size, root1, root2, proof) for _, p := range probes { if err := writeSubtreeConsistencyProbe(dir, p); err != nil { return err @@ -715,36 +783,40 @@ func corruptedSubtreeConsistencyProbes(dir string, size1, size2 uint64, proof [] return nil } -func invalidSubtreeConsistencyProof(end, size uint64, root1, root2 []byte, proof [][]byte) []subtreeConsistencyProbe { +func invalidSubtreeConsistencyProof(start, end, size uint64, root1, root2 []byte, proof [][]byte) []subtreeConsistencyProbe { ln := len(proof) ret := []subtreeConsistencyProbe{ - // Wrong end (size1). - {0, end - 1, size, root1, root2, proof, "size1 sub @1", true}, - {0, end + 1, size, root1, root2, proof, "size1 plus @1", true}, - {0, end ^ 2, size, root1, root2, proof, "size1 XOR @2", true}, - // Wrong tree size (size2). - {0, end, size * 2, root1, root2, proof, "size2 mul @2", true}, - {0, end, size / 2, root1, root2, proof, "size2 div @2", true}, + // Wrong start. + {start - 1, end, size, root1, root2, proof, "start sub @1", true}, + {start + 1, end, size, root1, root2, proof, "start plus @1", true}, + {start ^ 2, end, size, root1, root2, proof, "start XOR @2", true}, + // Wrong end. + {start, end - 1, size, root1, root2, proof, "end sub @1", true}, + {start, end + 1, size, root1, root2, proof, "end plus @1", true}, + {start, end ^ 2, size, root1, root2, proof, "end XOR @2", true}, + // Wrong tree size. + {start, end, size * 2, root1, root2, proof, "size mul @2", true}, + {start, end, size / 2, root1, root2, proof, "size div @2", true}, // Wrong root. - {0, end, size, []byte("WrongRoot"), root2, proof, "wrong root1", true}, - {0, end, size, root1, []byte("WrongRoot"), proof, "wrong root2", true}, - {0, end, size, root2, root1, proof, "swapped roots", true}, + {start, end, size, []byte("WrongRoot"), root2, proof, "wrong root1", true}, + {start, end, size, root1, []byte("WrongRoot"), proof, "wrong root2", true}, + {start, end, size, root2, root1, proof, "swapped roots", true}, // Empty proof. - {0, end, size, root1, root2, [][]byte{}, "empty proof", true}, + {start, end, size, root1, root2, [][]byte{}, "empty proof", true}, // Add garbage at the end. - {0, end, size, root1, root2, extend(proof, []byte{}), "trailing garbage", true}, - {0, end, size, root1, root2, extend(proof, root1), "trailing root1", true}, - {0, end, size, root1, root2, extend(proof, root2), "trailing root2", true}, + {start, end, size, root1, root2, extend(proof, []byte{}), "trailing garbage", true}, + {start, end, size, root1, root2, extend(proof, root1), "trailing root1", true}, + {start, end, size, root1, root2, extend(proof, root2), "trailing root2", true}, // Add garbage at the front. - {0, end, size, root1, root2, prepend(proof, []byte{}), "preceding garbage", true}, - {0, end, size, root1, root2, prepend(proof, root1), "preceding root1", true}, - {0, end, size, root1, root2, prepend(proof, root2), "preceding root2", true}, - {0, end, size, root1, root2, prepend(proof, proof[0]), "preceding proof @0", true}, + {start, end, size, root1, root2, prepend(proof, []byte{}), "preceding garbage", true}, + {start, end, size, root1, root2, prepend(proof, root1), "preceding root1", true}, + {start, end, size, root1, root2, prepend(proof, root2), "preceding root2", true}, + {start, end, size, root1, root2, prepend(proof, proof[0]), "preceding proof @0", true}, } // Remove a node from the end. if ln > 0 { - ret = append(ret, subtreeConsistencyProbe{0, end, size, root1, root2, proof[:ln-1], "truncated proof", true}) + ret = append(ret, subtreeConsistencyProbe{start, end, size, root1, root2, proof[:ln-1], "truncated proof", true}) } // Modify single bit in an element of the proof. @@ -753,7 +825,7 @@ func invalidSubtreeConsistencyProof(end, size uint64, root1, root2 []byte, proof wrongProof[i] = append([]byte(nil), wrongProof[i]...) // But also the modified data. wrongProof[i][0] ^= 16 // Flip the bit. desc := fmt.Sprintf("modified proof@%d bit @4", i) - ret = append(ret, subtreeConsistencyProbe{0, end, size, root1, root2, wrongProof, desc, true}) + ret = append(ret, subtreeConsistencyProbe{start, end, size, root1, root2, wrongProof, desc, true}) } return ret @@ -768,7 +840,7 @@ func staticSubtreeConsistencyProbes(dir string) error { for _, p := range []subtreeConsistencyProbe{ {0, 0, 0, root1, root2, proof1, "sizes are equal (zero) but roots are not", true}, {0, 1, 1, root1, root2, proof1, "sizes are equal (one) but roots are not", true}, - {0, 0, 1, root1, root2, proof1, "size1 is zero and does not equal size2", true}, + {0, 0, 1, root1, root2, proof1, "end is zero and does not equal size", true}, // Sizes that are always consistent. {0, 1, 1, root2, root2, proof1, "sizes are equal (one) and proof is empty", false}, // Empty subtree @@ -785,13 +857,14 @@ func staticSubtreeConsistencyProbes(dir string) error { {1, 1, 2, sha256EmptyTreeHash, sha256EmptyTreeHash, proof2, "subtree is empty roots valid but proof is not empty", true}, {1, 1, 2, root1, root1, proof1, "subtree is empty roots match but not valid", true}, // Invalid subtree boundaries (not a multiple of power of 2 >= end - start). + // Invalid subtree boundaries (not a multiple of power of 2 >= end - start): {1, 15, 15, root1, root2, proof1, "invalid subtree start 1 end 15 size 15", true}, {1, 3, 8, root1, root2, proof1, "invalid subtree start 1 end 3 size 8", true}, {2, 5, 8, root1, root2, proof1, "invalid subtree start 2 end 5 size 8", true}, {2, 6, 8, root1, root2, proof1, "invalid subtree start 2 end 6 size 8", true}, // Time travel to the past. - {0, 1, 0, root1, root2, proof1, "size1 is greater than size2", true}, - {0, 2, 1, root1, root2, proof1, "size1 is greater than size2 again", true}, + {0, 1, 0, root1, root2, proof1, "end is greater than size", true}, + {0, 2, 1, root1, root2, proof1, "end is greater than size again", true}, // Empty proof. {0, 1, 2, root1, root2, proof1, "sizes do not match and proof is empty", true}, // Roots don't match. diff --git a/testdata/subtreeconsistency/1/size1-XOR-@2.json b/testdata/subtreeconsistency/1/end-XOR-@2.json similarity index 93% rename from testdata/subtreeconsistency/1/size1-XOR-@2.json rename to testdata/subtreeconsistency/1/end-XOR-@2.json index 732842c..4e361e2 100644 --- a/testdata/subtreeconsistency/1/size1-XOR-@2.json +++ b/testdata/subtreeconsistency/1/end-XOR-@2.json @@ -9,6 +9,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" ], - "desc": "size1 XOR @2", + "desc": "end XOR @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/size1-plus-@1.json b/testdata/subtreeconsistency/1/end-plus-@1.json similarity index 92% rename from testdata/subtreeconsistency/1/size1-plus-@1.json rename to testdata/subtreeconsistency/1/end-plus-@1.json index 909de23..89ab970 100644 --- a/testdata/subtreeconsistency/1/size1-plus-@1.json +++ b/testdata/subtreeconsistency/1/end-plus-@1.json @@ -9,6 +9,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" ], - "desc": "size1 plus @1", + "desc": "end plus @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/size1-sub-@1.json b/testdata/subtreeconsistency/1/end-sub-@1.json similarity index 93% rename from testdata/subtreeconsistency/1/size1-sub-@1.json rename to testdata/subtreeconsistency/1/end-sub-@1.json index 1877f8a..6c73de1 100644 --- a/testdata/subtreeconsistency/1/size1-sub-@1.json +++ b/testdata/subtreeconsistency/1/end-sub-@1.json @@ -9,6 +9,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" ], - "desc": "size1 sub @1", + "desc": "end sub @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/invalid-subtree.json b/testdata/subtreeconsistency/1/invalid-subtree.json deleted file mode 100644 index f1d5b49..0000000 --- a/testdata/subtreeconsistency/1/invalid-subtree.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "start": 1, - "end": 15, - "size": 15, - "root1": "bjQLnP+zepicpUTmu3gKLHiQHT+zNzh2hRGjBhevoB0=", - "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", - "proof": [ - "lqKW0iTyhcZ77pPDD4owkVfw2qNdxbh+QQt4YwoJz8c=", - "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", - "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" - ], - "desc": "invalid subtree", - "wantErr": true -} \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/size2-div-@2.json b/testdata/subtreeconsistency/1/size-div-@2.json similarity index 93% rename from testdata/subtreeconsistency/1/size2-div-@2.json rename to testdata/subtreeconsistency/1/size-div-@2.json index d9f39c5..10cb874 100644 --- a/testdata/subtreeconsistency/1/size2-div-@2.json +++ b/testdata/subtreeconsistency/1/size-div-@2.json @@ -9,6 +9,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" ], - "desc": "size2 div @2", + "desc": "size div @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/size2-mul-@2.json b/testdata/subtreeconsistency/1/size-mul-@2.json similarity index 93% rename from testdata/subtreeconsistency/1/size2-mul-@2.json rename to testdata/subtreeconsistency/1/size-mul-@2.json index 0278b83..823820c 100644 --- a/testdata/subtreeconsistency/1/size2-mul-@2.json +++ b/testdata/subtreeconsistency/1/size-mul-@2.json @@ -9,6 +9,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" ], - "desc": "size2 mul @2", + "desc": "size mul @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/start-XOR-@2.json b/testdata/subtreeconsistency/1/start-XOR-@2.json new file mode 100644 index 0000000..a265538 --- /dev/null +++ b/testdata/subtreeconsistency/1/start-XOR-@2.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 1, + "size": 8, + "root1": "bjQLnP+zepicpUTmu3gKLHiQHT+zNzh2hRGjBhevoB0=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "lqKW0iTyhcZ77pPDD4owkVfw2qNdxbh+QQt4YwoJz8c=", + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/start-plus-@1.json b/testdata/subtreeconsistency/1/start-plus-@1.json new file mode 100644 index 0000000..69f3022 --- /dev/null +++ b/testdata/subtreeconsistency/1/start-plus-@1.json @@ -0,0 +1,14 @@ +{ + "start": 1, + "end": 1, + "size": 8, + "root1": "bjQLnP+zepicpUTmu3gKLHiQHT+zNzh2hRGjBhevoB0=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "lqKW0iTyhcZ77pPDD4owkVfw2qNdxbh+QQt4YwoJz8c=", + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/1/start-sub-@1.json b/testdata/subtreeconsistency/1/start-sub-@1.json new file mode 100644 index 0000000..c4cdea6 --- /dev/null +++ b/testdata/subtreeconsistency/1/start-sub-@1.json @@ -0,0 +1,14 @@ +{ + "start": 18446744073709551615, + "end": 1, + "size": 8, + "root1": "bjQLnP+zepicpUTmu3gKLHiQHT+zNzh2hRGjBhevoB0=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "lqKW0iTyhcZ77pPDD4owkVfw2qNdxbh+QQt4YwoJz8c=", + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/empty-proof.json b/testdata/subtreeconsistency/10/empty-proof.json new file mode 100644 index 0000000..4bcf836 --- /dev/null +++ b/testdata/subtreeconsistency/10/empty-proof.json @@ -0,0 +1,10 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [], + "desc": "empty proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/end-XOR-@2.json b/testdata/subtreeconsistency/10/end-XOR-@2.json new file mode 100644 index 0000000..b5da066 --- /dev/null +++ b/testdata/subtreeconsistency/10/end-XOR-@2.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 6, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "end XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/end-plus-@1.json b/testdata/subtreeconsistency/10/end-plus-@1.json new file mode 100644 index 0000000..c9979bb --- /dev/null +++ b/testdata/subtreeconsistency/10/end-plus-@1.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 5, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "end plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/end-sub-@1.json b/testdata/subtreeconsistency/10/end-sub-@1.json new file mode 100644 index 0000000..db60ec9 --- /dev/null +++ b/testdata/subtreeconsistency/10/end-sub-@1.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 3, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "end sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/happy-path.json b/testdata/subtreeconsistency/10/happy-path.json new file mode 100644 index 0000000..577eedc --- /dev/null +++ b/testdata/subtreeconsistency/10/happy-path.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "happy path", + "wantErr": false +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/modified-proof@0-bit-@4.json b/testdata/subtreeconsistency/10/modified-proof@0-bit-@4.json new file mode 100644 index 0000000..87718b1 --- /dev/null +++ b/testdata/subtreeconsistency/10/modified-proof@0-bit-@4.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "6sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "modified proof@0 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/modified-proof@1-bit-@4.json b/testdata/subtreeconsistency/10/modified-proof@1-bit-@4.json new file mode 100644 index 0000000..25f5cb4 --- /dev/null +++ b/testdata/subtreeconsistency/10/modified-proof@1-bit-@4.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "e0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "modified proof@1 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/preceding-garbage.json b/testdata/subtreeconsistency/10/preceding-garbage.json new file mode 100644 index 0000000..5ab4267 --- /dev/null +++ b/testdata/subtreeconsistency/10/preceding-garbage.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "", + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "preceding garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/preceding-proof-@0.json b/testdata/subtreeconsistency/10/preceding-proof-@0.json new file mode 100644 index 0000000..bcc729f --- /dev/null +++ b/testdata/subtreeconsistency/10/preceding-proof-@0.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "preceding proof @0", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/preceding-root1.json b/testdata/subtreeconsistency/10/preceding-root1.json new file mode 100644 index 0000000..e6196f4 --- /dev/null +++ b/testdata/subtreeconsistency/10/preceding-root1.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "preceding root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/preceding-root2.json b/testdata/subtreeconsistency/10/preceding-root2.json new file mode 100644 index 0000000..6457e73 --- /dev/null +++ b/testdata/subtreeconsistency/10/preceding-root2.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "preceding root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/size-div-@2.json b/testdata/subtreeconsistency/10/size-div-@2.json new file mode 100644 index 0000000..84ccd8d --- /dev/null +++ b/testdata/subtreeconsistency/10/size-div-@2.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 4, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "size div @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/size-mul-@2.json b/testdata/subtreeconsistency/10/size-mul-@2.json new file mode 100644 index 0000000..f7b5976 --- /dev/null +++ b/testdata/subtreeconsistency/10/size-mul-@2.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 16, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "size mul @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/start-XOR-@2.json b/testdata/subtreeconsistency/10/start-XOR-@2.json new file mode 100644 index 0000000..9ca3fdb --- /dev/null +++ b/testdata/subtreeconsistency/10/start-XOR-@2.json @@ -0,0 +1,13 @@ +{ + "start": 0, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/start-plus-@1.json b/testdata/subtreeconsistency/10/start-plus-@1.json new file mode 100644 index 0000000..e609499 --- /dev/null +++ b/testdata/subtreeconsistency/10/start-plus-@1.json @@ -0,0 +1,13 @@ +{ + "start": 3, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/start-sub-@1.json b/testdata/subtreeconsistency/10/start-sub-@1.json new file mode 100644 index 0000000..ac50f28 --- /dev/null +++ b/testdata/subtreeconsistency/10/start-sub-@1.json @@ -0,0 +1,13 @@ +{ + "start": 1, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/swapped-roots.json b/testdata/subtreeconsistency/10/swapped-roots.json new file mode 100644 index 0000000..2a451a6 --- /dev/null +++ b/testdata/subtreeconsistency/10/swapped-roots.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "root2": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "swapped roots", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/trailing-garbage.json b/testdata/subtreeconsistency/10/trailing-garbage.json new file mode 100644 index 0000000..c34fa08 --- /dev/null +++ b/testdata/subtreeconsistency/10/trailing-garbage.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "" + ], + "desc": "trailing garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/trailing-root1.json b/testdata/subtreeconsistency/10/trailing-root1.json new file mode 100644 index 0000000..842e4f9 --- /dev/null +++ b/testdata/subtreeconsistency/10/trailing-root1.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=" + ], + "desc": "trailing root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/trailing-root2.json b/testdata/subtreeconsistency/10/trailing-root2.json new file mode 100644 index 0000000..fa35dfe --- /dev/null +++ b/testdata/subtreeconsistency/10/trailing-root2.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=" + ], + "desc": "trailing root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/truncated-proof.json b/testdata/subtreeconsistency/10/truncated-proof.json new file mode 100644 index 0000000..fce9356 --- /dev/null +++ b/testdata/subtreeconsistency/10/truncated-proof.json @@ -0,0 +1,12 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=" + ], + "desc": "truncated proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/wrong-root1.json b/testdata/subtreeconsistency/10/wrong-root1.json new file mode 100644 index 0000000..a9c6873 --- /dev/null +++ b/testdata/subtreeconsistency/10/wrong-root1.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "V3JvbmdSb290", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "wrong root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/10/wrong-root2.json b/testdata/subtreeconsistency/10/wrong-root2.json new file mode 100644 index 0000000..3008b67 --- /dev/null +++ b/testdata/subtreeconsistency/10/wrong-root2.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 4, + "size": 8, + "root1": "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "root2": "V3JvbmdSb290", + "proof": [ + "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "wrong root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/empty-proof.json b/testdata/subtreeconsistency/11/empty-proof.json new file mode 100644 index 0000000..3be01e1 --- /dev/null +++ b/testdata/subtreeconsistency/11/empty-proof.json @@ -0,0 +1,10 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [], + "desc": "empty proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/end-XOR-@2.json b/testdata/subtreeconsistency/11/end-XOR-@2.json new file mode 100644 index 0000000..03cba48 --- /dev/null +++ b/testdata/subtreeconsistency/11/end-XOR-@2.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/end-plus-@1.json b/testdata/subtreeconsistency/11/end-plus-@1.json new file mode 100644 index 0000000..2b7a339 --- /dev/null +++ b/testdata/subtreeconsistency/11/end-plus-@1.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/end-sub-@1.json b/testdata/subtreeconsistency/11/end-sub-@1.json new file mode 100644 index 0000000..de0acb7 --- /dev/null +++ b/testdata/subtreeconsistency/11/end-sub-@1.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 6, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/happy-path.json b/testdata/subtreeconsistency/11/happy-path.json new file mode 100644 index 0000000..8053b71 --- /dev/null +++ b/testdata/subtreeconsistency/11/happy-path.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "happy path", + "wantErr": false +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/modified-proof@0-bit-@4.json b/testdata/subtreeconsistency/11/modified-proof@0-bit-@4.json new file mode 100644 index 0000000..bf1a5de --- /dev/null +++ b/testdata/subtreeconsistency/11/modified-proof@0-bit-@4.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "oIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@0 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/modified-proof@1-bit-@4.json b/testdata/subtreeconsistency/11/modified-proof@1-bit-@4.json new file mode 100644 index 0000000..401284c --- /dev/null +++ b/testdata/subtreeconsistency/11/modified-proof@1-bit-@4.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Vvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@1 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/modified-proof@2-bit-@4.json b/testdata/subtreeconsistency/11/modified-proof@2-bit-@4.json new file mode 100644 index 0000000..dec46ca --- /dev/null +++ b/testdata/subtreeconsistency/11/modified-proof@2-bit-@4.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "HrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@2 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/modified-proof@3-bit-@4.json b/testdata/subtreeconsistency/11/modified-proof@3-bit-@4.json new file mode 100644 index 0000000..31d4aa1 --- /dev/null +++ b/testdata/subtreeconsistency/11/modified-proof@3-bit-@4.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "w37kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@3 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/preceding-garbage.json b/testdata/subtreeconsistency/11/preceding-garbage.json new file mode 100644 index 0000000..cd9ae90 --- /dev/null +++ b/testdata/subtreeconsistency/11/preceding-garbage.json @@ -0,0 +1,16 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/preceding-proof-@0.json b/testdata/subtreeconsistency/11/preceding-proof-@0.json new file mode 100644 index 0000000..e1873d7 --- /dev/null +++ b/testdata/subtreeconsistency/11/preceding-proof-@0.json @@ -0,0 +1,16 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding proof @0", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/preceding-root1.json b/testdata/subtreeconsistency/11/preceding-root1.json new file mode 100644 index 0000000..3b996ac --- /dev/null +++ b/testdata/subtreeconsistency/11/preceding-root1.json @@ -0,0 +1,16 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/preceding-root2.json b/testdata/subtreeconsistency/11/preceding-root2.json new file mode 100644 index 0000000..9f29c9c --- /dev/null +++ b/testdata/subtreeconsistency/11/preceding-root2.json @@ -0,0 +1,16 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/size-div-@2.json b/testdata/subtreeconsistency/11/size-div-@2.json new file mode 100644 index 0000000..2fa8dd2 --- /dev/null +++ b/testdata/subtreeconsistency/11/size-div-@2.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 4, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size div @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/size-mul-@2.json b/testdata/subtreeconsistency/11/size-mul-@2.json new file mode 100644 index 0000000..c31359c --- /dev/null +++ b/testdata/subtreeconsistency/11/size-mul-@2.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 16, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size mul @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/start-XOR-@2.json b/testdata/subtreeconsistency/11/start-XOR-@2.json new file mode 100644 index 0000000..996a750 --- /dev/null +++ b/testdata/subtreeconsistency/11/start-XOR-@2.json @@ -0,0 +1,15 @@ +{ + "start": 6, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/start-plus-@1.json b/testdata/subtreeconsistency/11/start-plus-@1.json new file mode 100644 index 0000000..c270cf9 --- /dev/null +++ b/testdata/subtreeconsistency/11/start-plus-@1.json @@ -0,0 +1,15 @@ +{ + "start": 5, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/start-sub-@1.json b/testdata/subtreeconsistency/11/start-sub-@1.json new file mode 100644 index 0000000..d349293 --- /dev/null +++ b/testdata/subtreeconsistency/11/start-sub-@1.json @@ -0,0 +1,15 @@ +{ + "start": 3, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/swapped-roots.json b/testdata/subtreeconsistency/11/swapped-roots.json new file mode 100644 index 0000000..8bd87f5 --- /dev/null +++ b/testdata/subtreeconsistency/11/swapped-roots.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "root2": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "swapped roots", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/trailing-garbage.json b/testdata/subtreeconsistency/11/trailing-garbage.json new file mode 100644 index 0000000..815ec40 --- /dev/null +++ b/testdata/subtreeconsistency/11/trailing-garbage.json @@ -0,0 +1,16 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "" + ], + "desc": "trailing garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/trailing-root1.json b/testdata/subtreeconsistency/11/trailing-root1.json new file mode 100644 index 0000000..a286692 --- /dev/null +++ b/testdata/subtreeconsistency/11/trailing-root1.json @@ -0,0 +1,16 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=" + ], + "desc": "trailing root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/trailing-root2.json b/testdata/subtreeconsistency/11/trailing-root2.json new file mode 100644 index 0000000..01d68dd --- /dev/null +++ b/testdata/subtreeconsistency/11/trailing-root2.json @@ -0,0 +1,16 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=" + ], + "desc": "trailing root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/truncated-proof.json b/testdata/subtreeconsistency/11/truncated-proof.json new file mode 100644 index 0000000..cf9e4e4 --- /dev/null +++ b/testdata/subtreeconsistency/11/truncated-proof.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=" + ], + "desc": "truncated proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/wrong-root1.json b/testdata/subtreeconsistency/11/wrong-root1.json new file mode 100644 index 0000000..0341e16 --- /dev/null +++ b/testdata/subtreeconsistency/11/wrong-root1.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "V3JvbmdSb290", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/11/wrong-root2.json b/testdata/subtreeconsistency/11/wrong-root2.json new file mode 100644 index 0000000..1ee4ac1 --- /dev/null +++ b/testdata/subtreeconsistency/11/wrong-root2.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "V3JvbmdSb290", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/size1-XOR-@2.json b/testdata/subtreeconsistency/2/end-XOR-@2.json similarity index 93% rename from testdata/subtreeconsistency/2/size1-XOR-@2.json rename to testdata/subtreeconsistency/2/end-XOR-@2.json index a2d8caa..d4ff8c3 100644 --- a/testdata/subtreeconsistency/2/size1-XOR-@2.json +++ b/testdata/subtreeconsistency/2/end-XOR-@2.json @@ -9,6 +9,6 @@ "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size1 XOR @2", + "desc": "end XOR @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/size1-plus-@1.json b/testdata/subtreeconsistency/2/end-plus-@1.json similarity index 92% rename from testdata/subtreeconsistency/2/size1-plus-@1.json rename to testdata/subtreeconsistency/2/end-plus-@1.json index 3b6ee96..9d3ea22 100644 --- a/testdata/subtreeconsistency/2/size1-plus-@1.json +++ b/testdata/subtreeconsistency/2/end-plus-@1.json @@ -9,6 +9,6 @@ "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size1 plus @1", + "desc": "end plus @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/size1-sub-@1.json b/testdata/subtreeconsistency/2/end-sub-@1.json similarity index 93% rename from testdata/subtreeconsistency/2/size1-sub-@1.json rename to testdata/subtreeconsistency/2/end-sub-@1.json index c6b466f..88647e2 100644 --- a/testdata/subtreeconsistency/2/size1-sub-@1.json +++ b/testdata/subtreeconsistency/2/end-sub-@1.json @@ -9,6 +9,6 @@ "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size1 sub @1", + "desc": "end sub @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/size2-div-@2.json b/testdata/subtreeconsistency/2/size-div-@2.json similarity index 93% rename from testdata/subtreeconsistency/2/size2-div-@2.json rename to testdata/subtreeconsistency/2/size-div-@2.json index 330a0d5..c099996 100644 --- a/testdata/subtreeconsistency/2/size2-div-@2.json +++ b/testdata/subtreeconsistency/2/size-div-@2.json @@ -9,6 +9,6 @@ "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size2 div @2", + "desc": "size div @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/size2-mul-@2.json b/testdata/subtreeconsistency/2/size-mul-@2.json similarity index 93% rename from testdata/subtreeconsistency/2/size2-mul-@2.json rename to testdata/subtreeconsistency/2/size-mul-@2.json index d7be269..687360d 100644 --- a/testdata/subtreeconsistency/2/size2-mul-@2.json +++ b/testdata/subtreeconsistency/2/size-mul-@2.json @@ -9,6 +9,6 @@ "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size2 mul @2", + "desc": "size mul @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/start-XOR-@2.json b/testdata/subtreeconsistency/2/start-XOR-@2.json new file mode 100644 index 0000000..d9e0a27 --- /dev/null +++ b/testdata/subtreeconsistency/2/start-XOR-@2.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 6, + "size": 8, + "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/start-plus-@1.json b/testdata/subtreeconsistency/2/start-plus-@1.json new file mode 100644 index 0000000..7ed93bf --- /dev/null +++ b/testdata/subtreeconsistency/2/start-plus-@1.json @@ -0,0 +1,14 @@ +{ + "start": 1, + "end": 6, + "size": 8, + "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/start-sub-@1.json b/testdata/subtreeconsistency/2/start-sub-@1.json new file mode 100644 index 0000000..b7345c2 --- /dev/null +++ b/testdata/subtreeconsistency/2/start-sub-@1.json @@ -0,0 +1,14 @@ +{ + "start": 18446744073709551615, + "end": 6, + "size": 8, + "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/size1-XOR-@2.json b/testdata/subtreeconsistency/3/end-XOR-@2.json similarity index 92% rename from testdata/subtreeconsistency/3/size1-XOR-@2.json rename to testdata/subtreeconsistency/3/end-XOR-@2.json index d7bc00d..3571307 100644 --- a/testdata/subtreeconsistency/3/size1-XOR-@2.json +++ b/testdata/subtreeconsistency/3/end-XOR-@2.json @@ -8,6 +8,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" ], - "desc": "size1 XOR @2", + "desc": "end XOR @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/size1-plus-@1.json b/testdata/subtreeconsistency/3/end-plus-@1.json similarity index 91% rename from testdata/subtreeconsistency/3/size1-plus-@1.json rename to testdata/subtreeconsistency/3/end-plus-@1.json index 1bbca1d..f32f918 100644 --- a/testdata/subtreeconsistency/3/size1-plus-@1.json +++ b/testdata/subtreeconsistency/3/end-plus-@1.json @@ -8,6 +8,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" ], - "desc": "size1 plus @1", + "desc": "end plus @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/size1-sub-@1.json b/testdata/subtreeconsistency/3/end-sub-@1.json similarity index 92% rename from testdata/subtreeconsistency/3/size1-sub-@1.json rename to testdata/subtreeconsistency/3/end-sub-@1.json index 1b8fd06..50abf1f 100644 --- a/testdata/subtreeconsistency/3/size1-sub-@1.json +++ b/testdata/subtreeconsistency/3/end-sub-@1.json @@ -8,6 +8,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" ], - "desc": "size1 sub @1", + "desc": "end sub @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/invalid-subtree.json b/testdata/subtreeconsistency/3/invalid-subtree.json deleted file mode 100644 index 9dd607e..0000000 --- a/testdata/subtreeconsistency/3/invalid-subtree.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "start": 1, - "end": 15, - "size": 15, - "root1": "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", - "root2": "Tju7H3tHjc/nH7YxYxUZo7yhLJrvyhYSv85ME6hiZNQ=", - "proof": [ - "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", - "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" - ], - "desc": "invalid subtree", - "wantErr": true -} \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/size2-div-@2.json b/testdata/subtreeconsistency/3/size-div-@2.json similarity index 92% rename from testdata/subtreeconsistency/3/size2-div-@2.json rename to testdata/subtreeconsistency/3/size-div-@2.json index 2b542d5..785f5ed 100644 --- a/testdata/subtreeconsistency/3/size2-div-@2.json +++ b/testdata/subtreeconsistency/3/size-div-@2.json @@ -8,6 +8,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" ], - "desc": "size2 div @2", + "desc": "size div @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/size2-mul-@2.json b/testdata/subtreeconsistency/3/size-mul-@2.json similarity index 92% rename from testdata/subtreeconsistency/3/size2-mul-@2.json rename to testdata/subtreeconsistency/3/size-mul-@2.json index 21bc88e..51e216c 100644 --- a/testdata/subtreeconsistency/3/size2-mul-@2.json +++ b/testdata/subtreeconsistency/3/size-mul-@2.json @@ -8,6 +8,6 @@ "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" ], - "desc": "size2 mul @2", + "desc": "size mul @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/start-XOR-@2.json b/testdata/subtreeconsistency/3/start-XOR-@2.json new file mode 100644 index 0000000..91f8e8e --- /dev/null +++ b/testdata/subtreeconsistency/3/start-XOR-@2.json @@ -0,0 +1,13 @@ +{ + "start": 2, + "end": 2, + "size": 5, + "root1": "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "root2": "Tju7H3tHjc/nH7YxYxUZo7yhLJrvyhYSv85ME6hiZNQ=", + "proof": [ + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/start-plus-@1.json b/testdata/subtreeconsistency/3/start-plus-@1.json new file mode 100644 index 0000000..12bac15 --- /dev/null +++ b/testdata/subtreeconsistency/3/start-plus-@1.json @@ -0,0 +1,13 @@ +{ + "start": 1, + "end": 2, + "size": 5, + "root1": "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "root2": "Tju7H3tHjc/nH7YxYxUZo7yhLJrvyhYSv85ME6hiZNQ=", + "proof": [ + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/3/start-sub-@1.json b/testdata/subtreeconsistency/3/start-sub-@1.json new file mode 100644 index 0000000..fbae23d --- /dev/null +++ b/testdata/subtreeconsistency/3/start-sub-@1.json @@ -0,0 +1,13 @@ +{ + "start": 18446744073709551615, + "end": 2, + "size": 5, + "root1": "+sVCA+fMaWzw38tCySodnbr3CtnmIfS9jZhmLwDjwSU=", + "root2": "Tju7H3tHjc/nH7YxYxUZo7yhLJrvyhYSv85ME6hiZNQ=", + "proof": [ + "Xwg/ChozygdqlSeYMlgNs+DvRYS9/x9UyKNg9Q3jAx4=", + "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/size1-XOR-@2.json b/testdata/subtreeconsistency/4/end-XOR-@2.json similarity index 93% rename from testdata/subtreeconsistency/4/size1-XOR-@2.json rename to testdata/subtreeconsistency/4/end-XOR-@2.json index 4eb7275..96534f1 100644 --- a/testdata/subtreeconsistency/4/size1-XOR-@2.json +++ b/testdata/subtreeconsistency/4/end-XOR-@2.json @@ -9,6 +9,6 @@ "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size1 XOR @2", + "desc": "end XOR @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/size1-plus-@1.json b/testdata/subtreeconsistency/4/end-plus-@1.json similarity index 92% rename from testdata/subtreeconsistency/4/size1-plus-@1.json rename to testdata/subtreeconsistency/4/end-plus-@1.json index a977930..4bb3354 100644 --- a/testdata/subtreeconsistency/4/size1-plus-@1.json +++ b/testdata/subtreeconsistency/4/end-plus-@1.json @@ -9,6 +9,6 @@ "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size1 plus @1", + "desc": "end plus @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/size1-sub-@1.json b/testdata/subtreeconsistency/4/end-sub-@1.json similarity index 93% rename from testdata/subtreeconsistency/4/size1-sub-@1.json rename to testdata/subtreeconsistency/4/end-sub-@1.json index 75ae87a..4a8d999 100644 --- a/testdata/subtreeconsistency/4/size1-sub-@1.json +++ b/testdata/subtreeconsistency/4/end-sub-@1.json @@ -9,6 +9,6 @@ "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size1 sub @1", + "desc": "end sub @1", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/invalid-subtree.json b/testdata/subtreeconsistency/4/invalid-subtree.json deleted file mode 100644 index de6bac1..0000000 --- a/testdata/subtreeconsistency/4/invalid-subtree.json +++ /dev/null @@ -1,14 +0,0 @@ -{ - "start": 1, - "end": 15, - "size": 15, - "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", - "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", - "proof": [ - "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", - "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", - "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" - ], - "desc": "invalid subtree", - "wantErr": true -} \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/size2-div-@2.json b/testdata/subtreeconsistency/4/size-div-@2.json similarity index 93% rename from testdata/subtreeconsistency/4/size2-div-@2.json rename to testdata/subtreeconsistency/4/size-div-@2.json index 6644524..926f413 100644 --- a/testdata/subtreeconsistency/4/size2-div-@2.json +++ b/testdata/subtreeconsistency/4/size-div-@2.json @@ -9,6 +9,6 @@ "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size2 div @2", + "desc": "size div @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/size2-mul-@2.json b/testdata/subtreeconsistency/4/size-mul-@2.json similarity index 93% rename from testdata/subtreeconsistency/4/size2-mul-@2.json rename to testdata/subtreeconsistency/4/size-mul-@2.json index 3972017..bd00650 100644 --- a/testdata/subtreeconsistency/4/size2-mul-@2.json +++ b/testdata/subtreeconsistency/4/size-mul-@2.json @@ -9,6 +9,6 @@ "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "size2 mul @2", + "desc": "size mul @2", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/start-XOR-@2.json b/testdata/subtreeconsistency/4/start-XOR-@2.json new file mode 100644 index 0000000..cb533c1 --- /dev/null +++ b/testdata/subtreeconsistency/4/start-XOR-@2.json @@ -0,0 +1,14 @@ +{ + "start": 2, + "end": 6, + "size": 7, + "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/start-plus-@1.json b/testdata/subtreeconsistency/4/start-plus-@1.json new file mode 100644 index 0000000..e550e5a --- /dev/null +++ b/testdata/subtreeconsistency/4/start-plus-@1.json @@ -0,0 +1,14 @@ +{ + "start": 1, + "end": 6, + "size": 7, + "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/4/start-sub-@1.json b/testdata/subtreeconsistency/4/start-sub-@1.json new file mode 100644 index 0000000..bef85e4 --- /dev/null +++ b/testdata/subtreeconsistency/4/start-sub-@1.json @@ -0,0 +1,14 @@ +{ + "start": 18446744073709551615, + "end": 6, + "size": 7, + "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/empty-proof.json b/testdata/subtreeconsistency/5/empty-proof.json new file mode 100644 index 0000000..8b24849 --- /dev/null +++ b/testdata/subtreeconsistency/5/empty-proof.json @@ -0,0 +1,10 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [], + "desc": "empty proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/end-XOR-@2.json b/testdata/subtreeconsistency/5/end-XOR-@2.json new file mode 100644 index 0000000..bc051e3 --- /dev/null +++ b/testdata/subtreeconsistency/5/end-XOR-@2.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 10, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/end-plus-@1.json b/testdata/subtreeconsistency/5/end-plus-@1.json new file mode 100644 index 0000000..6b9c522 --- /dev/null +++ b/testdata/subtreeconsistency/5/end-plus-@1.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 9, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/end-sub-@1.json b/testdata/subtreeconsistency/5/end-sub-@1.json new file mode 100644 index 0000000..56b8691 --- /dev/null +++ b/testdata/subtreeconsistency/5/end-sub-@1.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 7, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/happy-path.json b/testdata/subtreeconsistency/5/happy-path.json new file mode 100644 index 0000000..3e4eb38 --- /dev/null +++ b/testdata/subtreeconsistency/5/happy-path.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "happy path", + "wantErr": false +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/modified-proof@0-bit-@4.json b/testdata/subtreeconsistency/5/modified-proof@0-bit-@4.json new file mode 100644 index 0000000..bca9e95 --- /dev/null +++ b/testdata/subtreeconsistency/5/modified-proof@0-bit-@4.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "oIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@0 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/modified-proof@1-bit-@4.json b/testdata/subtreeconsistency/5/modified-proof@1-bit-@4.json new file mode 100644 index 0000000..6ce2ffc --- /dev/null +++ b/testdata/subtreeconsistency/5/modified-proof@1-bit-@4.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "HrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@1 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/modified-proof@2-bit-@4.json b/testdata/subtreeconsistency/5/modified-proof@2-bit-@4.json new file mode 100644 index 0000000..32f00fd --- /dev/null +++ b/testdata/subtreeconsistency/5/modified-proof@2-bit-@4.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "w37kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@2 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/preceding-garbage.json b/testdata/subtreeconsistency/5/preceding-garbage.json new file mode 100644 index 0000000..e5fd0cf --- /dev/null +++ b/testdata/subtreeconsistency/5/preceding-garbage.json @@ -0,0 +1,15 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/preceding-proof-@0.json b/testdata/subtreeconsistency/5/preceding-proof-@0.json new file mode 100644 index 0000000..f4ffd8a --- /dev/null +++ b/testdata/subtreeconsistency/5/preceding-proof-@0.json @@ -0,0 +1,15 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding proof @0", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/preceding-root1.json b/testdata/subtreeconsistency/5/preceding-root1.json new file mode 100644 index 0000000..996458c --- /dev/null +++ b/testdata/subtreeconsistency/5/preceding-root1.json @@ -0,0 +1,15 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/preceding-root2.json b/testdata/subtreeconsistency/5/preceding-root2.json new file mode 100644 index 0000000..73a6048 --- /dev/null +++ b/testdata/subtreeconsistency/5/preceding-root2.json @@ -0,0 +1,15 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/size-div-@2.json b/testdata/subtreeconsistency/5/size-div-@2.json new file mode 100644 index 0000000..d7629db --- /dev/null +++ b/testdata/subtreeconsistency/5/size-div-@2.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 4, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size div @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/size-mul-@2.json b/testdata/subtreeconsistency/5/size-mul-@2.json new file mode 100644 index 0000000..75ac7d6 --- /dev/null +++ b/testdata/subtreeconsistency/5/size-mul-@2.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 16, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size mul @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/start-XOR-@2.json b/testdata/subtreeconsistency/5/start-XOR-@2.json new file mode 100644 index 0000000..dcedd82 --- /dev/null +++ b/testdata/subtreeconsistency/5/start-XOR-@2.json @@ -0,0 +1,14 @@ +{ + "start": 5, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/start-plus-@1.json b/testdata/subtreeconsistency/5/start-plus-@1.json new file mode 100644 index 0000000..abaf5a9 --- /dev/null +++ b/testdata/subtreeconsistency/5/start-plus-@1.json @@ -0,0 +1,14 @@ +{ + "start": 8, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/start-sub-@1.json b/testdata/subtreeconsistency/5/start-sub-@1.json new file mode 100644 index 0000000..53c24e0 --- /dev/null +++ b/testdata/subtreeconsistency/5/start-sub-@1.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/swapped-roots.json b/testdata/subtreeconsistency/5/swapped-roots.json new file mode 100644 index 0000000..ccf6c18 --- /dev/null +++ b/testdata/subtreeconsistency/5/swapped-roots.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "root2": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "swapped roots", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/trailing-garbage.json b/testdata/subtreeconsistency/5/trailing-garbage.json new file mode 100644 index 0000000..3d7586a --- /dev/null +++ b/testdata/subtreeconsistency/5/trailing-garbage.json @@ -0,0 +1,15 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "" + ], + "desc": "trailing garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/trailing-root1.json b/testdata/subtreeconsistency/5/trailing-root1.json new file mode 100644 index 0000000..7ac549f --- /dev/null +++ b/testdata/subtreeconsistency/5/trailing-root1.json @@ -0,0 +1,15 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=" + ], + "desc": "trailing root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/trailing-root2.json b/testdata/subtreeconsistency/5/trailing-root2.json new file mode 100644 index 0000000..a233dfc --- /dev/null +++ b/testdata/subtreeconsistency/5/trailing-root2.json @@ -0,0 +1,15 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=" + ], + "desc": "trailing root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/truncated-proof.json b/testdata/subtreeconsistency/5/truncated-proof.json new file mode 100644 index 0000000..19cef2b --- /dev/null +++ b/testdata/subtreeconsistency/5/truncated-proof.json @@ -0,0 +1,13 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=" + ], + "desc": "truncated proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/wrong-root1.json b/testdata/subtreeconsistency/5/wrong-root1.json new file mode 100644 index 0000000..1f61450 --- /dev/null +++ b/testdata/subtreeconsistency/5/wrong-root1.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "V3JvbmdSb290", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/5/wrong-root2.json b/testdata/subtreeconsistency/5/wrong-root2.json new file mode 100644 index 0000000..5a358b0 --- /dev/null +++ b/testdata/subtreeconsistency/5/wrong-root2.json @@ -0,0 +1,14 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "Rvb/rdPQagn/PFhg0nVci5gZ2330QlF4jH2OMYDejrE=", + "root2": "V3JvbmdSb290", + "proof": [ + "sIaT7C5yFZcTBkHoIR5+7cy0wmQTlj7ubB4u0W/7Gl8=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/empty-proof.json b/testdata/subtreeconsistency/6/empty-proof.json new file mode 100644 index 0000000..ba9e12e --- /dev/null +++ b/testdata/subtreeconsistency/6/empty-proof.json @@ -0,0 +1,10 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [], + "desc": "empty proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/end-XOR-@2.json b/testdata/subtreeconsistency/6/end-XOR-@2.json new file mode 100644 index 0000000..73a051c --- /dev/null +++ b/testdata/subtreeconsistency/6/end-XOR-@2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 10, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/end-plus-@1.json b/testdata/subtreeconsistency/6/end-plus-@1.json new file mode 100644 index 0000000..1ae2242 --- /dev/null +++ b/testdata/subtreeconsistency/6/end-plus-@1.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 9, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/end-sub-@1.json b/testdata/subtreeconsistency/6/end-sub-@1.json new file mode 100644 index 0000000..1ac356c --- /dev/null +++ b/testdata/subtreeconsistency/6/end-sub-@1.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/happy-path.json b/testdata/subtreeconsistency/6/happy-path.json new file mode 100644 index 0000000..7f0ba00 --- /dev/null +++ b/testdata/subtreeconsistency/6/happy-path.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "happy path", + "wantErr": false +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/modified-proof@0-bit-@4.json b/testdata/subtreeconsistency/6/modified-proof@0-bit-@4.json new file mode 100644 index 0000000..84d3f7e --- /dev/null +++ b/testdata/subtreeconsistency/6/modified-proof@0-bit-@4.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "w37kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@0 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/preceding-garbage.json b/testdata/subtreeconsistency/6/preceding-garbage.json new file mode 100644 index 0000000..94189c6 --- /dev/null +++ b/testdata/subtreeconsistency/6/preceding-garbage.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/preceding-proof-@0.json b/testdata/subtreeconsistency/6/preceding-proof-@0.json new file mode 100644 index 0000000..fd1fcdc --- /dev/null +++ b/testdata/subtreeconsistency/6/preceding-proof-@0.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding proof @0", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/preceding-root1.json b/testdata/subtreeconsistency/6/preceding-root1.json new file mode 100644 index 0000000..15dad8b --- /dev/null +++ b/testdata/subtreeconsistency/6/preceding-root1.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/preceding-root2.json b/testdata/subtreeconsistency/6/preceding-root2.json new file mode 100644 index 0000000..fa34a70 --- /dev/null +++ b/testdata/subtreeconsistency/6/preceding-root2.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/size-div-@2.json b/testdata/subtreeconsistency/6/size-div-@2.json new file mode 100644 index 0000000..ec76079 --- /dev/null +++ b/testdata/subtreeconsistency/6/size-div-@2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 4, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size div @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/size-mul-@2.json b/testdata/subtreeconsistency/6/size-mul-@2.json new file mode 100644 index 0000000..d607277 --- /dev/null +++ b/testdata/subtreeconsistency/6/size-mul-@2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 16, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size mul @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/start-XOR-@2.json b/testdata/subtreeconsistency/6/start-XOR-@2.json new file mode 100644 index 0000000..f3515d8 --- /dev/null +++ b/testdata/subtreeconsistency/6/start-XOR-@2.json @@ -0,0 +1,12 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/start-plus-@1.json b/testdata/subtreeconsistency/6/start-plus-@1.json new file mode 100644 index 0000000..482dec7 --- /dev/null +++ b/testdata/subtreeconsistency/6/start-plus-@1.json @@ -0,0 +1,12 @@ +{ + "start": 5, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/start-sub-@1.json b/testdata/subtreeconsistency/6/start-sub-@1.json new file mode 100644 index 0000000..6740d9a --- /dev/null +++ b/testdata/subtreeconsistency/6/start-sub-@1.json @@ -0,0 +1,12 @@ +{ + "start": 3, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/swapped-roots.json b/testdata/subtreeconsistency/6/swapped-roots.json new file mode 100644 index 0000000..c959d3d --- /dev/null +++ b/testdata/subtreeconsistency/6/swapped-roots.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "root2": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "swapped roots", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/trailing-garbage.json b/testdata/subtreeconsistency/6/trailing-garbage.json new file mode 100644 index 0000000..22c02be --- /dev/null +++ b/testdata/subtreeconsistency/6/trailing-garbage.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "" + ], + "desc": "trailing garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/trailing-root1.json b/testdata/subtreeconsistency/6/trailing-root1.json new file mode 100644 index 0000000..048f312 --- /dev/null +++ b/testdata/subtreeconsistency/6/trailing-root1.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=" + ], + "desc": "trailing root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/trailing-root2.json b/testdata/subtreeconsistency/6/trailing-root2.json new file mode 100644 index 0000000..fb5bd5e --- /dev/null +++ b/testdata/subtreeconsistency/6/trailing-root2.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=" + ], + "desc": "trailing root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/truncated-proof.json b/testdata/subtreeconsistency/6/truncated-proof.json new file mode 100644 index 0000000..832e3a4 --- /dev/null +++ b/testdata/subtreeconsistency/6/truncated-proof.json @@ -0,0 +1,10 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [], + "desc": "truncated proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/wrong-root1.json b/testdata/subtreeconsistency/6/wrong-root1.json new file mode 100644 index 0000000..6a4c08c --- /dev/null +++ b/testdata/subtreeconsistency/6/wrong-root1.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "V3JvbmdSb290", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/6/wrong-root2.json b/testdata/subtreeconsistency/6/wrong-root2.json new file mode 100644 index 0000000..3fb9769 --- /dev/null +++ b/testdata/subtreeconsistency/6/wrong-root2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "a0eq8p7jwq+a+Im8H7klTavTEXfxYjLdaqsDXKOb9uQ=", + "root2": "V3JvbmdSb290", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/empty-proof.json b/testdata/subtreeconsistency/7/empty-proof.json new file mode 100644 index 0000000..11c8efc --- /dev/null +++ b/testdata/subtreeconsistency/7/empty-proof.json @@ -0,0 +1,10 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [], + "desc": "empty proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/end-XOR-@2.json b/testdata/subtreeconsistency/7/end-XOR-@2.json new file mode 100644 index 0000000..0981119 --- /dev/null +++ b/testdata/subtreeconsistency/7/end-XOR-@2.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 10, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/end-plus-@1.json b/testdata/subtreeconsistency/7/end-plus-@1.json new file mode 100644 index 0000000..cea734f --- /dev/null +++ b/testdata/subtreeconsistency/7/end-plus-@1.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 9, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/end-sub-@1.json b/testdata/subtreeconsistency/7/end-sub-@1.json new file mode 100644 index 0000000..d3c04ba --- /dev/null +++ b/testdata/subtreeconsistency/7/end-sub-@1.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 7, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/happy-path.json b/testdata/subtreeconsistency/7/happy-path.json new file mode 100644 index 0000000..f4882d1 --- /dev/null +++ b/testdata/subtreeconsistency/7/happy-path.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "happy path", + "wantErr": false +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/modified-proof@0-bit-@4.json b/testdata/subtreeconsistency/7/modified-proof@0-bit-@4.json new file mode 100644 index 0000000..a437613 --- /dev/null +++ b/testdata/subtreeconsistency/7/modified-proof@0-bit-@4.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "HrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@0 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/modified-proof@1-bit-@4.json b/testdata/subtreeconsistency/7/modified-proof@1-bit-@4.json new file mode 100644 index 0000000..343802d --- /dev/null +++ b/testdata/subtreeconsistency/7/modified-proof@1-bit-@4.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "w37kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@1 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/preceding-garbage.json b/testdata/subtreeconsistency/7/preceding-garbage.json new file mode 100644 index 0000000..b9c6819 --- /dev/null +++ b/testdata/subtreeconsistency/7/preceding-garbage.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/2/invalid-subtree.json b/testdata/subtreeconsistency/7/preceding-proof-@0.json similarity index 52% rename from testdata/subtreeconsistency/2/invalid-subtree.json rename to testdata/subtreeconsistency/7/preceding-proof-@0.json index 5ecbfe1..4edca90 100644 --- a/testdata/subtreeconsistency/2/invalid-subtree.json +++ b/testdata/subtreeconsistency/7/preceding-proof-@0.json @@ -1,14 +1,14 @@ { - "start": 1, - "end": 15, - "size": 15, - "root1": "duZ9rbzfHhDht03cYIq9L5jfsW+851J3tSMqEn8gh+8=", + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", "proof": [ "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", - "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" ], - "desc": "invalid subtree", + "desc": "preceding proof @0", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/preceding-root1.json b/testdata/subtreeconsistency/7/preceding-root1.json new file mode 100644 index 0000000..0a8ea98 --- /dev/null +++ b/testdata/subtreeconsistency/7/preceding-root1.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/preceding-root2.json b/testdata/subtreeconsistency/7/preceding-root2.json new file mode 100644 index 0000000..49d01c5 --- /dev/null +++ b/testdata/subtreeconsistency/7/preceding-root2.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/size-div-@2.json b/testdata/subtreeconsistency/7/size-div-@2.json new file mode 100644 index 0000000..1ca4c90 --- /dev/null +++ b/testdata/subtreeconsistency/7/size-div-@2.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 4, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size div @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/size-mul-@2.json b/testdata/subtreeconsistency/7/size-mul-@2.json new file mode 100644 index 0000000..c55ae59 --- /dev/null +++ b/testdata/subtreeconsistency/7/size-mul-@2.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 16, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size mul @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/start-XOR-@2.json b/testdata/subtreeconsistency/7/start-XOR-@2.json new file mode 100644 index 0000000..3a7b051 --- /dev/null +++ b/testdata/subtreeconsistency/7/start-XOR-@2.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/start-plus-@1.json b/testdata/subtreeconsistency/7/start-plus-@1.json new file mode 100644 index 0000000..60aeda2 --- /dev/null +++ b/testdata/subtreeconsistency/7/start-plus-@1.json @@ -0,0 +1,13 @@ +{ + "start": 7, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/start-sub-@1.json b/testdata/subtreeconsistency/7/start-sub-@1.json new file mode 100644 index 0000000..282e8bf --- /dev/null +++ b/testdata/subtreeconsistency/7/start-sub-@1.json @@ -0,0 +1,13 @@ +{ + "start": 5, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/swapped-roots.json b/testdata/subtreeconsistency/7/swapped-roots.json new file mode 100644 index 0000000..965bc81 --- /dev/null +++ b/testdata/subtreeconsistency/7/swapped-roots.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "root2": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "swapped roots", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/trailing-garbage.json b/testdata/subtreeconsistency/7/trailing-garbage.json new file mode 100644 index 0000000..f077cd2 --- /dev/null +++ b/testdata/subtreeconsistency/7/trailing-garbage.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "" + ], + "desc": "trailing garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/trailing-root1.json b/testdata/subtreeconsistency/7/trailing-root1.json new file mode 100644 index 0000000..a8e9242 --- /dev/null +++ b/testdata/subtreeconsistency/7/trailing-root1.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=" + ], + "desc": "trailing root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/trailing-root2.json b/testdata/subtreeconsistency/7/trailing-root2.json new file mode 100644 index 0000000..9c7c5d2 --- /dev/null +++ b/testdata/subtreeconsistency/7/trailing-root2.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=" + ], + "desc": "trailing root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/truncated-proof.json b/testdata/subtreeconsistency/7/truncated-proof.json new file mode 100644 index 0000000..7a9d65b --- /dev/null +++ b/testdata/subtreeconsistency/7/truncated-proof.json @@ -0,0 +1,12 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=" + ], + "desc": "truncated proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/wrong-root1.json b/testdata/subtreeconsistency/7/wrong-root1.json new file mode 100644 index 0000000..eb70ad3 --- /dev/null +++ b/testdata/subtreeconsistency/7/wrong-root1.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "V3JvbmdSb290", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/7/wrong-root2.json b/testdata/subtreeconsistency/7/wrong-root2.json new file mode 100644 index 0000000..349190b --- /dev/null +++ b/testdata/subtreeconsistency/7/wrong-root2.json @@ -0,0 +1,13 @@ +{ + "start": 6, + "end": 8, + "size": 8, + "root1": "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "root2": "V3JvbmdSb290", + "proof": [ + "DrxdNDf74tsVi58Sah0RjjCBgQMdCpSfje3t68VY72o=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/empty-proof.json b/testdata/subtreeconsistency/8/empty-proof.json new file mode 100644 index 0000000..c0e24d3 --- /dev/null +++ b/testdata/subtreeconsistency/8/empty-proof.json @@ -0,0 +1,10 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [], + "desc": "empty proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/end-XOR-@2.json b/testdata/subtreeconsistency/8/end-XOR-@2.json new file mode 100644 index 0000000..bdbe088 --- /dev/null +++ b/testdata/subtreeconsistency/8/end-XOR-@2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 5, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/end-plus-@1.json b/testdata/subtreeconsistency/8/end-plus-@1.json new file mode 100644 index 0000000..4e7e9c3 --- /dev/null +++ b/testdata/subtreeconsistency/8/end-plus-@1.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 8, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/end-sub-@1.json b/testdata/subtreeconsistency/8/end-sub-@1.json new file mode 100644 index 0000000..6500888 --- /dev/null +++ b/testdata/subtreeconsistency/8/end-sub-@1.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 6, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/happy-path.json b/testdata/subtreeconsistency/8/happy-path.json new file mode 100644 index 0000000..42a38e8 --- /dev/null +++ b/testdata/subtreeconsistency/8/happy-path.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "happy path", + "wantErr": false +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/modified-proof@0-bit-@4.json b/testdata/subtreeconsistency/8/modified-proof@0-bit-@4.json new file mode 100644 index 0000000..4d50c42 --- /dev/null +++ b/testdata/subtreeconsistency/8/modified-proof@0-bit-@4.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "w37kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@0 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/preceding-garbage.json b/testdata/subtreeconsistency/8/preceding-garbage.json new file mode 100644 index 0000000..071a760 --- /dev/null +++ b/testdata/subtreeconsistency/8/preceding-garbage.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/preceding-proof-@0.json b/testdata/subtreeconsistency/8/preceding-proof-@0.json new file mode 100644 index 0000000..4354af5 --- /dev/null +++ b/testdata/subtreeconsistency/8/preceding-proof-@0.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding proof @0", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/preceding-root1.json b/testdata/subtreeconsistency/8/preceding-root1.json new file mode 100644 index 0000000..565e480 --- /dev/null +++ b/testdata/subtreeconsistency/8/preceding-root1.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/preceding-root2.json b/testdata/subtreeconsistency/8/preceding-root2.json new file mode 100644 index 0000000..c564cd3 --- /dev/null +++ b/testdata/subtreeconsistency/8/preceding-root2.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/size-div-@2.json b/testdata/subtreeconsistency/8/size-div-@2.json new file mode 100644 index 0000000..0893442 --- /dev/null +++ b/testdata/subtreeconsistency/8/size-div-@2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 3, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size div @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/size-mul-@2.json b/testdata/subtreeconsistency/8/size-mul-@2.json new file mode 100644 index 0000000..9cae1f4 --- /dev/null +++ b/testdata/subtreeconsistency/8/size-mul-@2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 14, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size mul @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/start-XOR-@2.json b/testdata/subtreeconsistency/8/start-XOR-@2.json new file mode 100644 index 0000000..fbfc7c2 --- /dev/null +++ b/testdata/subtreeconsistency/8/start-XOR-@2.json @@ -0,0 +1,12 @@ +{ + "start": 6, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/start-plus-@1.json b/testdata/subtreeconsistency/8/start-plus-@1.json new file mode 100644 index 0000000..788511a --- /dev/null +++ b/testdata/subtreeconsistency/8/start-plus-@1.json @@ -0,0 +1,12 @@ +{ + "start": 5, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/start-sub-@1.json b/testdata/subtreeconsistency/8/start-sub-@1.json new file mode 100644 index 0000000..bcd9f5d --- /dev/null +++ b/testdata/subtreeconsistency/8/start-sub-@1.json @@ -0,0 +1,12 @@ +{ + "start": 3, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/swapped-roots.json b/testdata/subtreeconsistency/8/swapped-roots.json new file mode 100644 index 0000000..4f4d0d8 --- /dev/null +++ b/testdata/subtreeconsistency/8/swapped-roots.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "root2": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "swapped roots", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/trailing-garbage.json b/testdata/subtreeconsistency/8/trailing-garbage.json new file mode 100644 index 0000000..6869896 --- /dev/null +++ b/testdata/subtreeconsistency/8/trailing-garbage.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "" + ], + "desc": "trailing garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/trailing-root1.json b/testdata/subtreeconsistency/8/trailing-root1.json new file mode 100644 index 0000000..374b735 --- /dev/null +++ b/testdata/subtreeconsistency/8/trailing-root1.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=" + ], + "desc": "trailing root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/trailing-root2.json b/testdata/subtreeconsistency/8/trailing-root2.json new file mode 100644 index 0000000..a0d3b53 --- /dev/null +++ b/testdata/subtreeconsistency/8/trailing-root2.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=" + ], + "desc": "trailing root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/truncated-proof.json b/testdata/subtreeconsistency/8/truncated-proof.json new file mode 100644 index 0000000..48c36e9 --- /dev/null +++ b/testdata/subtreeconsistency/8/truncated-proof.json @@ -0,0 +1,10 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [], + "desc": "truncated proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/wrong-root1.json b/testdata/subtreeconsistency/8/wrong-root1.json new file mode 100644 index 0000000..1afbb61 --- /dev/null +++ b/testdata/subtreeconsistency/8/wrong-root1.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "V3JvbmdSb290", + "root2": "3bib5AOAnjJXUNPSY814kpwpQreUKjS3fhIslZSnTIw=", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/8/wrong-root2.json b/testdata/subtreeconsistency/8/wrong-root2.json new file mode 100644 index 0000000..843789d --- /dev/null +++ b/testdata/subtreeconsistency/8/wrong-root2.json @@ -0,0 +1,12 @@ +{ + "start": 4, + "end": 7, + "size": 7, + "root1": "g327FS6bB5AQcX6E6GXaTrwPoZioBtWdMb8VrM7yLQ4=", + "root2": "V3JvbmdSb290", + "proof": [ + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/empty-proof.json b/testdata/subtreeconsistency/9/empty-proof.json new file mode 100644 index 0000000..8b89163 --- /dev/null +++ b/testdata/subtreeconsistency/9/empty-proof.json @@ -0,0 +1,10 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [], + "desc": "empty proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/end-XOR-@2.json b/testdata/subtreeconsistency/9/end-XOR-@2.json new file mode 100644 index 0000000..6b03037 --- /dev/null +++ b/testdata/subtreeconsistency/9/end-XOR-@2.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 7, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/end-plus-@1.json b/testdata/subtreeconsistency/9/end-plus-@1.json new file mode 100644 index 0000000..8d19209 --- /dev/null +++ b/testdata/subtreeconsistency/9/end-plus-@1.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 6, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/end-sub-@1.json b/testdata/subtreeconsistency/9/end-sub-@1.json new file mode 100644 index 0000000..03c46a0 --- /dev/null +++ b/testdata/subtreeconsistency/9/end-sub-@1.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 4, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "end sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/happy-path.json b/testdata/subtreeconsistency/9/happy-path.json new file mode 100644 index 0000000..28f23c8 --- /dev/null +++ b/testdata/subtreeconsistency/9/happy-path.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "happy path", + "wantErr": false +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/modified-proof@0-bit-@4.json b/testdata/subtreeconsistency/9/modified-proof@0-bit-@4.json new file mode 100644 index 0000000..6fb0086 --- /dev/null +++ b/testdata/subtreeconsistency/9/modified-proof@0-bit-@4.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "UnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@0 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/modified-proof@1-bit-@4.json b/testdata/subtreeconsistency/9/modified-proof@1-bit-@4.json new file mode 100644 index 0000000..36b0b6d --- /dev/null +++ b/testdata/subtreeconsistency/9/modified-proof@1-bit-@4.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "2oVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@1 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/modified-proof@2-bit-@4.json b/testdata/subtreeconsistency/9/modified-proof@2-bit-@4.json new file mode 100644 index 0000000..a38003a --- /dev/null +++ b/testdata/subtreeconsistency/9/modified-proof@2-bit-@4.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "w37kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "modified proof@2 bit @4", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/preceding-garbage.json b/testdata/subtreeconsistency/9/preceding-garbage.json new file mode 100644 index 0000000..d4398b6 --- /dev/null +++ b/testdata/subtreeconsistency/9/preceding-garbage.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "", + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/preceding-proof-@0.json b/testdata/subtreeconsistency/9/preceding-proof-@0.json new file mode 100644 index 0000000..7aca30c --- /dev/null +++ b/testdata/subtreeconsistency/9/preceding-proof-@0.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding proof @0", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/preceding-root1.json b/testdata/subtreeconsistency/9/preceding-root1.json new file mode 100644 index 0000000..0492f32 --- /dev/null +++ b/testdata/subtreeconsistency/9/preceding-root1.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/preceding-root2.json b/testdata/subtreeconsistency/9/preceding-root2.json new file mode 100644 index 0000000..d90d593 --- /dev/null +++ b/testdata/subtreeconsistency/9/preceding-root2.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "preceding root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/size-div-@2.json b/testdata/subtreeconsistency/9/size-div-@2.json new file mode 100644 index 0000000..6833d1d --- /dev/null +++ b/testdata/subtreeconsistency/9/size-div-@2.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 4, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size div @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/size-mul-@2.json b/testdata/subtreeconsistency/9/size-mul-@2.json new file mode 100644 index 0000000..fd69dec --- /dev/null +++ b/testdata/subtreeconsistency/9/size-mul-@2.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 16, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "size mul @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/start-XOR-@2.json b/testdata/subtreeconsistency/9/start-XOR-@2.json new file mode 100644 index 0000000..5165efd --- /dev/null +++ b/testdata/subtreeconsistency/9/start-XOR-@2.json @@ -0,0 +1,14 @@ +{ + "start": 6, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start XOR @2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/start-plus-@1.json b/testdata/subtreeconsistency/9/start-plus-@1.json new file mode 100644 index 0000000..9a3ebc7 --- /dev/null +++ b/testdata/subtreeconsistency/9/start-plus-@1.json @@ -0,0 +1,14 @@ +{ + "start": 5, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start plus @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/start-sub-@1.json b/testdata/subtreeconsistency/9/start-sub-@1.json new file mode 100644 index 0000000..04c202f --- /dev/null +++ b/testdata/subtreeconsistency/9/start-sub-@1.json @@ -0,0 +1,14 @@ +{ + "start": 3, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "start sub @1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/swapped-roots.json b/testdata/subtreeconsistency/9/swapped-roots.json new file mode 100644 index 0000000..a70f43b --- /dev/null +++ b/testdata/subtreeconsistency/9/swapped-roots.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "root2": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "swapped roots", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/trailing-garbage.json b/testdata/subtreeconsistency/9/trailing-garbage.json new file mode 100644 index 0000000..e38d185 --- /dev/null +++ b/testdata/subtreeconsistency/9/trailing-garbage.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "" + ], + "desc": "trailing garbage", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/trailing-root1.json b/testdata/subtreeconsistency/9/trailing-root1.json new file mode 100644 index 0000000..a65cdf9 --- /dev/null +++ b/testdata/subtreeconsistency/9/trailing-root1.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=" + ], + "desc": "trailing root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/trailing-root2.json b/testdata/subtreeconsistency/9/trailing-root2.json new file mode 100644 index 0000000..2a97165 --- /dev/null +++ b/testdata/subtreeconsistency/9/trailing-root2.json @@ -0,0 +1,15 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=", + "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=" + ], + "desc": "trailing root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/truncated-proof.json b/testdata/subtreeconsistency/9/truncated-proof.json new file mode 100644 index 0000000..eb485a4 --- /dev/null +++ b/testdata/subtreeconsistency/9/truncated-proof.json @@ -0,0 +1,13 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=" + ], + "desc": "truncated proof", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/wrong-root1.json b/testdata/subtreeconsistency/9/wrong-root1.json new file mode 100644 index 0000000..6233b8a --- /dev/null +++ b/testdata/subtreeconsistency/9/wrong-root1.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "V3JvbmdSb290", + "root2": "XcnaeacGWamtVZy3Ad7ZoqudgjqtL0lgz+Nw7/RgQyg=", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root1", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/9/wrong-root2.json b/testdata/subtreeconsistency/9/wrong-root2.json new file mode 100644 index 0000000..9a1ad68 --- /dev/null +++ b/testdata/subtreeconsistency/9/wrong-root2.json @@ -0,0 +1,14 @@ +{ + "start": 4, + "end": 5, + "size": 8, + "root1": "vBoGQ7EuTS18d5GPROD095qDi2z57FtcKD4fTYhZnms=", + "root2": "V3JvbmdSb290", + "proof": [ + "QnGia+DYqE8L1UyMMC58s6O10fpngKQLzOKHNHfatlg=", + "yoVOoSjtBQtBs1/8G4e46yveRh6eO1WW7Oa51ZdaCuA=", + "037kGJdt2VdTwcc4Yrk5j6Kiz5tP8P3+izDNlSCWFLc=" + ], + "desc": "wrong root2", + "wantErr": true +} \ No newline at end of file diff --git a/testdata/subtreeconsistency/additional/consistency-check-on-empty-tree-size1-is-zero-is-useless.json b/testdata/subtreeconsistency/additional/consistency-check-on-empty-tree-size1-is-zero-is-useless.json deleted file mode 100644 index a181a06..0000000 --- a/testdata/subtreeconsistency/additional/consistency-check-on-empty-tree-size1-is-zero-is-useless.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "start": 0, - "end": 0, - "size": 1, - "root1": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", - "root2": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", - "proof": [ - "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=" - ], - "desc": "consistency check on empty tree (size1 is zero) is useless", - "wantErr": true -} \ No newline at end of file diff --git a/testdata/subtreeconsistency/additional/size1-is-greater-than-size2-again.json b/testdata/subtreeconsistency/additional/end-is-greater-than-size-again.json similarity index 74% rename from testdata/subtreeconsistency/additional/size1-is-greater-than-size2-again.json rename to testdata/subtreeconsistency/additional/end-is-greater-than-size-again.json index c752d6d..5f72fb0 100644 --- a/testdata/subtreeconsistency/additional/size1-is-greater-than-size2-again.json +++ b/testdata/subtreeconsistency/additional/end-is-greater-than-size-again.json @@ -5,6 +5,6 @@ "root1": "ZG9uJ3QgY2FyZSAx", "root2": "ZG9uJ3QgY2FyZSAy", "proof": [], - "desc": "size1 is greater than size2 again", + "desc": "end is greater than size again", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/additional/size1-is-greater-than-size2.json b/testdata/subtreeconsistency/additional/end-is-greater-than-size.json similarity index 76% rename from testdata/subtreeconsistency/additional/size1-is-greater-than-size2.json rename to testdata/subtreeconsistency/additional/end-is-greater-than-size.json index efc7ad2..eea82ed 100644 --- a/testdata/subtreeconsistency/additional/size1-is-greater-than-size2.json +++ b/testdata/subtreeconsistency/additional/end-is-greater-than-size.json @@ -5,6 +5,6 @@ "root1": "ZG9uJ3QgY2FyZSAx", "root2": "ZG9uJ3QgY2FyZSAy", "proof": [], - "desc": "size1 is greater than size2", + "desc": "end is greater than size", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/additional/size1-is-zero-and-does-not-equal-size2.json b/testdata/subtreeconsistency/additional/end-is-zero-and-does-not-equal-size.json similarity index 72% rename from testdata/subtreeconsistency/additional/size1-is-zero-and-does-not-equal-size2.json rename to testdata/subtreeconsistency/additional/end-is-zero-and-does-not-equal-size.json index 0b2926f..d89dd1c 100644 --- a/testdata/subtreeconsistency/additional/size1-is-zero-and-does-not-equal-size2.json +++ b/testdata/subtreeconsistency/additional/end-is-zero-and-does-not-equal-size.json @@ -5,6 +5,6 @@ "root1": "ZG9uJ3QgY2FyZSAx", "root2": "ZG9uJ3QgY2FyZSAy", "proof": [], - "desc": "size1 is zero and does not equal size2", + "desc": "end is zero and does not equal size", "wantErr": true } \ No newline at end of file diff --git a/testdata/subtreeconsistency/additional/roots-do-not-not-match-and-sizes-are-one.json b/testdata/subtreeconsistency/additional/roots-do-not-not-match-and-sizes-are-one.json deleted file mode 100644 index 7201a4c..0000000 --- a/testdata/subtreeconsistency/additional/roots-do-not-not-match-and-sizes-are-one.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "start": 0, - "end": 1, - "size": 1, - "root1": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=", - "root2": "ZG9uJ3QgY2FyZSAy", - "proof": [], - "desc": "roots do not not match and sizes are one", - "wantErr": true -} \ No newline at end of file diff --git a/testdata/subtreeconsistency/additional/sizes-are-equal-zero-and-proof-is-empty.json b/testdata/subtreeconsistency/additional/sizes-are-equal-zero-and-proof-is-empty.json deleted file mode 100644 index d66f96d..0000000 --- a/testdata/subtreeconsistency/additional/sizes-are-equal-zero-and-proof-is-empty.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "start": 0, - "end": 0, - "size": 0, - "root1": "ZG9uJ3QgY2FyZSAx", - "root2": "ZG9uJ3QgY2FyZSAx", - "proof": [], - "desc": "sizes are equal (zero) and proof is empty", - "wantErr": true -} \ No newline at end of file diff --git a/testdata/subtreeconsistency/additional/sizes-do-not-watch-and-proof-is-empty.json b/testdata/subtreeconsistency/additional/sizes-do-not-watch-and-proof-is-empty.json deleted file mode 100644 index 5babc26..0000000 --- a/testdata/subtreeconsistency/additional/sizes-do-not-watch-and-proof-is-empty.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "start": 0, - "end": 1, - "size": 2, - "root1": "ZG9uJ3QgY2FyZSAx", - "root2": "ZG9uJ3QgY2FyZSAy", - "proof": [], - "desc": "sizes do not watch and proof is empty", - "wantErr": true -} \ No newline at end of file diff --git a/testonly/reference_test.go b/testonly/reference_test.go index 8add5fb..614043d 100644 --- a/testonly/reference_test.go +++ b/testonly/reference_test.go @@ -304,6 +304,34 @@ func TestRefSubtreeConsistencyProof(t *testing.T) { hd("ca854ea128ed050b41b35ffc1b87b8eb2bde461e9e3b5596ece6b9d5975a0ae0"), hd("d37ee418976dd95753c1c73862b9398fa2a2cf9b4ff0fdfe8b30cd95209614b7"), }}, + // Non-zero starting subtrees: + // Right half [4, 8) in size 8 requires the root of the left half [0, 4). + {start: 4, end: 8, size: 8, known: true, want: [][]byte{ + hd("d37ee418976dd95753c1c73862b9398fa2a2cf9b4ff0fdfe8b30cd95209614b7"), + }}, + // Subtree of size 1 not starting at 0 ([4, 5) in size 8): + {start: 4, end: 5, size: 8, known: true, want: [][]byte{ + hd("4271a26be0d8a84f0bd54c8c302e7cb3a3b5d1fa6780a40bcce2873477dab658"), + hd("ca854ea128ed050b41b35ffc1b87b8eb2bde461e9e3b5596ece6b9d5975a0ae0"), + hd("d37ee418976dd95753c1c73862b9398fa2a2cf9b4ff0fdfe8b30cd95209614b7"), + }}, + // Subtree ending at size not starting at 0 ([6, 8) in size 8): + {start: 6, end: 8, size: 8, known: true, want: [][]byte{ + hd("0ebc5d3437fbe2db158b9f126a1d118e308181031d0a949f8dededebc558ef6a"), + hd("d37ee418976dd95753c1c73862b9398fa2a2cf9b4ff0fdfe8b30cd95209614b7"), + }}, + // Perfect subtree not starting at 0, not ending at size ([2, 4) in size 8): + {start: 2, end: 4, size: 8, known: true, want: [][]byte{ + hd("fac54203e7cc696cf0dfcb42c92a1d9dbaf70ad9e621f4bd8d98662f00e3c125"), + hd("6b47aaf29ee3c2af9af889bc1fb9254dabd31177f16232dd6aab035ca39bf6e4"), + }}, + // Imperfect subtree not starting at 0, not ending at size ([4, 7) in size 8): + {start: 4, end: 7, size: 8, known: true, want: [][]byte{ + hd("b08693ec2e721597130641e8211e7eedccb4c26413963eee6c1e2ed16ffb1a5f"), + hd("46f6ffadd3d06a09ff3c5860d2755c8b9819db7df44251788c7d8e3180de8eb1"), + hd("0ebc5d3437fbe2db158b9f126a1d118e308181031d0a949f8dededebc558ef6a"), + hd("d37ee418976dd95753c1c73862b9398fa2a2cf9b4ff0fdfe8b30cd95209614b7"), + }}, } { t.Run(fmt.Sprintf("start:%d end:%d size:%d known:%t", tc.start, tc.end, tc.size, tc.known), func(t *testing.T) { got := refSubtreeConsistencyProof(tc.start, tc.end, entries[:tc.size], tc.known, hasher)