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

BL-33: On-chain deployment drift check — verify foundry/deployments/<network>.json still matches the chain

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

维护者通常 1 天内回复

@robertocarlous 已经在做这个了。

开始于 2026年10月15日。

  • #254 来自 @robertocarlous —— 未关闭

评估

难度
5/5
预计耗时
一周以上
新手友好度
35/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python, solidity

调研方向

Read foundry/deployments/<network>.json, dincli/cli/system.py around import_deployments, and Developer/BACK_LOG.md BL-33 to understand the deployment records. Then inspect the Foundry scripts and contract interfaces for the listed proxy slots, ownership, wiring, and slasher checks. Done means a read-only verifier reports expected and actual values for each recorded contract and exits non-zero on any drift.

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

描述

Approved enhancement

Summary

Nothing currently verifies that foundry/deployments/<network>.json (and the din_info that dincli system import-deployments writes) still matches what is actually deployed. A fresh clone, a failed upgrade, or a manual intervention can leave the recorded addresses and the chain out of sync with no visible signal.

Proposal

A read-only check — either a forge script (script/VerifyDeployment.s.sol) or a new dincli system verify-deployment subcommand — that for each contract recorded in the deployments JSON reports OK or DRIFT with expected vs. actual values for:

  1. Proxy implementation slot — read EIP-1967 bytes32(uint256(keccak256("eip1967.proxy.implementation")) - 1) and compare against the recorded implementation address.
  2. Proxy admin slot — read EIP-1967 bytes32(uint256(keccak256("eip1967.proxy.admin")) - 1) and compare against the recorded proxyAdmin* address.
  3. Runtime code hash — keccak256(extcode(implementation)) vs. keccak256 of the current forge build artifact's deployedBytecode (immutables masked out via forge inspect --json).
  4. Owner / DIN-Representative addresses — call owner() on each ownable contract and compare.
  5. Wiring — DinCoordinator ↔ DinToken / DinValidatorStake / DinModelRegistry / fee router / treasury links, and slasher authorizations on DinValidatorStake.

Exit non-zero on any DRIFT row.

When to run

  • Before every DevNet 3.0 deploy.
  • After every UpgradePlatform.s.sol run.
  • As an optional CI step on pushes that touch foundry/script/.

Limitations

This check only covers what the deployments JSON records. A clean run does not prove nothing else was deployed or authorized outside that file.

References

  • Developer/BACK_LOG.md BL-33
  • foundry/deployments/ (network JSON files)
  • dincli/cli/system.py import_deployments — the import side that reads the same JSON
  • Terraform state-vs-live drift pattern (Osomudeya/devops-scripting-labs 03-drift-detection, reviewed 2026-10-02)
主要语言
Python
星标
4
派生
7
平均合并
3 天 5 小时
30 天内合并 PR
34

环境准备

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

从这里开始

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

InfiniteZeroFoundation/DevNet 的其他 Issue

查看 InfiniteZeroFoundation/DevNet 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

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