Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

index zap senders with P tag #954

Merged
merged 1 commit into from
Jan 1, 2024
Merged

index zap senders with P tag #954

merged 1 commit into from
Jan 1, 2024

Conversation

pablof7z
Copy link
Member

A lot of blood has been shed by the lack of an index to find zaps sent by a pubkey.

Mutiny wallet is running a primal index server just to be able to run this simple query.

CHILDREN ARE DYING!

@TonyGiorgio
Copy link

We use primal for zaps sent and zaps received by collection of pubkeys.

Specifically interested in all economic activity by someone's follow list.

@benthecarman
Copy link
Contributor

Definite concept ack

@jb55
Copy link
Contributor

jb55 commented Dec 31, 2023

ack. huge oversight in the original spec.

@@ -128,7 +129,7 @@ The following should be true of the `zap receipt` event:

- The `content` SHOULD be empty.
- The `created_at` date SHOULD be set to the invoice `paid_at` date for idempotency.
- `tags` MUST include the `p` tag AND optional `e` tag from the `zap request` AND optional `a` tag from the `zap request`.
- `tags` MUST include the `p` tag (zap recipient) AND optional `e` tag from the `zap request` AND optional `a` tag from the `zap request` AND optional `P` tag from the pubkey of the zap request (zap sender).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the uppercase P can be pretty confusing, might be better as something like sender

@jb55
Copy link
Contributor

jb55 commented Dec 31, 2023 via email

@v0l
Copy link
Member

v0l commented Dec 31, 2023

Probably better if zap services can add this tag to the receipt and its not needed in zap request at all?

I already implemented this for snort / zap.stream zaps

@vitorpamplona
Copy link
Collaborator

LGTM

It is worth mentioning that the Zapper service can P-tag incorrectly and/or malicious actors can use this to spam everyone. In other words, the new tag is just a hint to who the sender is and not proof that that person sent it.

@v0l
Copy link
Member

v0l commented Dec 31, 2023

LGTM

It is worth mentioning that the Zapper service can P-tag incorrectly and/or malicious actors can use this to spam everyone. In other words, the new tag is just a hint to who the sender is and not proof that that person sent it.

zaps are not proof of anything

@benthecarman
Copy link
Contributor

Implemented in rust-nostr: rust-nostr/nostr#230

@yukibtc
Copy link

yukibtc commented Jan 1, 2024

I see the P tag really confusing.

What if we use the d tag, composed with a prefix + the pubkey? Something like: ["d", "zap-sender:<public-key>"]?

So the filter will be: { "kind": 9735, "#d": "zap-sender:<pk>" }

What do you think?

@benthecarman
Copy link
Contributor

For added context, if you look at my rust-nostr PR, this change is really ugly for typed languages where we already have a type defined for p, so we need to name this one UpperP

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants