Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

BL-11 follow-up: mainnet-grade randomness (VRF / multi-party commit-reveal) for dispute subgroup seed

Đang mở
#178 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
solidity
Lĩnh vực
blockchain, security

Hướng nghiên cứu

Read DINTaskCoordinator, _assignFreshSubgroup, and _shuffleAddressArray(address[], bytes32 seed), then inspect DisputeResolution.t.sol and the review on #151. Compare the VRF and multi-party commit-reveal options, including funding, timeouts, and anti-reroll incentives; coordinate with #156 on aggregation shuffles. Done means the seed resists bias by all named parties, missing randomness has a tested non-free-reroll outcome, existing tests pass, and NatSpec documents the trust model.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

enhancement

Context

Follow-up from #151, which is closed via PR #171 and tracked as BL-11 in Developer/BACK_LOG.md.

Since PR #171, DINTaskCoordinator seeds the dispute recomputation subgroup from a block in the future. openDispute sets seedBlock = block.number + disputeSeedDelay. After that block is mined, anyone can call lockDisputeSeed, which stores keccak256(blockhash(seedBlock), GI, tierKind, batchId). So the draw no longer depends on when the model owner calls resolveDispute.

What remains: on OP Stack, blockhash comes from the sequencer. A sequencer that wants a particular subgroup can grind the seed block. That's acceptable for DevNet/testnet, but not for mainnet.

What needs to change

Replace the source of randomness behind the dispute seed with one the sequencer can't bias. Options:

  1. VRF, e.g. Chainlink VRF v2.5 on OP. The seed is fulfilled by a callback, and lockDisputeSeed becomes a request/fulfil pair. Needs a subscription or funding model, plus handling for a VRF request that never gets fulfilled.
  2. Multi-party commit-reveal with a slashable non-reveal penalty. This has no external dependency, but the penalty must make aborting at the last reveal cost more than the value of re-rolling. See the review on #151 for why a commit-reveal where only one party commits doesn't work.

The seed-in, subgroup-out interface should stay the same. _assignFreshSubgroup and _shuffleAddressArray(address[], bytes32 seed) already take an explicit seed, so only the way the seed is produced should change.

Scope notes

  • Coordinate with #156. The aggregation-side shuffles (autoCreateTier1AndTier2, DINTaskAuditor._shuffleAddressArray) will probably need the same mainnet-grade source. Ideally a single randomness provider serves both.
  • BL-11 residual (2): if nobody calls lockDisputeSeed within about 256 blocks, the seed re-anchors and a second draw happens. Under VRF this goes away, but a VRF request that never gets fulfilled needs its own timeout and re-request path.
  • Not a DevNet 2.0 blocker. It must land before mainnet, or before dispute adjudication moves off the model owner, whichever comes first.

Acceptance criteria

  • The dispute seed no longer depends on blockhash, and its source can't be biased by the sequencer, the model owner, the challenger or the accused aggregators.
  • There is a defined, tested outcome for a seed that never arrives (a VRF request that isn't fulfilled, or a missed reveal), and it can't be used as a free re-roll.
  • Existing DisputeResolution.t.sol tests still pass, including the timing-independence test.
  • A trust-model NatSpec note explains what the new source trusts.
Ngôn ngữ chính
Python
Star
4
Fork
7
Merge trung bình
3 ngày 58 phút
Pull request đã merge (30 ngày)
39

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của InfiniteZeroFoundation/DevNet

Tất cả issue của InfiniteZeroFoundation/DevNet

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.