docs/fpi-bug: Miden Bank tutorial's "get_balance" and "deposit" method names collide with core library on v0.15.3
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 75/100
- Issue type
- Documentation
- Clarity
- Clearly specified
- Activity status
- Quiet
- Domain
- documentation
Research direction
The issue is about a namespace collision in the Miden Bank tutorial. The user has already identified the problematic method names (deposit and get_balance) and suggested new names (bank_deposit and check_balance). To resolve this, locate the tutorial files (likely in the repository's docs or examples directory) that define the Bank account contract and the associated notes. Update the method names in the contract source and any note definitions, then verify the changes compile without the linker error. The user's reproduction repo (https://github.com/anaraydinli55/miden-testnet-project) can be referenced for the exact changes needed.
Written by the indexing model from the issue text.
Description
Documentation Issue / Namespace Collision
While building the official Miden Bank tutorial using the latest mainnet toolchain (v0.15.3 and miden-base v0.13.1), I encountered a namespace collision and linker errors when compiling the deposit-note (or other cross-component FPI notes).
The original tutorial uses:
depositmethod on the Bank account.get_balancemethod on the Bank account.
The Conflict
On v0.15.3, the #[account(bank_account::BankAccount)] macro expands into FPI bindings. However:
- The
depositfunction name collides with the built-in standard library'sBasicWalletdepositmethod. - The
get_balancefunction name collides with the built-inActiveAccount'sget_balancemethod, throwing the following error duringwasm-component-ldlinking:
error: dependency function get-balance collides with the built-in ActiveAccount method get_balance; the generated wrapper method would shadow it. Rename the dependency function
The Solution
To successfully compile the Miden Bank tutorial on the new mainnet toolchain:
- Rename the
depositmethod tobank_deposit(or another unique name) in both the contract and the notes. - Rename the
get_balancemethod tocheck_balancein both the contract and the notes.
I suggest updating the official tutorial repository and documentation to reflect these v0.15.3 namespace rules.
Reproduction Repo
I have compiled, tested, and resolved this in my local workspace here:
🔗 https://github.com/anaraydinli55/miden-testnet-project
- Dominant language
- Rust
- Stars
- 18
- Forks
- 34
- Avg merge
- 4d 18h
- Merged PRs (30d)
- 2
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from 0xMiden/tutorials
-
docs(web-client): Add Private Note Transfer tutorial with Note Transport Service and fetchPrivate() Open
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
All issues in 0xMiden/tutorials
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gitbutlerapp/gitbutler#15998 · 1 comment ·
-
bug triage:deciding
Difficulty 1/5 Under an hour Newbie friendliness 88/100
open-telemetry/otel-arrow#4132 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
bitcoindevkit/bdk-ffi#1125 ·