Repository navigation
Conversation
Ticket.Exec_Genesis 缺少 coins/coinsx/token 都有的 height 校验:任意高度都能重入 GenesisInit,造出 isGenesis=true、3 段 ticketId 的“创世票”——既绕过 pubHash 校验 (3 段 id 的 privHash 恒为空),又绕过成熟期与提现等待。分叉生效后受害矿工会把这种 票当成自己的票挖出来,ExecDepositFrozen 把出块奖励增发到攻击者的 ReturnAddress, 攻击者可立即 Tclose 提走,本金零锁仓。 - 执行器层:高度 != 0 直接返回 ErrReRunGenesis;不依赖 chain33 侧新增的框架分叉, 在旧版本 chain33 上同样生效 - 回归用例:executor 层断言高度 1.7M 上的 Genesis 被拒绝、高度 0 的正常创世路径 不受影响(并直接调用执行器方法验证执行器自身的校验);testnode 端到端断言交易 可以进块但回执非 ExecOk、链上不产生伪造票、受害矿工挖不到伪造票 - 原 PoC 用例改为修复后的回归断言
…s fork 接入 chain33 新增的系统分叉 ForkGenesisOnlyAtHeightZero(创世动作 Genesis 只允许在 高度 0 执行,由 DriverBase.checkGenesisHeight 在 Exec 与 ExecLocal/ExecDelLocal 派发 前统一拦截): - github.com/33cn/chain33 升到 v1.72.1-0.20261016021757-b12c753ff90b:该提交是在当前 pin 的 v1.72.0 之上只回移本次修复(chain33 分支 fix/genesis-only-height-zero-v1.72.0, 含 #1407 review 的补钉),避免把 chain33 master 上 30+ 个无关改动一并带入——实测直接 跳到 master 会让 ci_rgbx 的 TSS/DKG 场景稳定超时。上游修复见 33cn/chain33#1407 - 5 个含真实 [fork.system] 的配置补上 ForkGenesisOnlyAtHeightZero=0。chain33 的 initForkConfig 要求每个已注册的系统分叉都必须出现在配置里,缺键或未知键都会让节点 启动失败,因此版本升级与配置补键必须落在同一次提交 - 验证:go test ./plugin/dapp/ticket/... 全绿
Collaborator
Author
|
诊断完成,结论见 33cn/chain33#1408:dht 在钱包就绪后替换节点身份导致 TSS peers 失效;chain33 修复后 ci_rgbx 通过。关闭并移除该临时分支。 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1338 +/- ##
==========================================
+ Coverage 23.86% 23.98% +0.11%
==========================================
Files 1122 1122
Lines 223699 223809 +110
==========================================
+ Hits 53395 53672 +277
+ Misses 164697 164490 -207
- Partials 5607 5647 +40 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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(不要合并):定位
ci_rgbx在 chain33 v1.72.6 上失败的原因。假设:CI 在重启前发现 para 节点的 DHT peer 名并写进 TSS peers 配置,如果 chain33 v1.72.1+ 的
改动让节点身份在重启后发生变化,配置里的 peers 就失效,DKG 无法完成。
本 PR 只加日志:重启前后各打印一次 peer 名,超时导出容器日志;依赖固定为 v1.72.6。