nervosnetwork / ckb-light-client

CKB light client reference implementation
MIT License
14 stars 16 forks source link

Can't start ckb-light-client@v0.2.4 with ckb@v0.111.0-rc8 #149

Closed zhangyouxin closed 8 months ago

zhangyouxin commented 1 year ago

Description

I tried to start ckb-light-client with ckb, but got following error:

thread 'main' panicked at 'load spec should be OK: Error { inner: ErrorInner { kind: Custom, line: Some(99), col: 0, at: Some(3139), message: "unknown field `ckb2023`, expected one of `rfc_0028`, `rfc_0029`, `rfc_0030`, `rfc_0031`, `rfc_0032`, `rfc_0036`, `rfc_0038`", key: ["params", "hardfork"] } }', src/subcmds.rs:35:10
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

My cli command:

RUST_LOG=info,ckb_light_client=info ./ckb-light-client run --config-file ./light-client.toml

My ckb-light-client config file:

chain = "MY_CKB_DIR/specs/dev.toml"
#...

My ckb config dev.toml:

#...
[params.hardfork]
ckb2023 = 0

My Env

Potential Reason

According to the error message, I think the reason could be upgrade of ckb binary. In previous ckb version, for example v0.108.1-rc1, the specs/dev.toml looks like:

[params.hardfork]
rfc_0028 = 0
rfc_0029 = 0
rfc_0030 = 0
rfc_0031 = 0
rfc_0032 = 0
rfc_0036 = 0
rfc_0038 = 0

This part of config has changed to ckb2023 = 0 style since ckb@v0.111.0-rc6(maybe earlier) that ckb-light-client don't know about.

not sure the config style will get reverted or not...