Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#244 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@robertocarlous がすでに取り組んでいます。

2026年10月15日 から。

  • #254 @robertocarlous による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
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時間
マージ済み PR(30日)
34

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

InfiniteZeroFoundation/DevNet のほかの issue

InfiniteZeroFoundation/DevNet の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。