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
Make callback attachment and fee charging atomic #1907
AddActionCallback charges 5,000 lamports before validating the scheduled intent and callback. A later error can therefore leave a fee transfer without attaching a callback if a native caller catches the CPI error and returns success.
Observed at Validator v2.0.0-rc.2 (377a086af0cffd72cb24a19ee94bafadbc4ed25a), with Engine b3b3d15163f8d219255605126c5c92aba30121dd:
A local native-CPI reproduction caught InvalidAccountData from an empty context and returned outer success. One/two calls transferred 5,000/10,000 lamports to the protocol vault while the context stayed unchanged and no callback was scheduled.
Treat this as an unlikely correctness issue / technical debt, not an established deployed attack path. The reproduction requires the payer signature and delegated payer/vault accounts, and uses a test-only native caller. No deployed SBF caller or production exploit was demonstrated; the recipient is the protocol vault.
Outcome
Failed callback attachment leaves both the context and fee balances unchanged; successful attachment charges exactly once. Complete validation and fallible preparation before publishing account changes, including serialization/capacity checks and both fee-balance calculations. Moving the charge below validation alone still leaves serialization failures after the charge.
Activity