Erik on Nostr: They can't, because they assume that nonces are: - The very last thing in a 80 bytes ...
They can't, because they assume that nonces are:
- The very last thing in a 80 bytes digesg
- Binary (nostr uses strings)
Even if you make the nonce come at fhe end, and precompute the midstate for the first block. You still need to have a closing "] to make the json valid. While you could do accieve the latter by fixing the nonce range to keep the last bits fixed, you lose a lot of nonce space.
And again, your serialized note should be exactly 80 bytes
Published at
2024-09-22 21:31:12Event JSON
{
"id": "84ef60eff4cc131c99bd66122ce41abec981eabae66709a2674e18564d94c1cd",
"pubkey": "e0cfb5549d3cf7db4e2736f8e1bc84f62486af7a41295d867c6a313459042528",
"created_at": 1727040672,
"kind": 1,
"tags": [
[
"e",
"46277aecab67c75ab3450bdf827676bdbfcba2833c3fca61f83abdf3d6743218",
"",
"root"
],
[
"p",
"180c517f64f595b1e54bd2ce778ccc2a56b113e5a4b1426d4b0a439083010db1"
],
[
"p",
"180c517f64f595b1e54bd2ce778ccc2a56b113e5a4b1426d4b0a439083010db1"
],
[
"p",
"8685ebef665338dd6931e2ccdf3c19d9f0e5a1067c918f22e7081c2558f8faf8"
]
],
"content": "They can't, because they assume that nonces are:\n\n - The very last thing in a 80 bytes digesg\n - Binary (nostr uses strings)\n\nEven if you make the nonce come at fhe end, and precompute the midstate for the first block. You still need to have a closing \"] to make the json valid. While you could do accieve the latter by fixing the nonce range to keep the last bits fixed, you lose a lot of nonce space.\n\nAnd again, your serialized note should be exactly 80 bytes\n",
"sig": "7bbb0a45bb0c58809cb910e15fe812457cb8e7336c19ab6cc26b99b70fc04b1994d1e8025772d813e6f1c3c406be4fe3093c5a1cfe20f54409126ee03ebc25d1"
}