The preimage exists ONLY when you settle an invoice.
I did. and his response is that I am somehow tampering with the preimage. But the preimage is generated by the paying customer's lightning node, nothing to do with me!
And as said before. When you pay an invoice, the call goes through YOUR WALLET SOFTWARE, which connects to a node THAT I DO NOT OWN. So how could I possibly tamper with the preimage generation?
FWIW this is false.
Yes it's true the preimage for us only "exists" is known once the invoice is settled, because YOU have to
reveal it in order to claim the payment that was made to the payment_hash (a hash of the PREIMAGE)
The preimage, so in fact, the input, is generated by lightning and nothing to do with us. Hence fair.
It's generated by your lightning software, but
various implementations will allow you to set a custom preimage, and even if they didn't there'd be a way to do so.
I am open to tweak my implementation if it can be proven unambiguously that a seed off a preimage can be tampered with, based on my current description of matters
I'm thinking: since a preimage is just the equivalent of a random sha hash, you could start with a good secret and then make a hash of a hash n times, and replay that. Once the new bet is placed you can reveal the old hash to everyone in order to prove you're not alternating between hash chains.
Now that I think about it, this might be less than ideal since the kth+1 hash will be the payment_hash of the kth hash, though I don't see how this could be exploited really, just a funny gimmick.
I think you genuinely seem to misunderstand how payments are done through the lightning network, so I don't really get all the negative connotation in this thread here.