0xMiden / 0xMiden/wallet-adapter
Pioneer wallet cannot execute cross-account procedure calls: "procedure with root digest could not be found"
- Linguagem predominante
- TypeScript
- Estrelas
- 2
- Forks
- 9
- Merge médio
- 25min
- PRs com merge (30d)
- 1
Descrição
### Packages versions
- @miden-sdk/miden-sdk: 0.15.3
- @miden-sdk/miden-wallet-adapter: 0.15.1
- @miden-sdk/react: 0.15.3
- miden-client: 0.15.3
- cargo-miden: 0.8.1
- Miden Wallet extension: 1.15.3 (Chrome)
### Bug description
When a web frontend calls `requestTransaction()` via the Pioneer wallet extension to invoke a procedure on a deployed smart contract account, the transaction fails at the kernel level with:
```WalletTransactionError: Error: failed to execute transaction: transaction execution failed: failed to execute transaction kernel program:
procedure with root digest 0x7ed76d95ac446cbaf23785cf3f581afefb81bd02e74b6e9f1758446c917e000f could not be found```
The same contract procedure is callable successfully via `miden-client` CLI. The issue appears to be that the Pioneer wallet's internal MAST forest only contains the user's own account procedures and does not fetch or cache the target contract's compiled procedures before execution.
**Expected:** Pioneer wallet resolves and executes procedures on external smart contract accounts (similar to how miden-client handles FPI).
**Actual:** Kernel cannot find the procedure by root digest → transaction fails → frontend falls back to CLI.
### How can this be reproduced?
1. Deploy a custom smart contract account on Miden testnet using cargo-miden
2. Build a React frontend using @miden-sdk/miden-sdk and @miden-sdk/miden-wallet-adapter
3. Connect Miden Wallet extension (v1.15.3) in Chrome
4. Call `requestTransaction()` with a `CustomTransaction` targeting the deployed contract's procedure hash
5. Observe the transaction fail in the browser console with `WalletTransactionError`
Note: The same contract procedure executes successfully via `miden-client` CLI.
### Relevant log output
```shell
[Stage2] calling waitForTransaction...
WalletTransactionError: Error: failed to execute transaction: transaction execution failed: failed to execute transaction kernel program:
procedure with root digest 0x7ed76d95ac446cbaf23785cf3f581afefb81bd02e74b6e9f1758446c917e000f could not be found
at async attemptStage2 (Markets.tsx:110:26)
at async handlePlaceBet (Markets.tsx:166:22)
Stage 2 failed, switching to CLI fallback: Error: failed to execute transaction: transaction execution failed: failed to execute transaction kernel program:
procedure with root digest 0x7ed76d95ac446cbaf23785cf3f581afefb81bd02e74b6e9f1758446c917e000f could not be found
```
Guia de contribuição
Avaliação
Esta issue ainda não foi avaliada.