Skip to content

Commit 59a83a3

Browse files
test(db-sync): add off-chain voting anchor data
Add the anchor metadata test vectors used by the off-chain voting anchor db-sync tests: - governance_action_anchor_cip_100_non_conformant.json: valid JSON that does not conform to CIP-100 (an author is missing its witness). - governance_action_anchor_invalid_json.json: content that is not valid JSON. Committing these first lets their raw URLs be shortened (an on-chain anchor URL is limited to 128 bytes) and referenced from the tests.
1 parent 4dfb2bb commit 59a83a3

2 files changed

Lines changed: 148 additions & 0 deletions

File tree

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"title": "CIP-108 Common",
3+
"description": "Metadata",
4+
"type": "object",
5+
"required": [
6+
"hashAlgorithm",
7+
"authors",
8+
"body"
9+
],
10+
"hashAlgorithm": "blake2b-256",
11+
"authors": [
12+
{
13+
"name": "Artur Wieczorek",
14+
"witness": {
15+
"witnessAlgorithm": "ed25519",
16+
"publicKey": "7b5bb76010969223260ad382508527b13d46b830554504af8ce7efd50a5af23f",
17+
"signature": "9a5f59c702cf54f3397132cc813abb54ab7ae9fe5c10aea0fc68994714843c8691f3880b0b3442aa5ed5c64aa27d5417c6f0e341abe185fb26713d25dd71a40d"
18+
}
19+
},
20+
{
21+
"name": "Ryan Williams"
22+
}
23+
],
24+
"body": {
25+
"title": "Test cardano-db-sync off_chain_vote_data table",
26+
"abstract": "Conway Era Tests",
27+
"motivation": "Good Quality of the Product",
28+
"rationale": "cardano-db-sync needs to support all Conway Era features",
29+
"references": [
30+
{
31+
"@type": "Link",
32+
"label": "CIP-100",
33+
"uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md",
34+
"referenceHash": {
35+
"hashDigest": "70e79c1f12ff3c8c955bc2178a542b5994a21be163dd7655af2c5308d2643323",
36+
"hashAlgorithm": "blake2b-256"
37+
}
38+
},
39+
{
40+
"@type": "Identity",
41+
"label": "CIP-108",
42+
"uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md",
43+
"referenceHash": {
44+
"hashDigest": "68e09c1f22ff3c8c555b7bs78ac42s599ah61be163dd7655af2c73fhd7263379",
45+
"hashAlgorithm": "blake2b-256"
46+
}
47+
},
48+
{
49+
"@type": "Other",
50+
"label": "CIP-112",
51+
"uri": "https://github.com/cardano-foundation/CIPs/blob/master/CIP-0112/README.md",
52+
"referenceHash": {
53+
"hashDigest": "97e09f6fv2zf3c8c7d3b7hs8bacf5s5h7ahklbe163dd7655af2c73fhd72hu8s4",
54+
"hashAlgorithm": "blake2b-256"
55+
}
56+
}
57+
],
58+
"comment": "This is a test vector for CIP-100",
59+
"externalUpdates": [
60+
{
61+
"title": "cardano-node-tests",
62+
"uri": "https://github.com/IntersectMBO/cardano-node-tests"
63+
},
64+
{
65+
"title": "cardano-node",
66+
"uri": "https://github.com/IntersectMBO/cardano-node"
67+
},
68+
{
69+
"title": "cardano-db-sync",
70+
"uri": "https://github.com/IntersectMBO/cardano-db-sync"
71+
}
72+
]
73+
}
74+
}
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"title":"CIP-108 Common",
3+
"description":"Metadata",
4+
"type":"object",
5+
"required":[
6+
"hashAlgorithm",
7+
"authors",
8+
"body"
9+
],
10+
"hashAlgorithm":"blake2b-256",
11+
"authors":[
12+
{
13+
"name":"Artur Wieczorek",
14+
"witness":{
15+
"witnessAlgorithm":"ed25519",
16+
"publicKey":"7b5bb76010969223260ad382508527b13d46b830554504af8ce7efd50a5af23f",
17+
"signature":"9a5f59c702cf54f3397132cc813abb54ab7ae9fe5c10aea0fc68994714843c8691f3880b0b3442aa5ed5c64aa27d5417c6f0e341abe185fb26713d25dd71a40d"
18+
}
19+
},
20+
{
21+
"name":"Ryan Williams",
22+
}
23+
],
24+
"body":{
25+
"title":"Test cardano-db-sync off_chain_vote_data table",
26+
"abstract":"Conway Era Tests",
27+
"motivation":"Good Quality of the Product",
28+
"rationale":"cardano-db-sync needs to support all Conway Era features",
29+
"references":[
30+
{
31+
"@type":"Other",
32+
"label":"CIP-100",
33+
"uri":"https://github.com/cardano-foundation/CIPs/blob/master/CIP-0100/README.md",
34+
"referenceHash":{
35+
"hashDigest":"70e79c1f12ff3c8c955bc2178a542b5994a21be163dd7655af2c5308d2643323",
36+
"hashAlgorithm":"blake2b-256"
37+
}
38+
},
39+
{
40+
"@type":"Other",
41+
"label":"CIP-108",
42+
"uri":"https://github.com/cardano-foundation/CIPs/blob/master/CIP-0108/README.md",
43+
"referenceHash":{
44+
"hashDigest":"68e09c1f22ff3c8c555b7bs78ac42s599ah61be163dd7655af2c73fhd7263379",
45+
"hashAlgorithm":"blake2b-256"
46+
}
47+
},
48+
{
49+
"@type":"Other",
50+
"label":"CIP-112",
51+
"uri":"https://github.com/cardano-foundation/CIPs/blob/master/CIP-0112/README.md",
52+
"referenceHash":{
53+
"hashDigest":"97e09f6fv2zf3c8c7d3b7hs8bacf5s5h7ahklbe163dd7655af2c73fhd72hu8s4",
54+
"hashAlgorithm":"blake2b-256"
55+
}
56+
}
57+
],
58+
"comment":"This is a test vector for CIP-100",
59+
"externalUpdates":[
60+
{
61+
"title":"cardano-node-tests",
62+
"uri":"https://github.com/IntersectMBO/cardano-node-tests"
63+
},
64+
{
65+
"title":"cardano-node",
66+
"uri":"https://github.com/IntersectMBO/cardano-node"
67+
},
68+
{
69+
"title":"cardano-db-sync",
70+
"uri":"https://github.com/IntersectMBO/cardano-db-sync"
71+
}
72+
]
73+
}
74+
}

0 commit comments

Comments
 (0)