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
(Follow-up from filecoin-project/FIPs#1224 and filecoin-project/lotus#13471; this ticket is specifically about reducing the builtin-actors execution cost, while the Lotus issue tracks client-side gas-aware batching.)
We have seen SettleDealPaymentsExported messages large enough to consume a significant fraction of a block on their own, and they are expected to become more common as deal settlement tooling gets used more heavily.
settle_deal_payments loops over each deal ID here.
Each deal loads the proposal/state, serializes/hashes the proposal to a deal CID, calls get_active_deal_or_process_timeout, and then calls process_deal_updatehere.
process_deal_update transfers elapsed payment per deal here, and transfer_balance reloads and flushes the balance tables through unlock_balancehere.
The final deal-state and sector mapping writes are already batched through put_deal_states and remove_sector_deal_idshere and here, so the obvious investigation area is the repeated per-deal accounting / table load-flush work before those final batched writes.
Possible things to investigate:
Batch or aggregate payment/accounting table updates by client/provider where the settlement semantics allow it.
Avoid repeatedly loading/flushing the same escrow/locked balance tables inside a single settlement transaction.
Look for per-deal work that can be moved outside the loop, or avoided for common cases.
(Follow-up from filecoin-project/FIPs#1224 and filecoin-project/lotus#13471; this ticket is specifically about reducing the builtin-actors execution cost, while the Lotus issue tracks client-side gas-aware batching.)
We have seen
SettleDealPaymentsExportedmessages large enough to consume a significant fraction of a block on their own, and they are expected to become more common as deal settlement tooling gets used more heavily.Some examples:
SettleDealPaymentsExported, gas limit 6.41B, gas used 5.13B, included in 5 blocks.SettleDealPaymentsExported, gas limit 8.78B, gas used 7.02B, included in 2 blocks.SettleDealPaymentsExported, gas limit 6.89B, gas used 5.51B, included in 4 blocks.The actor path is:
settle_deal_paymentsloops over each deal ID here.get_active_deal_or_process_timeout, and then callsprocess_deal_updatehere.process_deal_updatetransfers elapsed payment per deal here, andtransfer_balancereloads and flushes the balance tables throughunlock_balancehere.put_deal_statesandremove_sector_deal_idshere and here, so the obvious investigation area is the repeated per-deal accounting / table load-flush work before those final batched writes.Possible things to investigate:
process_deal_update.This is similar in spirit to #1610: reducing the execution cost of high-fanout messages rather than relying only on senders to choose smaller batches.