chore: upgrade dependencies and restore build/test coverage - #321
Merged
Conversation
liujuanjuan1984
force-pushed
the
codex/fix-p2p-test-build
branch
from
June 22, 2026 11:13
fbb66a3 to
38f8133
Compare
liujuanjuan1984
force-pushed
the
codex/fix-p2p-test-build
branch
3 times, most recently
from
June 22, 2026 15:19
3a5835c to
1e161c4
Compare
Upgrade the Go dependency stack and release tooling, restore docs serving, keep P2P connection coverage active, clean obsolete pubqueue/autoack paths, and preserve CLI blocks mode against the current block API.
liujuanjuan1984
force-pushed
the
codex/fix-p2p-test-build
branch
from
June 22, 2026 15:23
1e161c4 to
ddaa1c6
Compare
huo-ju
marked this pull request as ready for review
June 22, 2026 18:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
本 PR 基于
codex/fix-p2p-test-build,聚焦依赖升级、默认构建/测试恢复、旧测试 API 不匹配收敛,以及审查发现的高置信死代码和依赖 audit 风险清理。相关 issue:Related #320。该 issue 是
go-libp2p-kad-dhtDHT 风险的 audit 备忘,本 PR 仅记录并暴露该残余风险,不宣称关闭或修复该风险。主要变更
make serve-doc所需的 Swagger 文档服务依赖,并用docsbuild tag 避免docs.go干扰默认主程序构建。TestNodeConnecting不再无条件跳过,改为创建真实 libp2p 节点并验证 bootstrap 与 peer 连接路径。dockers_v2.ids配置的精确版本,并验证配置解析。github.com/klauspost/reedsolomon升级到v1.14.1,将github.com/swaggo/echo-swagger升级到v1.5.2,并把项目源码中剩余的旧github.com/golang/protobuf/proto调用迁移到google.golang.org/protobuf/proto。uint64block id、CurrtTopBlock、RexSyncerStatus与新版pb.Block字段适配;继续移除已无服务端 API 支撑的 pubqueue 页面和 auto-ack 兼容层。风险与说明
govulncheck仍报告GO-2024-3218,来源是github.com/libp2p/go-libp2p-kad-dht@v0.40.0,且公开漏洞库当前没有 fixed version。该风险已在 依赖风险审计备忘:go-libp2p-kad-dht DHT 发现机制的 Sybil/审查风险 #320 作为依赖 audit 备忘记录。Closes #320。go list -m -u -json all复查后,retracted 依赖已清零;剩余 deprecated 项为传递依赖或模块图残留:github.com/golang/protobuf仍由 badger/go-ethereum/prometheus 等传递依赖引入,cloud.google.com/go/pubsub、github.com/cncf/udpa/go、github.com/deepmap/oapi-codegen均不是当前主模块直接需要。继续清理这些项需要升级核心存储或 go-ethereum/grpc/cloud 依赖链,已刻意不混入本 PR。/pubqueue与/trx/ack服务端路径已经不存在,因此继续移除;对应的无效--autoackflag 和AutoAck配置字段也已清理。v2.17.0-d9421c5f-nightly,因为可查询到的稳定v2.16.0尚不支持本配置使用的dockers_v2.ids字段。验证
goreleaser check通过。go test ./cmd/cli/...通过。go test ./internal/pkg/conn/p2p -run TestNodeConnecting -count=1 -v通过。go test -tags docs -run '^$' ./docs.go通过。timeout 30s make serve-doc成功生成 docs 并启动http server started on [::]:1323;退出码124为 timeout 主动截停。go test -run '^$' ./...通过。go test ./pkg/consensus ./internal/pkg/storage/chain -count=1通过。go test -count=1 -timeout=520s ./...无缓存完整回归通过。git diff --check通过。govulncheck ./...已运行,结果只剩GO-2024-3218,无其它漏洞发现。