Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mario4tier opened this issue Jun 29, 2024 · 10 comments · Fixed by #18469
Closed

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

mario4tier opened this issue Jun 29, 2024 · 10 comments · Fixed by #18469
Assignees
Labels
cli Command line tools

Comments

@mario4tier
Copy link

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
Copy link
Contributor

stefan-mysten commented Jun 29, 2024

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:

  • where is your genesis blob stored (folder relative to localnet/config/network.yaml). I assume it is in home/olet/suibase/workdirs/localnet
  • where are the previous DBs stored: are they in the home/olet/suibase/workdirs/localnet folder? Do you see a full_node_db there?

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

@stefan-mysten stefan-mysten self-assigned this Jun 29, 2024
@stefan-mysten stefan-mysten added the cli Command line tools label Jun 29, 2024
@mario4tier
Copy link
Author

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
Copy link
Contributor

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
Copy link
Contributor

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

@mario4tier
Copy link
Author

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

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

@mario4tier
Copy link
Author

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
Copy link
Contributor

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

@mario4tier
Copy link
Author

More info related to full_node_db:
image

@stefan-mysten
Copy link
Contributor

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 #18469 and try it locally, let me know if you still encounter issues.

Thanks for your patience here!

@mario4tier
Copy link
Author

mario4tier commented Jun 30, 2024

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).

stefan-mysten added a commit that referenced this issue Jul 1, 2024
## Description 

Prior to #18204, `sui start` accepted a network config file when using
`--network.config`, and `sui-test-validator` accepted a config directory
when using the `--config-dir`, so we need to support both. That PR
introduces a bug as in it accepts only directories.

This PR fixes this issue and should close  #18468.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
stefan-mysten added a commit to stefan-mysten/sui that referenced this issue Jul 1, 2024
…abs#18469)

## Description 

Prior to MystenLabs#18204, `sui start` accepted a network config file when using
`--network.config`, and `sui-test-validator` accepted a config directory
when using the `--config-dir`, so we need to support both. That PR
introduces a bug as in it accepts only directories.

This PR fixes this issue and should close  MystenLabs#18468.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
tx-tomcat pushed a commit to tx-tomcat/sui-network that referenced this issue Jul 29, 2024
…abs#18469)

## Description 

Prior to MystenLabs#18204, `sui start` accepted a network config file when using
`--network.config`, and `sui-test-validator` accepted a config directory
when using the `--config-dir`, so we need to support both. That PR
introduces a bug as in it accepts only directories.

This PR fixes this issue and should close  MystenLabs#18468.

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Command line tools
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants