Prohibit double payments per epoch #218

Open
opened 2025-12-28 18:08:55 +00:00 by sami · 0 comments
Owner

Originally created by @carpawell on GitHub (Nov 21, 2025).

Nothing stops balance contract from paying for an epoch twice or more in any epoch.

Current Behavior

If IR sends two payment transations in a single epoch, SNs are paid twice.

Expected Behavior

Not more than one payment per epoch.

Possible Solution

Store container's last payment in the balance contract.

Steps to Reproduce

Call SettleContainerPayment twice in any epoch.

Context

https://github.com/nspcc-dev/neofs-node/pull/3650#discussion_r2545397656

Regression

Yes and no: previously IR controlled the number of payments, but now it's contract's responsibility, and it may be smarter.

Your Environment

v0.25.1

Originally created by @carpawell on GitHub (Nov 21, 2025). <!-- Provide a general summary of the issue in the Title above --> Nothing stops balance contract from paying for an epoch twice or more in any epoch. ## Current Behavior If IR sends two payment transations in a single epoch, SNs are paid twice. ## Expected Behavior Not more than one payment per epoch. ## Possible Solution Store container's last payment in the balance contract. ## Steps to Reproduce Call SettleContainerPayment twice in any epoch. ## Context https://github.com/nspcc-dev/neofs-node/pull/3650#discussion_r2545397656 ## Regression Yes and no: previously IR controlled the number of payments, but now it's contract's responsibility, and it may be smarter. ## Your Environment v0.25.1
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-contract#218
No description provided.