The_Ben on Nostr: To summarise briefly: The election was not secret. Anyone can look up the events on ...
To summarise briefly:
The election was not secret. Anyone can look up the events on the relays we use and check whether the respective nostr keys have also voted for the person in question.
The election was not yet super decentralised, as we only used our own internal relays because I was experimenting with two new event kinds. I would like to find out from real Nostr developers whether this was at all useful and whether someone can build a professional NIP or something similar from it. The storage format is also open to discussion. For the time being, I pragmatically used something that worked for me.
So we're talking more about a first proof of concept attempt to see how it works without email etc. In other words, we validate Nostr accounts and see whether it really is our active members who are signing Nostr events.
The whole issue of whether a Nostr key has been compromised is not yet part of this.
You will find the code here:
https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr/blob/master/resources/views/pages/association/election/%5BElection%3Ayear%5D.blade.php $note->setKind($board ? 2121 : 32122);
if (!$board) {
$dTag = sprintf('%s,%s,%s', $this->currentPleb->pubkey, date('Y'), $type);
$note->setTags([['d', $dTag]]);
}
I have simply invented two new custom kinds. The president was a replaceable event 32122 and the confirmation of the board members was an event 2121.
I used simple ‘content’ to store which pubkey has voted how: $note->setContent(‘$pubkey,$type’);
This can be rubbish and would be better packaged professionally in a NIP design.
I'm not sure how to do this ‘properly’ with a NIP.
Published at
2024-10-21 12:57:32Event JSON
{
"id": "34846c60ac9dec1fb6bc03aa3658b6bc71788f198c6562693265bca5f69eec31",
"pubkey": "0adf67475ccc5ca456fd3022e46f5d526eb0af6284bf85494c0dd7847f3e5033",
"created_at": 1729515452,
"kind": 1,
"tags": [
[
"client",
"gossip"
],
[
"p",
"3ffac3a6c859eaaa8cdddb2c7002a6e10b33efeb92d025b14ead6f8a2d656657"
],
[
"p",
"19e358b8011f5f4fc653c565c6d4c2f33f32661f4f90982c9eedc292a8774ec3"
],
[
"p",
"031ea306188fee631a86f1a0e49cee8f3d62592b2e7be5f8eb1788e327db340a"
],
[
"p",
"7acf30cf60b85c62b8f654556cc21e4016df8f5604b3b6892794f88bb80d7a1d"
],
[
"p",
"430169631f2f0682c60cebb4f902d68f0c71c498fd1711fd982f052cf1fd4279"
],
[
"e",
"2e6665b710afa4c670548b0db13e9ce4e3a3fb704965d13f396fc89be4a99b29",
"wss://ditto.girino.org/relay",
"root"
],
[
"e",
"f14c841d0e3d1ec70109a19e97e726b23d92e04d31a5ac9bcfd142f567cfb1d8",
"wss://wot.utxo.one/",
"reply"
]
],
"content": "To summarise briefly:\nThe election was not secret. Anyone can look up the events on the relays we use and check whether the respective nostr keys have also voted for the person in question.\n\nThe election was not yet super decentralised, as we only used our own internal relays because I was experimenting with two new event kinds. I would like to find out from real Nostr developers whether this was at all useful and whether someone can build a professional NIP or something similar from it. The storage format is also open to discussion. For the time being, I pragmatically used something that worked for me.\n\nSo we're talking more about a first proof of concept attempt to see how it works without email etc. In other words, we validate Nostr accounts and see whether it really is our active members who are signing Nostr events.\n\nThe whole issue of whether a Nostr key has been compromised is not yet part of this.\n\nYou will find the code here: https://github.com/HolgerHatGarKeineNode/einundzwanzig-nostr/blob/master/resources/views/pages/association/election/%5BElection%3Ayear%5D.blade.php\n\n $note-\u003esetKind($board ? 2121 : 32122);\n if (!$board) {\n $dTag = sprintf('%s,%s,%s', $this-\u003ecurrentPleb-\u003epubkey, date('Y'), $type);\n $note-\u003esetTags([['d', $dTag]]);\n }\n\nI have simply invented two new custom kinds. The president was a replaceable event 32122 and the confirmation of the board members was an event 2121.\n\nI used simple ‘content’ to store which pubkey has voted how: $note-\u003esetContent(‘$pubkey,$type’);\n\nThis can be rubbish and would be better packaged professionally in a NIP design.\n\nI'm not sure how to do this ‘properly’ with a NIP.\n",
"sig": "17abf4d8ae98ef613491cc171f7e3bf2b5943ef5a8b849ae13e6bd51bb62f969825e925b89c426d42a21942820b6301d0c34e79b95be9f671aef9290b019377a"
}