-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add malfeasance proofs #259
Conversation
spacemesh/v1/mesh_types.proto
Outdated
SmesherId smesher = 1; | ||
string smesher_hex = 2; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these both encoding the NodeID? Can we remove one of the two (otherwise what would happen if they are not the same and both valid?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks. i think i will keep the hex version for UX.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would have gone with the other one for consistency 😅, but I'm OK with either as long as we only have one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so the machines (explorer/dashboard/smapp) will use the streaming API.
the query is mainly for human, hence the choice.
@brusherru |
## Motivation as title depends on spacemeshos/api#259 ## Changes - add MeshService.MalfeasanceStream and MeshService:MalfeasanceQuery - add malfeasance proof to ActivationService.Get - add own malfeasance proof to node event update ## output ``` { "proof": { "smesherId": { "id": "8JhffQsAWuCBQ8YRWrLpOj8tesNx/SKV611TDbPnXCA=" }, "layer": { "number": 8112 }, "kind": "MALFEASANCE_HARE", "debugInfo": "generate layer: 8112\nsmesher id: f0985f7d0b005ae08143c6115ab2e93a3f2d7ac371fd2295eb5d530db3e75c20\ncause: smesher published multiple hare messages in layer 8112 round 3\n1st message hash: 9c40b8789bad681d25081f85af7f9a4af87c5d70ac0637934b4e6fc935b9566c\n1st message signature: efdb895917b2303442a3b0c8f455c5cea79f8a2969af2c7f5b3bbbbfa09a77441e3d886e049f39dbf4dc0d49e78537fe3035de2d25d9d295f02c4928677ea107\n2nd message hash: d005c8ff6ece20cb87acc7ea97d5473559a3e197f9a66621505383132515a2ae\n2nd message signature: f3c014fd0f1353896222f22ee71b7fb2a10623394d4905b8ea447ac2e45350e487de04df71448cb19012b897728bb8580499b3e16a5edb546333b432a927d301\n" } } ```
## Motivation as title depends on spacemeshos/api#259 ## Changes - add MeshService.MalfeasanceStream and MeshService:MalfeasanceQuery - add malfeasance proof to ActivationService.Get - add own malfeasance proof to node event update ## output ``` { "proof": { "smesherId": { "id": "8JhffQsAWuCBQ8YRWrLpOj8tesNx/SKV611TDbPnXCA=" }, "layer": { "number": 8112 }, "kind": "MALFEASANCE_HARE", "debugInfo": "generate layer: 8112\nsmesher id: f0985f7d0b005ae08143c6115ab2e93a3f2d7ac371fd2295eb5d530db3e75c20\ncause: smesher published multiple hare messages in layer 8112 round 3\n1st message hash: 9c40b8789bad681d25081f85af7f9a4af87c5d70ac0637934b4e6fc935b9566c\n1st message signature: efdb895917b2303442a3b0c8f455c5cea79f8a2969af2c7f5b3bbbbfa09a77441e3d886e049f39dbf4dc0d49e78537fe3035de2d25d9d295f02c4928677ea107\n2nd message hash: d005c8ff6ece20cb87acc7ea97d5473559a3e197f9a66621505383132515a2ae\n2nd message signature: f3c014fd0f1353896222f22ee71b7fb2a10623394d4905b8ea447ac2e45350e487de04df71448cb19012b897728bb8580499b3e16a5edb546333b432a927d301\n" } } ```
## Motivation as title depends on spacemeshos/api#259 ## Changes - add MeshService.MalfeasanceStream and MeshService:MalfeasanceQuery - add malfeasance proof to ActivationService.Get - add own malfeasance proof to node event update ## output ``` { "proof": { "smesherId": { "id": "8JhffQsAWuCBQ8YRWrLpOj8tesNx/SKV611TDbPnXCA=" }, "layer": { "number": 8112 }, "kind": "MALFEASANCE_HARE", "debugInfo": "generate layer: 8112\nsmesher id: f0985f7d0b005ae08143c6115ab2e93a3f2d7ac371fd2295eb5d530db3e75c20\ncause: smesher published multiple hare messages in layer 8112 round 3\n1st message hash: 9c40b8789bad681d25081f85af7f9a4af87c5d70ac0637934b4e6fc935b9566c\n1st message signature: efdb895917b2303442a3b0c8f455c5cea79f8a2969af2c7f5b3bbbbfa09a77441e3d886e049f39dbf4dc0d49e78537fe3035de2d25d9d295f02c4928677ea107\n2nd message hash: d005c8ff6ece20cb87acc7ea97d5473559a3e197f9a66621505383132515a2ae\n2nd message signature: f3c014fd0f1353896222f22ee71b7fb2a10623394d4905b8ea447ac2e45350e487de04df71448cb19012b897728bb8580499b3e16a5edb546333b432a927d301\n" } } ```
## Motivation as title depends on spacemeshos/api#259 ## Changes - add MeshService.MalfeasanceStream and MeshService:MalfeasanceQuery - add malfeasance proof to ActivationService.Get - add own malfeasance proof to node event update ## output ``` { "proof": { "smesherId": { "id": "8JhffQsAWuCBQ8YRWrLpOj8tesNx/SKV611TDbPnXCA=" }, "layer": { "number": 8112 }, "kind": "MALFEASANCE_HARE", "debugInfo": "generate layer: 8112\nsmesher id: f0985f7d0b005ae08143c6115ab2e93a3f2d7ac371fd2295eb5d530db3e75c20\ncause: smesher published multiple hare messages in layer 8112 round 3\n1st message hash: 9c40b8789bad681d25081f85af7f9a4af87c5d70ac0637934b4e6fc935b9566c\n1st message signature: efdb895917b2303442a3b0c8f455c5cea79f8a2969af2c7f5b3bbbbfa09a77441e3d886e049f39dbf4dc0d49e78537fe3035de2d25d9d295f02c4928677ea107\n2nd message hash: d005c8ff6ece20cb87acc7ea97d5473559a3e197f9a66621505383132515a2ae\n2nd message signature: f3c014fd0f1353896222f22ee71b7fb2a10623394d4905b8ea447ac2e45350e487de04df71448cb19012b897728bb8580499b3e16a5edb546333b432a927d301\n" } } ```
## Motivation as title depends on spacemeshos/api#259 ## Changes - add MeshService.MalfeasanceStream and MeshService:MalfeasanceQuery - add malfeasance proof to ActivationService.Get - add own malfeasance proof to node event update ## output ``` { "proof": { "smesherId": { "id": "8JhffQsAWuCBQ8YRWrLpOj8tesNx/SKV611TDbPnXCA=" }, "layer": { "number": 8112 }, "kind": "MALFEASANCE_HARE", "debugInfo": "generate layer: 8112\nsmesher id: f0985f7d0b005ae08143c6115ab2e93a3f2d7ac371fd2295eb5d530db3e75c20\ncause: smesher published multiple hare messages in layer 8112 round 3\n1st message hash: 9c40b8789bad681d25081f85af7f9a4af87c5d70ac0637934b4e6fc935b9566c\n1st message signature: efdb895917b2303442a3b0c8f455c5cea79f8a2969af2c7f5b3bbbbfa09a77441e3d886e049f39dbf4dc0d49e78537fe3035de2d25d9d295f02c4928677ea107\n2nd message hash: d005c8ff6ece20cb87acc7ea97d5473559a3e197f9a66621505383132515a2ae\n2nd message signature: f3c014fd0f1353896222f22ee71b7fb2a10623394d4905b8ea447ac2e45350e487de04df71448cb19012b897728bb8580499b3e16a5edb546333b432a927d301\n" } } ```
## Motivation as title depends on spacemeshos/api#259 ## Changes - add MeshService.MalfeasanceStream and MeshService:MalfeasanceQuery - add malfeasance proof to ActivationService.Get - add own malfeasance proof to node event update ## output ``` { "proof": { "smesherId": { "id": "8JhffQsAWuCBQ8YRWrLpOj8tesNx/SKV611TDbPnXCA=" }, "layer": { "number": 8112 }, "kind": "MALFEASANCE_HARE", "debugInfo": "generate layer: 8112\nsmesher id: f0985f7d0b005ae08143c6115ab2e93a3f2d7ac371fd2295eb5d530db3e75c20\ncause: smesher published multiple hare messages in layer 8112 round 3\n1st message hash: 9c40b8789bad681d25081f85af7f9a4af87c5d70ac0637934b4e6fc935b9566c\n1st message signature: efdb895917b2303442a3b0c8f455c5cea79f8a2969af2c7f5b3bbbbfa09a77441e3d886e049f39dbf4dc0d49e78537fe3035de2d25d9d295f02c4928677ea107\n2nd message hash: d005c8ff6ece20cb87acc7ea97d5473559a3e197f9a66621505383132515a2ae\n2nd message signature: f3c014fd0f1353896222f22ee71b7fb2a10623394d4905b8ea447ac2e45350e487de04df71448cb19012b897728bb8580499b3e16a5edb546333b432a927d301\n" } } ```
No description provided.