Error: invalid plaintext size: must be between 1 and 65535 bytes on /verify page #260

Closed
opened 2024-11-21 12:49:54 +00:00 by m · 2 comments
Owner

image

How to reproduce

Currently, no stable steps are known, it happens intermittently.

The error happens here in the nostr-tools library: a8a805fb71/nip44.ts (L42)

In our app it's being called from: https://git.nostrdev.com/sigit/sigit.io/src/branch/staging/src/pages/verify/index.tsx#L344

![image](/attachments/16ffe5de-b9cb-48da-9d8e-004473a7b42f) ## How to reproduce Currently, no stable steps are known, it happens intermittently. The error happens here in the `nostr-tools` library: https://github.com/nbd-wtf/nostr-tools/blob/a8a805fb712a19f59da5dc752cde21bc72af0209/nip44.ts#L42 In our app it's being called from: https://git.nostrdev.com/sigit/sigit.io/src/branch/staging/src/pages/verify/index.tsx#L344
m self-assigned this 2024-11-21 12:54:57 +00:00
Member

After investigating further today, I am fairly certain that issue happens after timestamps get verified. The size of the timestamps array is couple of thousands of bytes but once they are verified each timestamp gets a signed event attributed to it and each signed event as a string is about 15k bytes which adds up quickly with multiple signers.

Behavior that I have noticed while testing was that only a couple of initial timestamps would get verified and update the sigit meta before we hit the size cap.

The issue is also made complicated since the actual timestamp verification is dependent on the open timestamps and we have to wait for verification.

After investigating further today, I am fairly certain that issue happens after timestamps get verified. The size of the timestamps array is couple of thousands of bytes but once they are verified each timestamp gets a signed event attributed to it and each signed event as a string is about 15k bytes which adds up quickly with multiple signers. Behavior that I have noticed while testing was that only a couple of initial timestamps would get verified and update the sigit meta before we hit the size cap. The issue is also made complicated since the actual timestamp verification is dependent on the open timestamps and we have to wait for verification.
Owner

The obvious fix for this is to stop signing the meta.json inside nostr events

Instead we should encrypt and load it to blossom, and send the link instead

This fixes all of our size signing issues (including markSignatures)

The obvious fix for this is to stop signing the meta.json inside nostr events Instead we should encrypt and load it to blossom, and send the _link_ instead This fixes all of our size signing issues (including markSignatures)
m was unassigned by b 2024-12-02 09:59:51 +00:00
enes was assigned by b 2024-12-02 09:59:51 +00:00
enes added this to the MVP project 2024-12-13 11:04:14 +00:00
b closed this issue 2024-12-18 11:46:57 +00:00
enes moved this to Done in MVP on 2025-01-20 19:18:15 +00:00
enes moved this to Done in MVP on 2025-01-20 19:19:31 +00:00
enes moved this to Done in MVP on 2025-01-20 19:34:21 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:33 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:36 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:38 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:40 +00:00
enes moved this to Done in MVP on 2025-01-22 16:11:43 +00:00
enes moved this to Done in MVP on 2025-01-24 09:37:11 +00:00
Sign in to join this conversation.
No description provided.