node
node copied to clipboard
Ensure payment exchange on session end
This is a low priority as it's more of a nice-to-have than a real prerequisite.
Due to the async nature of the payment system, a situation might occur where a consumers reported spending is larger than the actual amount that reaches hermes.
This happens in the following flow:
- Session is established.
- Payments occur normally for some time.
- Consumer received yet another invoice.
- Consumer starts calculating the amount to promise.
- Session is killed as operation 4) is happening.
- The promise is incremented but never issued as the session is aborted. This can happen due to promise not being sent, or provider not listening for further promises on the given topic.
- Hermes is not aware of the last promise, therefore the consumer and hermes reportings are different.
Under normal circumstances, such occurences should be VERY, VERY rare and the amount of myst involved is rather small. They should have no impact on the payment system as a whole.
We can, however, improve this by making sure that "last promise" is issued and reaches the provider before session end.
This was originally discovered while investigating #2984
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
No one will ever do this.