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

BL-25: cache_model_0/abis/ task-contract artifacts are stale vs. foundry/src (missing 67/96 ABI entries)

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

维护者通常 1 天内回复

@robertocarlous 已经在做这个了。

开始于 2026年10月16日。

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

评估

难度
4/5
预计耗时
3-5 天
新手友好度
42/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
python, solidity

调研方向

Read cache_model_0/manifest.json, foundry/foundry.toml, and dincli/cli/context.py to understand artifact metadata and CID resolution; then build the contracts with forge build in foundry. Regenerate the coordinator and auditor artifacts from foundry/out, update their manifest type and compilation details, and re-pin both files to IPFS with the resulting CIDs. Done when both ABIs contain the entries from foundry/src and the manifest resolves the regenerated artifacts.

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

描述

Approved bug

Summary

cache_model_0/abis/DINTaskCoordinator.json and DINTaskAuditor.json are hardhat artifacts last regenerated 2026-06-09. They are missing 67 ABI entries for the coordinator (104 vs. 170 in foundry/src) and 96 entries for the auditor (68 vs. 158), and carry pre-foundry constructors.

PR #171 regenerated the six bundled dincli/abis/ files from foundry/out but explicitly left these alone because cache_model_0/manifest.json's task_contracts block:

  • pins each artifact to an IPFS CID
  • records "type": "hardhat-artifact" and a hardhat/cancun/optimizer-off compilation block
  • carries the currently deployed contract addresses

Regenerating the files locally without updating the manifest would leave the manifest describing artifacts it no longer points to and dincli's CID-based resolution would still fetch the old files from IPFS.

Impact

Any model owner or tool that follows cache_model_0 as a reference and resolves task-contract ABIs through the manifest will hit ABI encoding mismatches on the ~67 / ~96 entries added since the last hardhat regeneration — covering all reward settlement, commit-reveal, seed-lock, encrypted-test-data, and dispute-resolution surfaces added in P3.

Fix (one pass)

  1. Regenerate both ABI files from foundry/out with full bytecode:
    cd foundry && forge build
    # extract from foundry/out/DINTaskCoordinator.sol/DINTaskCoordinator.json
    # extract from foundry/out/DINTaskAuditor.sol/DINTaskAuditor.json
    
    or via a new dincli system dump-abi --bytecode --output cache_model_0/abis if that subcommand lands first.
  2. Update cache_model_0/manifest.json:
    • Change "type" from "hardhat-artifact" to "foundry-artifact".
    • Update the compilation block to reflect foundry / solc 0.8.28 / via-IR / optimizer-off (matching foundry/foundry.toml).
    • Re-pin both files to IPFS and update their CIDs.
  3. Addresses only change on a contract redeploy — no address update needed unless a redeploy happens concurrently.

References

  • Developer/BACK_LOG.md BL-25
  • PR #171 merge note — cache_model_0/abis/ explicitly left out of scope
  • cache_model_0/manifest.json task_contracts block
  • dincli/cli/context.py _resolve_task_artifacts — CID-based ABI resolution path
主要语言
Python
星标
4
派生
7
平均合并
3 天 4 小时
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 摘要。