Skip to content

Commit

Permalink
add examples of jsons for double voting
Browse files Browse the repository at this point in the history
  • Loading branch information
mpoke committed Dec 8, 2023
1 parent b9a98e2 commit 83eb7d2
Showing 1 changed file with 213 additions and 0 deletions.
213 changes: 213 additions & 0 deletions docs/docs/features/slashing.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,219 @@ Use the following command to submit evidence of double signing attacks:
gaiad tx provider submit-consumer-double-voting [path/to/evidence.json] [path/to/infraction_header.json] --from node0 --home ../node0 --chain-id $CID
```

<details>
<summary>Example of `evidence.json`</summary>
<div>
<div>
```json
{
"vote_a": {
"type": 1,
"height": 25,
"round": 0,
"block_id": {
"hash": "tBBWTqjECl31S/clZGoxLdDqs93kTvy3qhpPqET/laY=",
"part_set_header": {
"total": 1,
"hash": "ai2qCLgVZAFph4FJ4Cqw5QW1GZKR4zjOv0bI/Um5AIc="
}
},
"timestamp": "2023-11-20T12:57:54.565207Z",
"validator_address": "aCG1hw85Zz7Ylgpsy263IJVJEMA=",
"signature": "y9yILm9hmv45BZwAaaq9mS1FpH7QeAIJ5Jkcc3U2/k5uks9cuqr4NTIwaIrqMSMKwxVyqiR56xmCT59a6AngAA=="
},
"vote_b": {
"type": 1,
"height": 25,
"round": 0,
"block_id": {
"hash": "3P06pszgPatuIdLTP5fDWiase4SYHIq9YXGSbRk9/50=",
"part_set_header": {
"total": 1,
"hash": "S+SbOMxFRzfeNNpX9/jyFMz94VwBKk7Dpx6ZyvSYyNU="
}
},
"timestamp": "2023-11-20T12:57:54.599273Z",
"validator_address": "aCG1hw85Zz7Ylgpsy263IJVJEMA=",
"validator_index": 0,
"signature": "DGFcn4Um1t2kXW60+JhMk5cj7ZFdE5goKVOGiZkLwnNv43+6aGmOWjoq0SHYVzM4MwSwOwbhgZNbkWX+EHGUBw=="
},
"total_voting_power": 300,
"validator_power": 100,
"timestamp": "2023-11-20T12:57:51.267308Z"
}
```
</div>
</div>
</details>

<details>
<summary>Example of `infraction_header.json`</summary>
<div>
<div>
```json
{
"signed_header": {
"header": {
"version": {
"block": 11,
"app": 2
},
"chain_id": "consumer",
"height": 22,
"time": "2023-11-20T12:57:40.479686Z",
"last_block_id": {
"hash": "L63hyLJ+y9+fpb7WYKdmmBhPHwbfEGQEuKmvGzyBPiY=",
"part_set_header": {
"total": 18,
"hash": "euzRQjN7MjGtM6skXM4B8wOgAldWGfZSJRA9JRlO42s="
}
},
"last_commit_hash": "qdDJwVziW3pPqmf8QDGZG+5HVd3OF7fCVh2Z8KQqNVU=",
"data_hash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
"validators_hash": "pVc+gSYkGesaP3OkK4ig3DBi4o9/GCdXGtO/PQ6i/Ik=",
"next_validators_hash": "pVc+gSYkGesaP3OkK4ig3DBi4o9/GCdXGtO/PQ6i/Ik=",
"consensus_hash": "BICRvH3cKD93v7+R1zxE2ljD34qcvIZ0Bdi389qtoi8=",
"app_hash": "Yu3HX62w7orbbY/pm2QEK7yIwR+AlNdjSSqiK1kmuJM=",
"last_results_hash": "Yu3HX62w7orbbY/pm2QEK7yIwR+AlNdjSSqiK1kmuJM=",
"evidence_hash": "47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU=",
"proposer_address": "aCG1hw85Zz7Ylgpsy263IJVJEMA="
},
"commit": {
"height": 22,
"round": 1,
"block_id": {
"hash": "PKrS32IEZoFY2q2S3iQ68HQL751ieBhf5Eu/Y5Z/QPg=",
"part_set_header": {
"total": 1,
"hash": "8UuA7Oqw5AH/KOacpmHVSMOIDe4l2eC8VmdH2mzcpiM="
}
},
"signatures": [
{
"block_id_flag": 2,
"validator_address": "aCG1hw85Zz7Ylgpsy263IJVJEMA=",
"timestamp": "2023-11-20T12:57:44.076538Z",
"signature": "bSOH4+Vg2I37zeJphOguGOD0GK3JzM1ghSgJd0UlW/DHn1u9Hvv4EekHuCu6qwRLZcuS/ZxNlmr9qYNfxX3bDA=="
},
{
"block_id_flag": 2,
"validator_address": "i/A830FM7cfmA8yTn9n3xBg5XpU=",
"timestamp": "2020-01-02T00:07:00Z",
"signature": "7bXSDtlOwGK/gLEsFpTWOzm2TFoaARrWQUpbgWEwKtLlUs7iE06TOvJ3yPPfTfqqN/qYnvxxgjl0M0EhUWu5Bg=="
},
{
"block_id_flag": 2,
"validator_address": "lrQDkJ2fk7UAgNzRZfcwMKSYa2E=",
"timestamp": "2023-11-20T12:57:44.076519Z",
"signature": "Pb6G4bCg4wafmV89WNnzXxbSCknZUHnSQfSCE5QMFxPtSUIN4A7SK5m7yltqMJF5zkyenlFiEI4J3OZ4KCjCAw=="
},
{
"block_id_flag": 2,
"validator_address": "+R94nXSeM1Z49e/CXpyHT3M+h3k=",
"timestamp": "2023-11-20T12:57:44.057451Z",
"signature": "j3EasIHNYA6MxW/PiWyruzHsjVsBV9t11W6Qx800WMm/+P+CkfR+UZAp7MPTvKZEZFuh3GUsBtyfb/vA+jJWCw=="
}
]
}
},
"validator_set": {
"validators": [
{
"address": "aCG1hw85Zz7Ylgpsy263IJVJEMA=",
"pub_key": {
"ed25519": "dtn+SfD+4QLo0+t0hAoP6Q2sGjh0XEI3LWVG+doh3u0="
},
"voting_power": 100,
"proposer_priority": -200
},
{
"address": "lrQDkJ2fk7UAgNzRZfcwMKSYa2E=",
"pub_key": {
"ed25519": "UgN2JsjPy2WLh7dzJRBkUQtdgNoT4/uGj7kbIVqqHT8="
},
"voting_power": 100,
"proposer_priority": 100
},
{
"address": "+R94nXSeM1Z49e/CXpyHT3M+h3k=",
"pub_key": {
"ed25519": "5svW8261x+cZosp2xIhqzgt2tyuawrSDyHlpbgS3BC4="
},
"voting_power": 100,
"proposer_priority": 100
},
{
"address": "aCG1hw85Zz7Ylgpsy263IJVJEMA=",
"pub_key": {
"ed25519": "dtn+SfD+4QLo0+t0hAoP6Q2sGjh0XEI3LWVG+doh3u0="
},
"voting_power": 100,
"proposer_priority": -200
}
],
"proposer": {
"address": "VUz+QceJ8Nu7GbJuVItwsfVjybA=",
"pub_key": {
"ed25519": "0s8KDTgEcwmOBrHWvV7mtBlItJ3upgM1FJsciwREdy4="
},
"voting_power": 1,
"proposer_priority": -3
}
},
"trusted_height": {
"revision_height": 18
},
"trusted_validators": {
"validators": [
{
"address": "VUz+QceJ8Nu7GbJuVItwsfVjybA=",
"pub_key": {
"ed25519": "0s8KDTgEcwmOBrHWvV7mtBlItJ3upgM1FJsciwREdy4="
},
"voting_power": 1,
"proposer_priority": -3
},
{
"address": "i/A830FM7cfmA8yTn9n3xBg5XpU=",
"pub_key": {
"ed25519": "FCmIw7hSuiAoWk/2f4LuGQ+3zx5101xiqU8DoC5wGkg="
},
"voting_power": 1,
"proposer_priority": 1
},
{
"address": "2DrZF0roNnnvEy4NS2aY811ncKg=",
"pub_key": {
"ed25519": "MI9c6sphsWlx0RAHCYOjMRXMFkTUaEYwOiOKG/0tsMs="
},
"voting_power": 1,
"proposer_priority": 1
},
{
"address": "73aN0uOc5b/Zfq2Xcjl0kH2r+tw=",
"pub_key": {
"ed25519": "gWNcDup4mdnsuqET4QeFRzVb+FnSP4Vz3iNMj5wvWXk="
},
"voting_power": 1,
"proposer_priority": 1
}
],
"proposer": {
"address": "VUz+QceJ8Nu7GbJuVItwsfVjybA=",
"pub_key": {
"ed25519": "0s8KDTgEcwmOBrHWvV7mtBlItJ3upgM1FJsciwREdy4="
},
"voting_power": 1,
"proposer_priority": -3
}
}
}
```
</div>
</div>
</details>

Use the following command to submit evidence of light client attacks:
```bash
gaiad tx provider submit-consumer-misbehaviour [path/to/misbehaviour.json] --from node0 --home ../node0 --chain-id $CID
Expand Down

0 comments on commit 83eb7d2

Please sign in to comment.