Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

When BSC_CLUSTER_SIZE=21 , node panic

未关闭
#83 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
25/100
Issue 类型
缺陷
描述清晰度
需要澄清
活跃度
停滞
技术栈
go
领域
blockchain

调研方向

在 .env 中使用 BSC_CLUSTER_SIZE=21 重现该节点,并将其与 BSC_CLUSTER_SIZE=5 进行比较。从 consensus/parlia/snapshot.go:355 开始,然后跟踪 parlia.go:825 和 parlia.go:2000 中的调用方;该 issue 没有定义预期行为,也没有定义什么应算作完成。

由索引模型根据 Issue 内容生成。

描述

when .env set BSC_CLUSTER_SIZE=21, The node will panic. However, when setting BSC_CLUSTER_SIZE=5, the node runs normally.

panic: runtime error: index out of range [0] with length 0


goroutine 4562 [running]:
github.com/ethereum/go-ethereum/consensus/parlia.(*Snapshot).apply(0xc012b9c0e0, {0xc0107a06d8, 0x1, 0x25df380?}, {0x32ec548, 0xc01057c008}, {0xc0107a06d0, 0x0, 0x1}, 0x46e2280)
	github.com/ethereum/go-ethereum/consensus/parlia/snapshot.go:355 +0x114d
github.com/ethereum/go-ethereum/consensus/parlia.(*Parlia).snapshot(0xc010500008, {0x32ec548, 0xc01057c008}, 0x127dd910?, {0x44, 0xe4, 0xbd, 0x59, 0x27, 0x90, ...}, ...)
	github.com/ethereum/go-ethereum/consensus/parlia/parlia.go:825 +0x973
github.com/ethereum/go-ethereum/consensus/parlia.(*Parlia).GetJustifiedNumberAndHash(0xc010500008, {0x32ec548, 0xc01057c008}, {0xc0107a06d0, 0x1, 0x1})
	github.com/ethereum/go-ethereum/consensus/parlia/parlia.go:2000 +0x13b
github.com/ethereum/go-ethereum/core.(*BlockChain).GetJustifiedNumber(0xc01057c008, 0xc012bee788)
	github.com/ethereum/go-ethereum/core/blockchain.go:682 +0xa4
github.com/ethereum/go-ethereum/core.(*ForkChoice).ReorgNeededWithFastFinality(0xc000a20340, 0xc012bb1188, 0xc012bee788)
	github.com/ethereum/go-ethereum/core/forkchoice.go:150 +0xd0
github.com/ethereum/go-ethereum/core.(*BlockChain).writeBlockAndSetHead(0xc01057c008, 0xc0127df290, {0xc0107a06b8, 0x1, 0x1}, {0xc0107a06c8, 0x1, 0x1}, 0xc011b48c88, 0x1)
	github.com/ethereum/go-ethereum/core/blockchain.go:1935 +0xaa
github.com/ethereum/go-ethereum/core.(*BlockChain).WriteBlockAndSetHead(0xc01057c008, 0xc0127df290, {0xc0107a06b8, 0x1, 0x1}, {0xc0107a06c8, 0x1, 0x1}, 0xc011b48c88, 0x1)
	github.com/ethereum/go-ethereum/core/blockchain.go:1928 +0x114
github.com/ethereum/go-ethereum/miner.(*worker).resultLoop(0xc001225688)
	github.com/ethereum/go-ethereum/miner/worker.go:676 +0xc74
created by github.com/ethereum/go-ethereum/miner.newWorker in goroutine 1
	github.com/ethereum/go-ethereum/miner/worker.go:309 +0x83b
主要语言
Shell
星标
70
派生
62
PR 合并指标
30 天内没有已合并 PR

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bnb-chain/node-deploy 的其他 Issue

查看 bnb-chain/node-deploy 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。