-
Notifications
You must be signed in to change notification settings - Fork 203
Closed
Description
🐞 Bug Report
Scheduled transactions fail when using MonotonicEmulator chain (e.g., with SimpleAddresses=true), causing the error:
"Could not find Execute Scheduled Transactions Capability in storage"
This primarily affects the Cadence test framework (see onflow/flow-cli#2181).
Root Cause
The FVM bootstrap only issues the scheduled transaction executor capability for transient chains:
Lines 837 to 849 in 8b69d4c
| // TODO: JanezP this could be controlled by a flag instead of a hidden check here | |
| if b.ctx.Chain.ChainID().Transient() { | |
| sc := systemcontracts.SystemContractsForChain(b.ctx.Chain.ChainID()) | |
| txBody, err = blueprints.IssueScheduledTransactionExecutorTransaction(b.ctx.Chain, sc.ScheduledTransactionExecutor.Address) | |
| if err != nil { | |
| panic(fmt.Sprintf("failed to create scheduled transaction executor transaction: %s", err)) | |
| } | |
| txError, err = b.invokeMetaTransaction( | |
| b.ctx, | |
| Transaction(txBody, 0), | |
| ) | |
| panicOnMetaInvokeErrf("failed to create scheduled transaction executor: %s", txError, err) | |
| } |
MonotonicEmulator is not in the Transient() list, even though it's only used for testing/emulator purposes like Emulator.
Solution
Add MonotonicEmulator to the Transient() function alongside Emulator.
Context
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels