Author: Joost Jager 2021-09-23 09:48:06
Published on: 2021-09-23T09:48:06+00:00
The conventional approach to generating invoices on a node involves storing the invoice together with order details in a database. However, this setup requires protection against unbounded generation of payment requests and needs rate limiting. To avoid this, Redis can be used as an alternative. Another option is using elkrem or shachain to generate deterministic payment hashes without the need for state at all. It can also be beneficial to add more data into the hash function such as the payment amount and the order details. The service could maintain a unique elkrem/shachain state for each unique user to collapse the pre-image into the hash chain, which lets them save space and reproduce a given "proof that someone in the world paid" statement dynamically.
Updated on: 2023-06-03T05:54:34.986120+00:00