name-tokenizer icon indicating copy to clipboard operation
name-tokenizer copied to clipboard

spl_name_service.so missing after running ./build.sh (localnet setup)

Open chunumunu12 opened this issue 6 months ago • 2 comments

I'm testing the name-tokenizer repo on Solana localnet, and running the default ./build.sh script under the program/ directory. However, it only builds name_tokenizer.so — the expected spl_name_service.so is never generated.

To configure localnet, I updated my Anchor.toml:

[programs.localnet]
name_tokenizer = "nftD3vbNkNqfj2Sd3HZwbpw4BxxKWr4AjGb9X38JeZk"

Out of frustration, I also commented out these two lines from build.sh, which try to dump programs that I don’t control (mainnet):

# solana program dump metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s target/deploy/mpl_token_metadata.so
# solana program dump namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX target/deploy/spl_name_service.so

Even after this, running ./build.sh only outputs:

target/deploy/name_tokenizer.so
target/deploy/name_tokenizer-keypair.json

No spl_name_service.so is built or present.


Steps to Reproduce:

  1. Clone the repo:

    git clone https://github.com/Bonfida/name-tokenizer
    cd name-tokenizer/program
    
  2. Update Anchor.toml for localnet

  3. Comment out these lines in build.sh:

    # solana program dump ...
    
  4. Run:

    ./build.sh
    
  5. Observe missing .so file:

    ls target/deploy/
    

Expected behavior spl_name_service.so should be built alongside name_tokenizer.so to support .sol domain operations in a localnet test setup.


Environment:

  • OS: Kali Linux
  • Solana CLI: v2.2.20
  • Anchor CLI: v0.31.1
  • Node: v20.19.2
  • Rust: 1.87.0 (17067e9ac 2025-05-09)

Additional context: I am working entirely on localnet (no access to mainnet/testnet/devnet). I'm working on a bug bounty exploit scenario where I need register .sol domain support via spl_name_service. Without a .so to deploy locally, I’m blocked from progressing.

Please confirm if this program is deprecated, renamed, or meant to be built from another repo.


chunumunu12 avatar Jul 16 '25 17:07 chunumunu12

Hi @chunumunu12, in a localnet setup why not fetch spl_name_service from mainnet anyways? I would just run solana program dump --url m namesLPneVptA9Z5rqUDD9tMTWEJwofgaYwp8cawRkX target/deploy/spl_name_service.so

If you want to build spl_name_service from source you can find the code here: https://github.com/solana-labs/solana-program-library/tree/master/name-service/program

ellttBen avatar Jul 17 '25 09:07 ellttBen

Hi, thanks for your helpful response!

I have successfully dumped the spl_name_service.so and mpl_token_metadata.so from mainnet for simulation purposes.

chunumunu12 avatar Jul 17 '25 15:07 chunumunu12