juraj on Nostr: This is the signal The price is the noise Amazing! ...
This is the signal
The price is the noise
Amazing!
The price is the noise
Amazing!
quoting nevent1q…qpxcThe proof is the combination of an unblinded secret and unblinded signature from the mint. This is an ecash token. It is "proof" that the mint signed a piece of data.
In order to generate this proof I had to initialize a cashu mint on pool startup, encode the keyset (list of pubkeys the mint uses to sign with) into custom Sv2 types and send it downstream to the proxy server. The proxy server then generates a blinded secret when a share is found that exceeds the pool difficulty threshold and sends it upstream to the pool to sign. The pool validates the proof of work mining share, signs the blinded secret, and sends the signature back downstream to the proxy. The proxy receives the blinded signature, unblinds it, unblinds the secret, and combines these two pieces of data into a "proof" or an ecash token. Or in this case, an ehash token.
All of the communication of ecash structures is done with custom encodings. This was the real lift here. Lots to do still. I need to push all of the proxy cashu state into the wallet. I also need to figure out how to encode multiple keys in a keyset. I was stuck on that for a while but gave up and just pared it down to a single key to get proofs working.
SRI encodings are very confusing. They support serde and no_serde, fixed length types, and variable length types, but for some reason you can't mix and match. You can't just write a to_bytes() function either if you want it to play nice with existing messaging, which I do because I want the mining share and ecash primitives to be atomic. You have to implement all these encoding traits that are frankly hard for me follow in the code because I suck at rust. This is all expected. You gotta walk before you run. This screenshot is like baby's first steps.
Once it's working cleanly with the wallet I might try to integrate it into a real cashu mint and start generating tradable ehash tokens. I think it would be pretty rad to be able to mine up some ehash tokens and send them to people. Once people see it in their wallet they will have a much easier time understanding what I'm trying to build. It's totally a shitcoin until I build redemptions, but definitely a good marketing tool.