GM

This morning, I have an idea for Nostr Proxy.

Is it required for the proxy to validate schnorr signatures for each events?

Because stored events in relays are already validated and client validate events too when getting them.

So... is it required for the proxy to validate them?

Schnorr signature validation is really CPU intensive. It validates ~5000 events/min when opening 7 global feeds.

Reply to this note

Please Login to reply.

Discussion

I will start with caching validated events. It's not useful to validate signature of an already validated event.

If it's still to CPU intensive, I'll give up schnorr validation

I have disabled schnorr signature validation and... It works!

I have some peak at 100%+ sometimes, but it's under 10-20% all the time

Good question #[1]

What is the use case for the proxy? Dedupe/filter? Privacy?

- Having only 1 WS connection instead of X results in battery/bandwidth eco.

- Hide your IP address to relays (only the proxy knows your IP, but you can self host the proxy)

Out of curiosity, how did you setup railway to host the proxy? I tried using the environment variables that I’m using to run it locally, but it’s failing deploy. Is there a change in build commands or something else I’m missing?

First, I'm using a branch named "heap" for all my tests.

I'll merge as soon as I resolved perf issues (it should be ok very soon™️!)

Then I'll write a robust readme for deploying.

I can also make "Deploy on railway" button into the readme when it's ready.

I know they offer free credits for each deployments if the project is open source and has 100+ stars on github. It could be very great for me 😅

Anyway, I can send you a batch env example in DM, but it can change fast

Deploy on railway button would be awesome! Thanks so much, I’ll DM you now

Time to ⭐️ your repo

#[0]

Event is already validated on client and relay side. Not sure proxy should revalidate event

You could probably skip that

I disabled it yes