I’m trying to figure out why his nostr.band stats aren’t working

https://nostr.band/npub1xr7t5h0l25ej73pm04zgz9afeexyzsjx67s5v0xxf2sshjn4sx6sep2gqh?overview=zaps-received

cc: nostr:npub1xdtducdnjerex88gkg2qk2atsdlqsyxqaag4h05jmcpyspqt30wscmntxy

Reply to this note

Please Login to reply.

Discussion

He broke it πŸ˜‚

I wonder if it's on a batch process and it wasn't ran yet?

Seems like LN invoices included by Primal in zap receipts have empty payment_hash field. The invoice parser I use discards those invoices as invalid. I guess I'll have to patch it, as this is an optional field for zap verification purposes - they generate a proper invoice for the actual payment.

They also strip the description/commit hash from the invoice in zap receipts, which seems to go against nip57: "SHA256(description) MUST match the description hash in the bolt11 invoice." It looks like I will have to strip this verification logic on my end since in practice many wallets violate nip57 anyway and everyone is just trusting the wallets.

cc nostr:nprofile1qy88wumn8ghj7mn0wvhxcmmv9uq3jamnwvaz7tmswfjk66t4d5h8qunfd4skctnwv46z7qgnwaehxw309ac82unsd3jhqct89ejhxtcpz4mhxue69uhhyetvv9ujuerpd46hxtnfduhsz9mhwden5te0wfjkccte9ehx7um5wghxyctwvshsz9mhwden5te0wfjkccte9ec8y6tdv9kzumn9wshsqgxkruautvltgsqwlkhxz6d9c972hueyddg5xcw7jwwwfgdqmfh0fg3uu6d7

i had to do the same, we should probably just drop that MUST

at the end of the day you have to trust the zapper anyways, verification of the bolt11 just makes faking the zap slightly harder but not impossible

yeah, zap verification always seemed like a lot of work for not much gain against real bad actors

Should I log your initial missing payment_hash for Primal team nostr:npub1xdtducdnjerex88gkg2qk2atsdlqsyxqaag4h05jmcpyspqt30wscmntxy ?

Maybe a table for "Zap verification" across clients, with problematic cases in comments? My guess is many clients do very little of it, and if they eventually start doing it they might stumble on the same issues.

Seems ok to me. Is Damus verifying event signatures now? And zaps too?

damus ios has always verified zaps. it also verifies profile signatures so that noone can fake profiles. also when constructing threads it walks nostrdb which verifies all notes. we just haven't completed the full nostrdb migration everywhere yet.

also be careful about albyhub zaps as well:

https://github.com/damus-io/damus/pull/2404

Thanks, that part works fine on my end

There you go