https://m.primal.net/HPqh.png It was a productive Friday and I have great news! - I fixed the mining bug so all constructs will now be valid. - noble/hashes/sha256 is not broken; it was my mistake 😋 - you can now clear out old mined-but-unpublished constructs with the click of a button - the default mining target is now the center of Ideaspace. I've annotated the code with an explanation of how I determined the center coordinate. You can change your target to the center of Dataspace by changing the final F to an E. Give it a go at https://construct.onosendai.tech and claim your place in #cyberspace! #ONOSENDAI #Dataspace #Ideaspace #POW
What ended up being the fix for the sha256 issue? Sounded like a weird bug
It was self-inflicted. I was accidentally editing the hash after the sha256 instead of copying it and then editing it for a calculation.
haha, copy() is your friend. if it's golang, then yeah, nasty race conditions if you operate on returned slices and the sending code reuses it. ooh nelly. tends to be an issue when the library has zero copy and memory allocation avoidance built into it but if it's written properly it loudly warns you to not mutate the result. actually, when i write such things if it's just a hash at the end better to return a copy and not have to worry about this bug at all.
https://image.nostr.build/576e8b2b01def8e07457e771bdd417837ff45dcc1ef0d0b07ffe66b86e6d3fbf.jpg
I think I added a default relay that requires whitelisting. It should still publish though.
Yup, it’s working! Is it possible to see all constructs at once?
Not yet! I'll be adding that, or if you want to try contributions are welcome! https://github.com/arkin0x/construct-miner