Err402 nginx P2PK locked ecash benchmark

https://github.com/DhananjayPurohit/ngx_l402

Client/Customers (left): Sending ecash locked to Servers Pubkey (simulating 32 tx/sec to nginx err402 endpoint)

Server (middle): Collecting ecash, once in a while redeem over lightning to the Providers LNURL (BOLT12 soon)

Provider (right): Get the earned sats via lightning

#soveng

nostr:npub1s0veng2gvfwr62acrxhnqexq76sj6ldg3a5t935jy8e6w3shr5vsnwrmq5

nostr:npub1qnw27f2jsqvn05wzpd56m7ykgmepk57p0yrzw8fzc7lfhjkmjmqqmd9r6h

nostr:npub12rv5lskctqxxs2c8rf2zlzc7xx3qpvzs3w4etgemauy9thegr43sf485vg

https://blossom.primal.net/fe693c5713b1e8ed60e70529ba1dad0a8803922c001c1410391eeaf19001d58a.mp4

Reply to this note

Please Login to reply.

Discussion

amazing, nice. do you know what the bottleneck is? could it go even faster?

Yes, we should get much faster. Collecting P2PK ecash takes less than1ms.

In this setup:

bottleneck 1) client-sever: 100ms latency (wlan, vpn, spain to germany) nginx on vps / 2 cores.

bottleneck 2) coinos mint: limits to 1.000 proofs each request.

Is it easy to setup different prices for different endpoints?

yes, default ms sats each endpoint (nginx.conf), and you can update via Redis “SET /protected 15000” default settings on the fly.

@DhananjayPurohit

correct me, if I am wrong.

Exactly right 👍

I have an idea but maybe someone smarter can flesh it out:

- Create some kind on nostr where we can broadcast these endpoints for discoverability

- Is it possible to give some receipt that I can use to prove I used the API that way any reviews sent on nostr can be verified as real users?

So that way I can search for API's over nostr and see that users who have spent a lot of money seem to be very happy with the service.

Can’t wait to experience this feature on 402.markets !

Impressive work bro solid integration and clear pipeline respect the hustle

Can I help with the project somehow?

Contributions are always welcome!

👉 https://github.com/DhananjayPurohit/ngx_l402

You can also build and list your own API on 402.markets:

👉 https://402.markets/