dincli: create-testdataset --submit sets the one-shot TestDataAssignedFlag even when a batch's assignment tx failed
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 72/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- python, solidity
- 領域
- blockchain, cli
調査の方向性
Start in dincli/cli/modelownerd/auditor_batches.py around lines 198-253 and check how build_and_send_tx reports success or failure. Trace the one-shot flag behavior in foundry/src/DINTaskAuditor.sol around lines 1033-1046. Done means failed batch IDs are reported and the flag is set only after every assignment succeeds; run the relevant CLI tests if available.
索引モデルが issue の本文から書いたものです。
説明
Summary
model-owner auditor-batches create-testdataset --submit loops over every auditor batch sending assignAuditTestDataset, never checks whether any individual batch's transaction actually succeeded, and then unconditionally sets a one-shot "all test data assigned" flag on-chain regardless. If one batch's assignment silently failed, the contract is left permanently asserting something that isn't true, with no way to go back and fix just that batch.
Where
dincli/cli/modelownerd/auditor_batches.py (~lines 198-253), verified against develop (fetched fresh):
for batch_id in range(audtor_batch_count):
...
build_and_send_tx(
ctx,
taskauditor_contract.functions.assignAuditTestDataset(
curr_GI, batch_id, encrypted_cid, encrypted_keys, commitment
),
f"Assigning test dataset for auditor batch {batch_id}",
f"Test dataset assigned for auditor batch : {batch_id}",
f"Failed to assign test dataset for auditor batch : {batch_id}",
exit_on_failure=False, # return value discarded, loop continues regardless
)
time.sleep(5)
build_and_send_tx(
ctx,
taskCoordinator_contract.functions.setTestDataAssignedFlag(curr_GI, True), # unconditional
"Setting test dataset assigned flag",
"Test dataset assigned for auditor batches",
"Failed to set test dataset assigned flag",
exit_on_failure=False,
)
setTestDataAssignedFlag (foundry/src/DINTaskAuditor.sol:1033-1046) is one-shot — TA_FlagAlreadySet on any second call:
function setTestDataAssignedFlag(uint _GI, bool flag) external onlyTaskCoordinator onlyCurrentGI(_GI) returns (bool) {
if (dintaskcoordinatorContract.GIstate() != GIstates.AuditorsBatchesCreated)
revert TA_CannotSetTestDataAssignedFlag();
if (!flag) revert TA_FlagMustBeTrue();
if (Is_testdataCIDs_Assigned[_GI]) revert TA_FlagAlreadySet(); // <-- no way back
Is_testdataCIDs_Assigned[_GI] = flag;
return true;
}
Failure sequence
- Batch 0's
assignAuditTestDatasetsucceeds. Batch 1's fails (RPC hiccup, gas, anythingbuild_and_send_txcatches internally) — it prints a red error line and returnsNone, but the loop just moves on to batch 2 since the return value is never inspected. - The loop finishes anyway.
setTestDataAssignedFlag(curr_GI, True)still runs and succeeds — nothing on-chain or in the CLI ties that flag to whether every batch's assignment actually landed. - Auditors assigned to batch 1 later call
encryptedTestDataKey(gi, 1, their_address)during evaluation (dincli/cli/auditor.py:477-479) and get empty bytes back, soBox(...).decrypt(...)throws — caught generically atauditor.py:498-500as "failed to decrypt test data." The auditor has no way to tell the real cause is an incomplete assignment on the model owner's side, not something wrong on their end. - No recovery path exists. Even after noticing and fixing/retrying batch 1's
assignAuditTestDataset(which itself has no on-chain one-shot guard, so it CAN be retried), the CLI only exposes it bundled inside this all-or-nothing loop — no--batchoption to retry a single one — andsetTestDataAssignedFlagcan't be called again to "re-confirm" since it's alreadyTrue. The on-chain record permanently asserts "test data fully assigned for this GI" when it isn't.
Impact
Any auditor assigned to the batch that silently failed is unable to evaluate for that entire GI, with a misleading error message, and the model owner has no way to detect or fix the gap after the fact — the flag already says everything's fine.
Suggested fix
Collect each batch's build_and_send_tx return value in the loop; only call setTestDataAssignedFlag if every batch succeeded. On partial failure, report exactly which batch IDs failed and exit before setting the flag, so the operator can retry (ideally via a --batch <id> option to resubmit just the failed one(s) without re-running the whole loop) before the one-shot flag gets set.
- 主要言語
- Python
- スター
- 4
- フォーク
- 7
- 平均マージ
- 3日 58分
- マージ済み PR(30日)
- 39
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
InfiniteZeroFoundation/DevNet のほかの issue
-
dincli: `task model-owner register-request --manifestCID` fails because the registry contract isn't initialised対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンbug good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
InfiniteZeroFoundation/DevNet#295 ·
メンテナーはふだん 1 日以内に返信
-
ROADMAP.md: refresh "What is still open for P3" (several items were fixed in October)対応中かも @umermjd11 が 1 日前に担当しました。 オープンdocumentation good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
InfiniteZeroFoundation/DevNet#285 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
good first issue help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InfiniteZeroFoundation/DevNet#277 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
InfiniteZeroFoundation/DevNet#266 ·
メンテナーはふだん 1 日以内に返信
-
Approved documentation
難易度 1/5 1〜3時間 初心者へのやさしさ 82/100
InfiniteZeroFoundation/DevNet#248 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
InfiniteZeroFoundation/DevNet の issue をすべて見る
似ている issue
-
area/profiles comp/cli P3 type/feature
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
NousResearch/hermes-agent#146372 ·
メンテナーはふだん 1 日以内に返信
-
[BUG] OpenAI-compatible embedding model alias breaks embedder construction対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
メンテナーはふだん 1 日以内に返信
-
[oblt-aw][autodoc] Document obs-aw-automerge contract and fix automerge doc inconsistencies対応中かも @github-actions が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
GeoSeries scale and skew tests fail with pytest 9.2.0対応中かも @jiayuasu が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
メンテナーはふだん 1 日以内に返信
-
admission-deferred priority: medium status: ready work-class: scoped
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
melodic-software/claude-code-plugins#10887 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信