Event JSON
{
"id": "1922efe2fcb8c52ba6f502370d5507c01965fc85e92d8f04f78a3b16ba5d9aa1",
"pubkey": "e8ed3798c6ffebffa08501ac39e271662bfd160f688f94c45d692d8767dd345a",
"created_at": 1693627509,
"kind": 1,
"tags": [
[
"e",
"7518c8b2bf8a861a65475718fcff00e1726196bd38f6d8d7a6d35d0866e74160",
"",
"root"
],
[
"e",
"5e0a4de08f96cbfb85e8cb0da9fdb162ea77370bdc9c1d41eaa81e67588f18cc",
"",
"reply"
],
[
"p",
"e8ed3798c6ffebffa08501ac39e271662bfd160f688f94c45d692d8767dd345a"
],
[
"p",
"40de35bd773a71151a36d43c27664c4c9f34588c50008fe3101c4675ab9cfcff"
],
[
"r",
"https://github.com/arkin0x/construct-miner/blob/14103cc2d0c59571f59b254427c272e34c8dfdfc/src/workers/ConstructMiner.worker.js#L63"
],
[
"r",
"https://github.com/arkin0x/construct-miner/blob/14103cc2d0c59571f59b254427c272e34c8dfdfc/src/components/MinerController.tsx#L137"
]
],
"content": "I'm having a really weird problem... I'm using noble/hashes/sha256 to get my event id from my serialized event. Somehow, the hash I get is sometimes 0b10000000 less than it should be. \n\nexample:\nhash I get: ...2cce628 (invalid)\nvalid hash: ...2cce6a8\n\nHow is this even possible? Has anyone seen anything like this before? I'm using the bytesToHex util from noble as well.\n\nIf the input to the sha256 is different, I should get a completely different output. But I get a nearly identical output that is either off by 0b10000000 or it is perfect.\n\nMight have to do with the binary-to-hex string conversion? But I'm using noble utils for that too...\n\nHere is where I get the hash: https://github.com/arkin0x/construct-miner/blob/14103cc2d0c59571f59b254427c272e34c8dfdfc/src/workers/ConstructMiner.worker.js#L63\n\nAnd here is where I get the Event ID wiith bytesToHex: https://github.com/arkin0x/construct-miner/blob/14103cc2d0c59571f59b254427c272e34c8dfdfc/src/components/MinerController.tsx#L137",
"sig": "d6585b528377f57958468cfb54d576be4ae81391076d01a50e2a23b88827d59f9e5a329ec87b4e8ebb8eff4fa40c8595c71faff021cf3cee78a8c75e8c59842b"
}