You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Stop keeping the full payment history in memory #998
#269 tracks paginating Node::list_payments, and #959 adds that API. However, PaymentStore is still initialized with read_all_objects, and DataStore retains every PaymentDetails in a HashMap for the lifetime of the node. #960 makes the startup reads paginated, which avoids one unbounded list response, but it still reads and decodes the full payment namespace before the node is usable.
This means startup work and steady-state memory usage continue to grow with the complete payment history, even though callers retrieve that history page by page. This will become increasingly relevant for long-lived server deployments.
I’m interested in working on this. A fully lazy PaymentStore seems possible without a separate active index: skip loading payment history during build, read individual records from KV for get/update/duplicate checks, and have paginated listing read only the current page’s values.
PendingPaymentStore can remain memory-backed for operational on-chain state. This would require making payment reads fallible/async internally and deciding how Node::payment() should expose storage errors; it would also build on or adjust the still-open #959/#960 work.
Is that the intended direction, and should I coordinate the implementation with those PRs?
Is that the intended direction, and should I coordinate the implementation with those PRs?
Not quite sure, but for now we're intentionally holding off, so we're currently not moving forward with this until we landed all related open PRs and shipped v0.8.
Is that the intended direction, and should I coordinate the implementation with those PRs?
Not quite sure, but for now we're intentionally holding off, so we're currently not moving forward with this until we landed all related open PRs and shipped v0.8.
Activity
Jolah1 commentedon Jul 27, 2026
I’m interested in working on this. A fully lazy PaymentStore seems possible without a separate active index: skip loading payment history during build, read individual records from KV for get/update/duplicate checks, and have paginated listing read only the current page’s values.
PendingPaymentStore can remain memory-backed for operational on-chain state. This would require making payment reads fallible/async internally and deciding how Node::payment() should expose storage errors; it would also build on or adjust the still-open #959/#960 work.
Is that the intended direction, and should I coordinate the implementation with those PRs?
tnull commentedon Jul 28, 2026
Not quite sure, but for now we're intentionally holding off, so we're currently not moving forward with this until we landed all related open PRs and shipped v0.8.
Jolah1 commentedon Jul 29, 2026
Duly noted, Thank you.