sui icon indicating copy to clipboard operation
sui copied to clipboard

Sui Code Bug or Feature Request

Open Danilok120 opened this issue 8 months ago • 7 comments

Steps to Reproduce Issue

  1. copy the example in examples/move/nft
  2. publish the contract to testnet

Expected Result

Expected contract can be published

Actual Result

bubanister@Danils-Mac-mini nft_contract % RUST_BACKTRACE=1 sui client publish --gas-budget 10000000
[warning] Client/Server api version mismatch, client api version : 1.46.2, server api version : 1.46.1
[Note]: Dependency sources are no longer verified automatically during publication and upgrade. You can pass the `--verify-deps` option if you would like to verify them as part of publication or upgrade.
[note] Dependencies on Bridge, MoveStdlib, Sui, and SuiSystem are automatically added, but this feature is disabled for your package because you have explicitly included dependencies on Sui. Consider removing these dependencies from Move.toml.
INCLUDING DEPENDENCY Sui
INCLUDING DEPENDENCY MoveStdlib
BUILDING examples
Skipping dependency verification

thread 'main' panicked at /private/tmp/sui-20250407-7907-fqnyya/sui-testnet-v1.46.2/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16
2025-04-08T08:08:58.354429Z ERROR telemetry_subscribers: panicked at /private/tmp/sui-20250407-7907-fqnyya/sui-testnet-v1.46.2/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16 panic.file="/private/tmp/sui-20250407-7907-fqnyya/sui-testnet-v1.46.2/external-crates/move/crates/move-bytecode-utils/src/lib.rs" panic.line=29 panic.column=17
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: move_bytecode_utils::Modules::new
   3: sui_move_build::CompiledPackage::get_dependency_sorted_modules
   4: sui_move_build::CompiledPackage::get_package_bytes
   5: sui::client_commands::compile_package::{{closure}}
   6: sui::client_commands::SuiClientCommands::execute::{{closure}}
   7: sui::sui_commands::SuiCommand::execute::{{closure}}
   8: sui::main::{{closure}}
   9: tokio::runtime::park::CachedParkThread::block_on
  10: tokio::runtime::runtime::Runtime::block_on
  11: sui::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
