0xMiden / 0xMiden/wallet-adapter

Private notes sent via wallet adapter are not reliably discoverable/consumable in Miden Wallet

未关闭
#84 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
TypeScript
星标
2
派生
9
平均合并
25 分钟
30 天内合并 PR
1

描述

### Packages versions

@miden-sdk/miden-wallet-adapter-base: 0.14.3
@miden-sdk/miden-wallet-adapter-react: 0.14.3
@miden-sdk/miden-sdk: 0.14.4
@miden-sdk/react: 0.14.4
@miden-sdk/vite-plugin: 0.14.4

Network: testnet
Wallet: Miden Wallet browser extension
App: React + Vite dApp

### Bug description

I’m building a dApp that sends private reward notes from an organizer wallet to a recipient wallet.

The intended flow is:

1. Organizer sends a private reward note using the wallet adapter.
2. Recipient receives a notification/link outside the app.
3. Recipient opens Miden Wallet.
4. Recipient consumes the private note directly from the wallet.

In testing, private notes are not reliably discoverable or consumable by the recipient wallet.

Observed issues:

- Miden Wallet Activity can remain stuck on `Consuming`.
- Canceling the stuck consume action does not always clear it permanently.
- `requestConsumableNotes()` can show old notes, but newly sent private notes may not appear for several minutes.
- `requestConsume()` can fail with `Transaction expired after being queued too long`.
- Trying to consume a linked/private note by id can fail with `INVALID_PARAMS: Error: Note with id ... not found`.

Expected behavior:

Private notes sent to a recipient wallet should be discoverable and consumable by that wallet without requiring fragile dApp-side workarounds.

Screenshot 1: Consuming a linked private reward note fails because the recipient wallet cannot find the note by id

Image

Screenshot 2: Wallet accepts `requestConsume()`, then the transaction expires after being queued too long

Image

Screenshot 3: Miden Wallet Activity remains stuck on `Consuming` after attempting to claim a private reward

Image

### How can this be reproduced?

1. Connect an organizer wallet on testnet.
2. Connect or create a separate recipient wallet.
3. Send a private note to the recipient using `requestSend()` with:
- `noteType: "private"`
- recipient wallet address
- faucet id
- amount in raw units
4. Open the recipient wallet.
5. Try to consume the received private note from Miden Wallet Activity.
6. Also try scanning from the dApp using `requestConsumableNotes()`.
7. Attempt to consume the note using `requestConsume()`.

Observed results:

- Some consume attempts stay stuck on `Consuming`.
- Some consume attempts expire after being queued too long.
- Some private note consume attempts fail with `Note with id ... not found`.

### Relevant log output

```shell
Could not consume reward. Transaction expired after being queued too long

INVALID_PARAMS: Error: Note with id 0x9029ad972302e27b496ff3bd174bb95d6c4abd3a0581ebc14c048de5669f5905 not found
```

贡献指南

打开贡献指南

调研方向

该 issue 涉及用于发送和消费私有笔记的 Miden 钱包适配器和 SDK。首先检查钱包适配器包中的 `requestSend()`、`requestConsumableNotes()` 和 `requestConsume()` 方法。查看网络层和交易队列逻辑。检查 Miden Wallet 扩展的活动处理和笔记发现机制。使用提供的测试步骤在测试网上复现该 bug,以观察故障和超时。

由索引模型根据 Issue 内容生成。

评估

技术栈
blockchain, react, vite
领域
backend-api-design, blockchain, mobile
Issue 类型
缺陷
难度
4/5
预计耗时
3-5 天
活跃度
停滞
描述清晰度
描述清楚
新手友好度
35/100

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。