MystenLabs / sui

Sui, a next-generation smart contract platform with high throughput, low latency, and an asset-oriented programming model powered by the Move programming language
https://sui.io
Apache License 2.0
5.84k stars 11.06k forks source link

"sui start" panic (main branch 1.29) #18468

Closed mario4tier closed 1 day ago

mario4tier commented 3 days ago

Steps to Reproduce Issue

(1) Build sui binary from main branch (currently 1.29.0-f6f2584c5072 )

(2) env RUST_LOG=error sui start --network.config /home/olet/suibase/workdirs/localnet/config/network.yaml

network.yaml is attached ( network.yaml.txt )

Expected Result

"sui start" to normally start and keep running.

Actual Result

A panic image

This problem is not happening with devnet branch 1.28.1 (and many older versions).

The error message shows a path that includes the file "network.yaml" which is not a directory (it is the file specified with --network-config), could this be the problem?

System Information

ubuntu, rustc 1.75

Tests with 1.29 is my own cargo build, while 1.28.1 was the precompiled Mysten binaries ( sui-devnet-v1.28.1-ubuntu-x86_64.tgz )

stefan-mysten commented 3 days ago

Thanks for reporting this. I've made some changes to sui start that might be causing this. I'll look into it now, but would help me to know:

If you do not have anything sensitive in that folder, could you show me the structure of it?

mario4tier commented 3 days ago

When testing, my script delete and regenerate "everything" from scratch. So in the case of testing 1.29, it does not reach the point of creating full_node_db.

(1) The blob is in /home/olet/suibase/workdirs/localnet/config

image

(2) Will follow up in a few minutes about where full_node_db is created when testing with 1.28.1

stefan-mysten commented 3 days ago

I see, in this case, I think you might just get away with passing the folder instead of the actual network file sui start --network.config ~/suibase/workdirs/localnet/config.

stefan-mysten commented 3 days ago

But I will fix it asap so that it accepts the network.yaml config file as it used to.

mario4tier commented 3 days ago

Thanks. No rush to fix for me... as long it works as used to in devnet/testnet branch :smile:

Just FYI, specifying just the directory did not work: image

mario4tier commented 3 days ago

Going on a tangent about full_node_db (can create another issue as needed?)

With 1.28.1, it is created in ~/.sui/sui_config ( it might have always work that way and never noticed).

This is inconsistent with all the rest being created in ~/suibase/workdirs/localnet/config

image

stefan-mysten commented 3 days ago

Thanks for the detailed info! I'll try to put up a fix today.

mario4tier commented 3 days ago

More info related to full_node_db: image

stefan-mysten commented 3 days ago

thanks @mario4tier. I am not fully sure how suibase does stuff, particularly, why it creates another config-default folder to store the DBs.

I have a PR up that should fix the issue you have. If you have a chance to build the sui binary from that branch https://github.com/MystenLabs/sui/pull/18469 and try it locally, let me know if you still encounter issues.

Thanks for your patience here!

mario4tier commented 3 days ago

It works (tested with latest 1.29 main branch + changes to sui_command.rs).

Thanks!

About DBs location One key design choice for Suibase is to not interfere with the Mysten Labs official installation. So the Suibase localnet should not depend or even "touch" ~/.sui

That design allows to support a distinct set of binaries/repos/config/keystore for each network. The users/app can then operate localnet/devnet/testnet/mainnet concurrently... there is no "switch env" for Suibase users.

To keep things clean, all files related to a network are kept in a single place (e.g. ~/suibase/workdirs/testnet). full_node_db is the only exception right now...

I tried to modify the fullnode.yaml with an absolute path like done in network.yaml, but it did not work (still created in ~/.sui/sui_config ).

In short, ideally, Suibase would benefit from being able to specify the full_node_db path (but it is not breaking anything right now).