zsh: abort      RUST_BACKTRACE=1 sui client publish --gas-budget 10000000
bubanister@Danils-Mac-mini nft_contract % 
`bubanister@Danils-Mac-mini nft_contract % RUST_BACKTRACE=1 sui client publish --gas-budget 10000000
[warning] Client/Server api version mismatch, client api version : 1.46.2, server api version : 1.46.1
[Note]: Dependency sources are no longer verified automatically during publication and upgrade. You can pass the `--verify-deps` option if you would like to verify them as part of publication or upgrade.
[note] Dependencies on Bridge, MoveStdlib, Sui, and SuiSystem are automatically added, but this feature is disabled for your package because you have explicitly included dependencies on Sui. Consider removing these dependencies from Move.toml.
INCLUDING DEPENDENCY Sui
INCLUDING DEPENDENCY MoveStdlib
BUILDING examples
Skipping dependency verification

thread 'main' panicked at /private/tmp/sui-20250407-7907-fqnyya/sui-testnet-v1.46.2/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16
2025-04-08T08:08:58.354429Z ERROR telemetry_subscribers: panicked at /private/tmp/sui-20250407-7907-fqnyya/sui-testnet-v1.46.2/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16 panic.file="/private/tmp/sui-20250407-7907-fqnyya/sui-testnet-v1.46.2/external-crates/move/crates/move-bytecode-utils/src/lib.rs" panic.line=29 panic.column=17
stack backtrace:
   0: _rust_begin_unwind
   1: core::panicking::panic_fmt
   2: move_bytecode_utils::Modules::new
   3: sui_move_build::CompiledPackage::get_dependency_sorted_modules
   4: sui_move_build::CompiledPackage::get_package_bytes
   5: sui::client_commands::compile_package::{{closure}}
   6: sui::client_commands::SuiClientCommands::execute::{{closure}}
   7: sui::sui_commands::SuiCommand::execute::{{closure}}
   8: sui::main::{{closure}}
   9: tokio::runtime::park::CachedParkThread::block_on
  10: tokio::runtime::runtime::Runtime::block_on
  11: sui::main
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
zsh: abort      RUST_BACKTRACE=1 sui client publish --gas-budget 10000000
bubanister@Danils-Mac-mini nft_contract % 

System Information

  • OS: macOS 15.3.2
  • Compiler: sui build sui1.46.2-homebrew

Danilok120 avatar Apr 08 '25 08:04 Danilok120

Thank you for opening this issue, a team member will review it shortly. Until then, please do not interact with any users that claim to be from Sui support and do not click on any links!

github-actions[bot] avatar Apr 08 '25 08:04 github-actions[bot]

This user is working in Bangkok hacker house with a Mac mini M2 Pro, and the sui is downloaded with brew, I have checked his environment, and make sure the sui is updated, the example code is downloaded from the latest commit in the repo.

yanganto avatar Apr 08 '25 08:04 yanganto

Thanks @Danilok120 and @yanganto. Unfortunately, I wasn't able to reproduce on my Mac laptop.

➜  nft git:(mp-alt-lock-files) rm -rf Move.lock build
➜  nft git:(mp-alt-lock-files) sui client publish
[warning] Client/Server api version mismatch, client api version : 1.46.2, server api version : 1.46.1
[Note]: Dependency sources are no longer verified automatically during publication and upgrade. You can pass the `--verify-deps` option if you would like to verify them as part of publication or upgrade.
[note] Dependencies on Bridge, MoveStdlib, Sui, and SuiSystem are automatically added, but this feature is disabled for your package because you have explicitly included dependencies on Sui. Consider removing these dependencies from Move.toml.
INCLUDING DEPENDENCY Sui
INCLUDING DEPENDENCY MoveStdlib
BUILDING testnet_nft
Total number of linter warnings suppressed: 1 (unique lints: 1)
Skipping dependency verification
Transaction Digest: A4pLd6BK9X1Upr4uZpmazFxHQMhaB6xXbAXHSbFjGt2N
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Data                                                                                             │
├──────────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Sender: 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb                                   │
│ Gas Owner: 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb                                │
│ Gas Budget: 13141600 MIST                                                                                    │
│ Gas Price: 1000 MIST                                                                                         │
│ Gas Payment:                                                                                                 │
│  ┌──                                                                                                         │
│  │ ID: 0xc63ba8d1955c42318bc9c8bbb64b5c39e93777c90b58d984380c242abe43aeb4                                    │
│  │ Version: 349175805                                                                                        │
│  │ Digest: N25B911ixxjsbgXJxqoNSazbaXaJL8QrqYmQA19m598                                                       │
│  └──                                                                                                         │
│                                                                                                              │
│ Transaction Kind: Programmable                                                                               │
│ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │
│ │ Input Objects                                                                                            │ │
│ ├──────────────────────────────────────────────────────────────────────────────────────────────────────────┤ │
│ │ 0   Pure Arg: Type: address, Value: "0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb" │ │
│ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ │
│ ╭─────────────────────────────────────────────────────────────────────────╮                                  │
│ │ Commands                                                                │                                  │
│ ├─────────────────────────────────────────────────────────────────────────┤                                  │
│ │ 0  Publish:                                                             │                                  │
│ │  ┌                                                                      │                                  │
│ │  │ Dependencies:                                                        │                                  │
│ │  │   0x0000000000000000000000000000000000000000000000000000000000000001 │                                  │
│ │  │   0x0000000000000000000000000000000000000000000000000000000000000002 │                                  │
│ │  └                                                                      │                                  │
│ │                                                                         │                                  │
│ │ 1  TransferObjects:                                                     │                                  │
│ │  ┌                                                                      │                                  │
│ │  │ Arguments:                                                           │                                  │
│ │  │   Result 0                                                           │                                  │
│ │  │ Address: Input  0                                                    │                                  │
│ │  └                                                                      │                                  │
│ ╰─────────────────────────────────────────────────────────────────────────╯                                  │
│                                                                                                              │
│ Signatures:                                                                                                  │
│    e964tKfWwFK+iFcZccO0sClw5fkAwPabSQgNvo60NiaaRGb+NZi+6j36qRShwJYo3gWdIdHGY0tLnYnHXG9KBA==                  │
│                                                                                                              │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Transaction Effects                                                                               │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Digest: A4pLd6BK9X1Upr4uZpmazFxHQMhaB6xXbAXHSbFjGt2N                                              │
│ Status: Success                                                                                   │
│ Executed Epoch: 698                                                                               │
│                                                                                                   │
│ Created Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0x47df7fbfa444cab436cbf4fc29124c4228350dba8696b9e4bb658bd952a53b8f                         │
│  │ Owner: Immutable                                                                               │
│  │ Version: 1                                                                                     │
│  │ Digest: GT7vKw2fCdYJwSn8fUMVwQ8wApKQXj4n1iRPhAaHpdXy                                           │
│  └──                                                                                              │
│  ┌──                                                                                              │
│  │ ID: 0xeb057d7d83afca96a64285ba9232016e12e10a3db8d63c07da4f83bf2c660355                         │
│  │ Owner: Account Address ( 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb )  │
│  │ Version: 349175806                                                                             │
│  │ Digest: EEm9zjAs6JYrjyctfJ4C8TpPbtFmCV2KWLvuT35d1ZpL                                           │
│  └──                                                                                              │
│ Mutated Objects:                                                                                  │
│  ┌──                                                                                              │
│  │ ID: 0xc63ba8d1955c42318bc9c8bbb64b5c39e93777c90b58d984380c242abe43aeb4                         │
│  │ Owner: Account Address ( 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb )  │
│  │ Version: 349175806                                                                             │
│  │ Digest: FX1nzf78xZK1mpNWs9FQRnQpuRiCA9QAqsj4Vga9GSWK                                           │
│  └──                                                                                              │
│ Gas Object:                                                                                       │
│  ┌──                                                                                              │
│  │ ID: 0xc63ba8d1955c42318bc9c8bbb64b5c39e93777c90b58d984380c242abe43aeb4                         │
│  │ Owner: Account Address ( 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb )  │
│  │ Version: 349175806                                                                             │
│  │ Digest: FX1nzf78xZK1mpNWs9FQRnQpuRiCA9QAqsj4Vga9GSWK                                           │
│  └──                                                                                              │
│ Gas Cost Summary:                                                                                 │
│    Storage Cost: 11141600 MIST                                                                    │
│    Computation Cost: 1000000 MIST                                                                 │
│    Storage Rebate: 978120 MIST                                                                    │
│    Non-refundable Storage Fee: 9880 MIST                                                          │
│                                                                                                   │
│ Transaction Dependencies:                                                                         │
│    2KKFDYfXCwBWaS1e3i4gLnjW1DsQoWqYQMb4SVBZFQR2                                                   │
│    5qAPDeux3r67gkkPszWqvrLdJAwk3E5yvLwtCxJH8Ape                                                   │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─────────────────────────────╮
│ No transaction block events │
╰─────────────────────────────╯

╭──────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Object Changes                                                                                   │
├──────────────────────────────────────────────────────────────────────────────────────────────────┤
│ Created Objects:                                                                                 │
│  ┌──                                                                                             │
│  │ ObjectID: 0xeb057d7d83afca96a64285ba9232016e12e10a3db8d63c07da4f83bf2c660355                  │
│  │ Sender: 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb                    │
│  │ Owner: Account Address ( 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb ) │
│  │ ObjectType: 0x2::package::UpgradeCap                                                          │
│  │ Version: 349175806                                                                            │
│  │ Digest: EEm9zjAs6JYrjyctfJ4C8TpPbtFmCV2KWLvuT35d1ZpL                                          │
│  └──                                                                                             │
│ Mutated Objects:                                                                                 │
│  ┌──                                                                                             │
│  │ ObjectID: 0xc63ba8d1955c42318bc9c8bbb64b5c39e93777c90b58d984380c242abe43aeb4                  │
│  │ Sender: 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb                    │
│  │ Owner: Account Address ( 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb ) │
│  │ ObjectType: 0x2::coin::Coin<0x2::sui::SUI>                                                    │
│  │ Version: 349175806                                                                            │
│  │ Digest: FX1nzf78xZK1mpNWs9FQRnQpuRiCA9QAqsj4Vga9GSWK                                          │
│  └──                                                                                             │
│ Published Objects:                                                                               │
│  ┌──                                                                                             │
│  │ PackageID: 0x47df7fbfa444cab436cbf4fc29124c4228350dba8696b9e4bb658bd952a53b8f                 │
│  │ Version: 1                                                                                    │
│  │ Digest: GT7vKw2fCdYJwSn8fUMVwQ8wApKQXj4n1iRPhAaHpdXy                                          │
│  │ Modules: testnet_nft                                                                          │
│  └──                                                                                             │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭───────────────────────────────────────────────────────────────────────────────────────────────────╮
│ Balance Changes                                                                                   │
├───────────────────────────────────────────────────────────────────────────────────────────────────┤
│  ┌──                                                                                              │
│  │ Owner: Account Address ( 0x6ba0cc1a418ff3bebce0ff9ec3961e6cc794af9bc3a4114fb138d00a4c9274bb )  │
│  │ CoinType: 0x2::sui::SUI                                                                        │
│  │ Amount: -11163480                                                                              │
│  └──                                                                                              │
╰───────────────────────────────────────────────────────────────────────────────────────────────────╯

stefan-mysten avatar Apr 08 '25 16:04 stefan-mysten

I am not sure what to suggest. A few things to try (in random order)

  • redownload the sui repository -- what commit you have?
  • try to do a git switch testnet and then try again to publish
  • install an older version of the Sui CLI (you'd probably need to download it from the release page)
  • use a binary from releases rather than brew
  • does any other example work?

stefan-mysten avatar Apr 08 '25 16:04 stefan-mysten

I'm getting the same issue running sui move test :


thread 'main' panicked at /private/tmp/sui-20250414-7842-m0k99p/sui-testnet-v1.47.0/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2025-04-27T01:58:13.494082Z ERROR telemetry_subscribers: panicked at /private/tmp/sui-20250414-7842-m0k99p/sui-testnet-v1.47.0/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16 panic.file="/private/tmp/sui-20250414-7842-m0k99p/sui-testnet-v1.47.0/external-crates/move/crates/move-bytecode-utils/src/lib.rs" panic.line=29 panic.column=17
[1]    16300 abort      sui move test

I'm using sui-move 1.47.0-homebrew

quangnguyenbh avatar Apr 27 '25 02:04 quangnguyenbh

Sorry to hear that you're having issues @quangnguyenbh.

stefan-mysten avatar Apr 28 '25 17:04 stefan-mysten

I'm getting the same issue running sui move test :


thread 'main' panicked at /private/tmp/sui-20250414-7842-m0k99p/sui-testnet-v1.47.0/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
2025-04-27T01:58:13.494082Z ERROR telemetry_subscribers: panicked at /private/tmp/sui-20250414-7842-m0k99p/sui-testnet-v1.47.0/external-crates/move/crates/move-bytecode-utils/src/lib.rs:29:17:
Duplicate module found: 0x0000000000000000000000000000000000000000000000000000000000000002::groth16 panic.file="/private/tmp/sui-20250414-7842-m0k99p/sui-testnet-v1.47.0/external-crates/move/crates/move-bytecode-utils/src/lib.rs" panic.line=29 panic.column=17
[1]    16300 abort      sui move test

I'm using sui-move 1.47.0-homebrew

maybe your contract sources old. check contract sui coin types " coin: Coin < SUI > ," check "coin: ------"

nzengi avatar Jun 03 '25 21:06 nzengi

same error... any solution?

VictorBlockchain avatar Jun 22 '25 16:06 VictorBlockchain

@VictorBlockchain can you provide more details on your cli version, OS. Have you tried the latest CLI version?

stefan-mysten avatar Jun 23 '25 18:06 stefan-mysten

Getting Duplicate module found: 0x2::groth16 in your SC..It likely means you're defining modules or using Coin<SUI> in a way that's outdated.Reserve 0x2 for the groth16 zk-SNARK module. Move your code to another address and wrap payments like coin: Coin<SUI> inside a struct. try balance: Balance<SUI> I solved changed type..

nzengi avatar Jun 24 '25 02:06 nzengi