Feat/solana no kora - #41
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Want higher recall? High effort reviews run extra passes and find more bugs. A team admin can switch effort levels in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9784af9. Configure here.
| seller: s.signer.address, | ||
| clientAddress: s.clientAddress, | ||
| terms, | ||
| }); |
There was a problem hiding this comment.
Subscription terms account mismatch
Medium Severity
setBudgetViaSubscriptionHook builds remaining accounts from terms (only set when subscriptionTerms is passed), but still puts caller-encoded rawOptParams into the instruction when that field is absent. effectiveTerms is already decoded from those bytes for pre-create, so a standalone subscription setBudget that supplies 16-byte terms only via optParams sends proposing params with the minimal no-op account set and fails on-chain.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 9784af9. Configure here.
| args.providerAddress, | ||
| subExpiryPackageId, | ||
| ); | ||
| const acct = await fetchMaybeSubscriptionExpiry(rpc, subExpiryAddr); |
There was a problem hiding this comment.
Stale subscription active check
High Severity
preCreateHookRentPdas reads sub_expiry via fetchMaybeSubscriptionExpiry without ACP_COMMITMENT. Generated fetchers default to finalized, so a subscription that is already active at confirmed can be missed. The guard then pre-creates a zeroed proposed_terms PDA that before_action never fills, and the next fund/submit hits InvalidJob — the failure mode this block was written to prevent.
Reviewed by Cursor Bugbot for commit 9784af9. Configure here.


Note
High Risk
Large changes to Solana job funding, escrow, subscription activation, and sponsored transaction submission—including multi-signer completes and automatic re-prepare retries—directly affect money movement and on-chain state correctness.
Overview
Solana multi-hook and subscription jobs are folded into the main
SolanaAcpClientandAcpAgentpath, replacing the standaloneSolanaMultiHookClient. Router and standalone subscription hooks get dedicated prepare/send branches (setBudget, fund, submit, reject, complete) with fan-out account layouts, hook PDA pre-creation for sponsorship, and transaction-size workarounds (ATA splits, persistent complete lookup tables,sendOptionson prepared txs).Agent-facing behavior changes include Solana
batchConfigureHooks, on-chain reads for subscription expiry / proposed terms / router hooks, structuredsubscriptionTermson setBudget for router jobs, andcompleteSubscriptionJob(provider co-sign + sponsored multi-signer send) instead of preparedcomplete()for subscription-activating hooks. Many Solana lifecycle sends now usewithRepreparewith a 600ms delay and broaderisStalePrepareErrordetection (CreateJob seeds races, configure lag, AccountNotInitialized / intent-close races).Constants and safety: updated Solana hook/router program IDs, mainnet router deployments,
MULTI_HOOK_COMPLETE_ALT_ADDRESSES, andgetChainFamilynow throwsUnknownChainIdErrorfor unregistered chain IDs. SharedencodeReasonBytes/encodeDeliverableBytescentralize 32-byte slot encoding. Generated ACP IDL gainspausedon acp state and related error renames;package-lock.jsonreflects dependency peer metadata cleanup.Reviewed by Cursor Bugbot for commit 9784af9. Bugbot is set up for automated code reviews on this repo. Configure here.