argumentcomputer / argumentcomputer/zk-light-clients
Kadena LC panics out of bound
- Dominant language
- Rust
- Stars
- 70
- Forks
- 12
- PR merge metrics
- No merged PRs in 30d
Description
Running the kadena light client:
`MODE=SNARK RUST_LOG="debug" cargo run -p kadena-lc --release --bin client -- -c https://api.chainweb.com -p ????.com:6379`
results in the following output:
```
Running `target/release/client -c 'https://api.chainweb.com' -p '????.com:6379'`
[2024-11-20T19:31:33Z INFO client] Fetching data to prove longest chain with target block height 5158073 and block window 3
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG reqwest::connect] starting new connection: https://api.chainweb.com/
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=api.chainweb.com
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="api.chainweb.com"
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connecting to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:33Z DEBUG hyper_util::client::legacy::connect::http] connected to 35.223.9.18:443
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("https", api.chainweb.com)
[2024-11-20T19:31:34Z INFO client] Starting proving process for the longest chain
[2024-11-20T19:31:34Z DEBUG reqwest::connect] starting new connection: http://????:6379/
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::connect::dns] resolve; host=????.com
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::connect::dns] resolving host="????.com"
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::connect::http] connecting to ????:6379
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::connect::http] connected to ????:6379
[2024-11-20T19:31:34Z DEBUG hyper_util::client::legacy::pool] pooling idle connection for ("http", ????.com:6379)
thread 'main' panicked at light-client/src/proofs/mod.rs:125:15:
index out of bounds: the len is 0 but the index is 0
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce the failure with the `kadena-lc` package and `client` binary using the command shown, then capture the complete panic and backtrace. Trace the out-of-bounds access from that entry point and add a regression test for the reported input; done means the client no longer panics and the relevant test passes.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- blockchain
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100