0xMiden / 0xMiden/wallet-adapter

Auto-consumed private note cannot be verified by organizer via nullifier RPC

Đang mở
#95 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
TypeScript
Star
2
Fork
9
Merge trung bình
25 phút
Pull request đã merge (30 ngày)
1

Mô tả

### Packages versions

@miden-sdk/miden-sdk: 0.15.4
@miden-sdk/react: 0.15.4
@miden-sdk/vite-plugin: 0.15.4
@miden-sdk/miden-wallet-adapter-base: 0.15.1
@miden-sdk/miden-wallet-adapter-react: 0.15.1

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

### Bug description

Recipient wallet showing confirmed/received:

Image

Organizer dashboard still pending:

Image

Diagnostics table:

Image

I am building a dApp and one is the things it does is that it sends private reward notes from an organizer wallet to a recipient wallet.

The private note is received by the recipient wallet and auto-consumed successfully, but the organizer dApp cannot verify consumption from the original note data.

The organizer app stores the output note returned by waitForTransaction(), verifies that the stored note ID matches the note ID computed from the stored note bytes, computes the note nullifier, and calls:

rpcClient.getNullifierCommitHeight(note.nullifier(), latestBlockNumber)

Even after the recipient wallet shows the reward as received/auto-consumed successfully, the nullifier commit height remains undefined.

I expected the organizer dApp to have a reliable way to verify that the private reward note was consumed, ideally by checking that the note nullifier was committed.

### How can this be reproduced?

1. Connect an organizer wallet on testnet.
2. Send a private reward note using requestSend() with:
- noteType: "private"
- recipient wallet address
- faucet ID
- amount
3. Wait for the send transaction using waitForTransaction().
4. Store the output note whose asset faucet ID and raw amount match the reward.
5. Confirm the stored note ID matches the computed note ID from the stored note bytes.
6. Let the recipient wallet receive and auto-consume the private note.
7. In the organizer dApp, deserialize the stored note and compute note.nullifier().
8. Call getNullifierCommitHeight(note.nullifier(), latestBlockNumber).
9. Also call getNetworkNoteStatus(note.id()).

### Relevant log output

```shell
Stored note ID matches computed note ID:
0x4454b6...2c5c73

Stored asset:
1000000 raw units from faucet 0x2458e5446128e6b150b75b8ebd9ce1

Computed nullifier:
0xeb9976...9add36

getNullifierCommitHeight(note.nullifier(), latestBlockNumber):
undefined / not visible

getNetworkNoteStatus(note.id()):
failed to get network note status: grpc request failed for get_network_note_status: resource not found: code: 'Some requested entity was not found', message: "note not found in ntx-builder database"
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Issue liên quan đến vòng đời ghi chú và cam kết nullifier trong Miden SDK. Bắt đầu bằng cách kiểm tra luồng tạo và tiêu thụ ghi chú trong mã bộ chuyển đổi ví, đặc biệt là các phương thức `requestSend` và `waitForTransaction`. Xem lại các triển khai `getNullifierCommitHeight` và `getNetworkNoteStatus` trong client RPC để hiểu cách chúng truy vấn mạng. Kiểm tra việc tuần tự hóa/giải tuần tự hóa ghi chú và tính toán nullifier để đảm bảo tính chính xác. Mục tiêu là xác định lý do tại sao nullifier không được cam kết trên chuỗi sau khi tiêu thụ tự động, điều này có thể yêu cầu hiểu về các chuyển đổi trạng thái ghi chú và đồng bộ hóa mạng trong Miden VM.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
blockchain, react
Lĩnh vực
backend-api-design, blockchain
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Ít trao đổi
Độ rõ ràng
Khá rõ ràng
Mức phù hợp với người mới
45/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.