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

Node can't read StateScheme entries in configuration file #2053

Closed
YuXiaoCoder opened this issue Dec 11, 2023 · 2 comments · Fixed by #2067
Closed

Node can't read StateScheme entries in configuration file #2053

YuXiaoCoder opened this issue Dec 11, 2023 · 2 comments · Fixed by #2067
Assignees

Comments

@YuXiaoCoder
Copy link

System information

Geth version: 1.3.5
OS & Version: Linux
Commit hash : (if develop)

Expected behaviour

With the StateScheme set to path in config.toml, run the node as configured

Actual behaviour

Configuration not recognized, node was run with default value hash

Steps to reproduce the behaviour

cat /mnt/bscmain/conf/config.toml | grep -i state
StateHistory = 90000
StateScheme = "path"
/opt/bscmain/core/geth --config=/mnt/bscmain/conf/config.toml --rpc.allow-unprotected-txs --history.transactions=0 --pruneancient

When submitting logs: please submit them as text and not screenshots.

INFO [12-11|11:09:41.977] Maximum peer count                       ETH=200 LES=0 total=200
INFO [12-11|11:09:41.979] Smartcard socket not found, disabling    err="stat /run/pcscd/pcscd.comm: no such file or directory"
WARN [12-11|11:09:41.979] Option nousb is deprecated and USB is deactivated by default. Use --usb to enable
INFO [12-11|11:09:41.987] Enabling recording of key preimages since archive mode is used
INFO [12-11|11:09:41.988] Using pebble as the backing database
INFO [12-11|11:09:41.989] Allocated cache and file handles         database=/mnt/bscmain/node/geth/geth/chaindata cache=409.00MiB handles=524,288 "memory table"=102.25MiB
INFO [12-11|11:09:42.033] Opened ancient database                  database=/mnt/bscmain/node/geth/geth/chaindata/ancient/chain readonly=false frozen=0
INFO [12-11|11:09:42.037] State schema set to default              scheme=hash
INFO [12-11|11:09:42.037] Freezer shutting down
INFO [12-11|11:09:42.165] Set global gas cap                       cap=50,000,000
INFO [12-11|11:09:42.166] Initializing the KZG library             backend=gokzg
INFO [12-11|11:09:42.189] Using pebble as the backing database
INFO [12-11|11:09:42.189] Allocated cache and file handles         database=/mnt/bscmain/node/geth/geth/chaindata cache=16.00MiB  handles=16      "memory table"=4.00MiB
INFO [12-11|11:09:42.211] Opened ancient database                  database=/mnt/bscmain/node/geth/geth/chaindata/ancient/chain readonly=false frozen=0
INFO [12-11|11:09:42.213] State schema set to default              scheme=hash
@sysvm
Copy link
Contributor

sysvm commented Dec 11, 2023

Could you please provide your config in config.toml? I want to ensure the place where you put StateHistory = 90000 and StateScheme = "path".

If you run bsc and not assign any data directory, bsc will use hash as default scheme not use path scheme.

@sysvm
Copy link
Contributor

sysvm commented Dec 12, 2023

If you want to run bsc in path mode from genesis block, you can run this command: geth --datadir <datadir> --state.scheme path init ./genesis.json; then start a full node.
Or if you run a bsc snapshot, you can download Path-Base-State-Scheme snapshot data from here, then just run it as a full node.

There is one problem in config file when checking StateScheme, I'll fix it.

@sysvm sysvm linked a pull request Dec 14, 2023 that will close this issue
@sysvm sysvm closed this as completed Dec 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants