FilOzone / FilOzone/filecoin-pay

Modification of rail lockup prevented unless same epoch as settlement

Open
#116 3 comments 0 reactions 0 assignees View on GitHub
discussion
Dominant language
Solidity
Stars
8
Forks
13
PR merge metrics
No merged PRs in 30d

Description

Modifying a rail lockup requires `isAccountLockupFullySettled`, but this is a bit confusingly named. It checks that the last settlement epoch is this epoch, but that's much stricter than whether the fixed lockup is settled. The error message "insufficient funds to cover the current lockup" is not necessarily correct.

https://github.com/FilOzone/filecoin-services-payments/blob/182b414d31005e6002c43eddfe7c4db344d1cdce/src/Payments.sol#L592-L603

Consider proceeding to optimistically change the lockup, and revert if necessary after calculating the actual funds needed.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in src/Payments.sol around lines 592-603 and trace how rail lockup modification uses isAccountLockupFullySettled. Review the settlement and funds-needed calculations before deciding how the lockup change should proceed. Done means valid modifications are not blocked solely by the settlement epoch, and insufficient-funds errors describe the actual requirement.

Written by the indexing model from the issue text.

Assessment

Tech stack
solidity
Domain
blockchain, payments
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.