stop duplicating payload in the body of the event #2

Merged
fiatjaf merged 1 commit from patch-2 into master 2024-07-09 15:14:56 +12:00
fiatjaf commented 2024-07-09 14:55:23 +12:00 (Migrated from github.com)

Sorry, I edited this file on GitHub so it's probably broken, but I don't know if this is correct. Are you taking the same content sent in the body of the POST and putting it inside the event which is then base64d and sent as a header? This feels wrong, I think we can get away with just the hash of the content, no?

Also, maybe we should remove the URL and method from the tags because they're completely irrelevant (I know NIP-98 mentions them, but still we gain nothing by following that).

Sorry, I edited this file on GitHub so it's probably broken, but I don't know if this is correct. Are you taking the same content sent in the body of the POST and putting it inside the event which is then base64d and sent as a header? This feels wrong, I think we can get away with just the hash of the content, no? Also, maybe we should remove the URL and method from the tags because they're completely irrelevant (I know NIP-98 mentions them, but still we gain nothing by following that).
mikedilger commented 2024-07-09 15:14:40 +12:00 (Migrated from github.com)

Oh shit! Good catch. That was not what I thought I had done. I must be having Joe Biden moments.

Oh shit! Good catch. That was not what I thought I had done. I must be having Joe Biden moments.
mikedilger commented 2024-07-09 15:20:29 +12:00 (Migrated from github.com)

The url and method limit the scope of replays. But if all commands are idempotent (and I think they are) then it doesn't really matter. So we could remove them. Or we could just pare it back to the host which limits replay onto other hosts running the same software.

The url and method limit the scope of replays. But if all commands are idempotent (and I think they are) then it doesn't really matter. So we could remove them. Or we could just pare it back to the host which limits replay onto other hosts running the same software.
fiatjaf commented 2024-07-09 15:23:58 +12:00 (Migrated from github.com)

OK, I think the host makes sense. I hadn't thought about replays. Let's do that. I should write this on the NIP.

The full URL and method don't really do anything since they're always the same, no?

OK, I think the `host` makes sense. I hadn't thought about replays. Let's do that. I should write this on the NIP. The full URL and method don't really do anything since they're always the same, no?
mikedilger commented 2024-07-09 17:41:53 +12:00 (Migrated from github.com)

The full URL and method don't really do anything since they're always the same, no?

Right.

> The full URL and method don't really do anything since they're always the same, no? Right.
Sign in to join this conversation.
No description provided.