Global Feed Post Login
Replying to Avatar PABLOF7z

nostr clients always have this tension between:

✅ verifying signatures (bad performance)

🙃 "trust me bro" (no checking)

I INTRODUCE TO YOU... FRACTIONS! 😂

Next version of NDK is shipping with SO many performance tricks and improvements that I have zero chance of remembering what they were when I write the release notes.

But one of them is that.. fractions.

Developers will be able to configure a ratio of events to verify on a per-relay basis. For example, you could say "only verify 10% of events coming from each relay"

The cool part is that I can also compare signatures coming from different relays for the same event so evil relays can be detected even faster and kicked out.

I will make it possible later to save state of the "reputation" each client perceives of a relay, so that a client can start talking to a new relay with a higher ratio (e.g. 1.0 = "verify everything") and slowly transition to trusting the relay more (i.e. verify 1% of events).

Avatar
the axiom 1y ago

Another thing you could do is load a bunch of events first and then later perform a BIP-340 batch signature verification on all of them together.

Reply to this note

Please Login to reply.

Discussion

Avatar
PABLOF7z 1y ago

that's a very cool idea; I just added async signature verification for performance, this fits great in that setup

🔥

Avatar
fiatjaf 1y ago

I guess that's not a very big idea:

Thread collapsed
Thread collapsed