deriveOnChainId hashes UUIDs into u64 keys with no collision check, and milestone/pool keys share the escrow contract's issue_id space

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

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

@urielit1313-creator がすでに取り組んでいます。

2026年10月13日 から。

  • #646 @urielit1313-creator による — オープン
  • #653 @yggdrasilworld による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
blockchain, typescript

調査の方向性

Start from EscrowService.deriveOnChainId, which hashes the UUID into the on-chain issue_id, and trace how milestone and pool escrows share that key space with GitHub-issue-keyed bounties. The work is already under way: PRs #646 and #653 are open against this issue, so check them before starting. Done means derived keys cannot collide with live escrows and the mapping is persisted.

索引モデルが issue の本文から書いたものです。

説明

bug security

Problem

EscrowService.deriveOnChainId FNV-1a-64-hashes the bounty/milestone/pool UUID to get the on-chain issue_id. Milestone escrows are funded on the escrow contract (until #162), in the same u64 key space as bounties keyed by real GitHub issue ids. Nothing checks for a collision with an existing on-chain escrow. A hashed key that equals a live GitHub-issue-keyed escrow makes fund fail with AlreadyFunded, or worse, after that escrow terminates, silently re-uses its key and stale contribution records (contracts #41).

Suggested fix

Namespace the keys (e.g. high bit set for derived ids), call get_escrow before funding to detect collisions, and persist the mapping.

Related: #158, #162

主要言語
TypeScript
スター
2
フォーク
90
平均マージ
31分
マージ済み PR(30日)
20

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

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

MergeFi/backend のほかの issue

MergeFi/backend の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

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

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