Auto-deploy MockKeystoneForwarder for experimental chains during simulation
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 52/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 静か
- 技術スタック
- go
- 領域
- blockchain, cli
調査の方向性
cmd/workflow/simulate/simulate.go の175行目付近にある missing-forwarder エラーから始め、次に test/MockKeystoneForwarder.json とシミュレーションの RPC フローを調べます。eth_getCode、CRE_ETH_PRIVATE_KEY、deployment がどのように処理されるかを確認します。forwarder が省略された場合に mock を再利用またはデプロイし、そのアドレスをログに記録し、forwarder が指定されている場合は既存の動作を維持できれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
When using experimental-chains in project.yaml, users must manually deploy a MockKeystoneForwarder contract and provide its address in the forwarder field. This adds friction to the local development workflow, especially when using tools like Anvil for local testing.
Current behavior
experimental-chains:
- chain-selector: 31337
rpc-url: http://127.0.0.1:8545
forwarder: "0x..." # User must deploy and provide this manually
If the forwarder field is missing or incorrect, the simulation silently fails — the forwarder can't deliver reports to the receiver contract, and there's no clear error message indicating the issue.
Proposed behavior
When cre workflow simulate runs with an experimental chain that has no forwarder specified:
- Compute a deterministic address for the MockKeystoneForwarder
- Check if code already exists at that address (eth_getCode) — if found, reuse it
- If no code found, auto-deploy it using the private key from CRE_ETH_PRIVATE_KEY
- Use the deployed/existing address for the simulation
- Log the address so the user is aware
This avoids redeploying on every simulation run while keeping the forwarder field optional, matching the seamless experience of official chains where the simulator handles this automatically.
Context
While setting up CRE workflow simulation against a local Anvil instance, we initially deployed the KeystoneForwarder contract instead of the MockKeystoneForwarder. The simulation appeared to succeed (returned a tx hash), but the forwarder's report delivery silently failed. There was no error indicating we needed the mock version. It took significant debugging — tracing transactions, checking ERC165 interface IDs, and inspecting ReportProcessed events — to discover the issue.
Auto-deploying the correct MockKeystoneForwarder during simulation would eliminate this confusion entirely and save developers from a non-obvious debugging path.
###Proposed implementation
The change would be in cmd/workflow/simulate/simulate.go around line 175, where it currently errors on missing forwarder:
return Inputs{}, fmt.Errorf("experimental chain %d missing forwarder", ec.ChainSelector)
Instead of erroring:
- Compute a deterministic address for the MockKeystoneForwarder (e.g., using CREATE2 or a fixed nonce)
- Call eth_getCode at that address — if bytecode exists, reuse it without redeploying
- If no code found, deploy using the user's private key from CRE_ETH_PRIVATE_KEY
- Log: "No forwarder specified for experimental chain %d — using MockKeystoneForwarder at %s"
The compiled artifact already exists in the repo at test/MockKeystoneForwarder.json. If forwarder is provided, behavior remains unchanged.
Happy to submit a PR if the team is open to this approach.
- 主要言語
- Go
- スター
- 24
- フォーク
- 29
- 平均マージ
- 1日 1時間
- マージ済み PR(30日)
- 8
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
smartcontractkit/cre-cli のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
smartcontractkit/cre-cli#430 ·
メンテナーはふだん 1 日以内に返信
-
`cre update` installs a glibc-2.38 binary on glibc-2.36 hosts and bricks the CLI (an `_ldd2-35` asset exists but is never selected)対応中かも @Tyagiquamar が 38 日前に担当しました。 オープン
難易度 4/5 3〜5日 初心者へのやさしさ 55/100
smartcontractkit/cre-cli#582 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
smartcontractkit/cre-cli#569 ·
メンテナーはふだん 1 日以内に返信
-
難易度 5/5 1週間以上 初心者へのやさしさ 15/100
smartcontractkit/cre-cli#507 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
smartcontractkit/cre-cli#328 ·
メンテナーはふだん 1 日以内に返信
smartcontractkit/cre-cli の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
documentation hacktoberfest priority: low skill: good first issue status: ready for dev
難易度 2/5 半日 初心者へのやさしさ 85/100
hyperledger-labs/fabric-smart-client#2142 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
numberly/vault-db-injector#107 ·
メンテナーはふだん 1 日以内に返信
-
area/import kind/bug
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
[DOC] Wrong sg_egress_ports range in the Terraform Databricks Guide for AWS Hub & Spoke with Network Firewall対応中かも @akhil9tiet が今日担当しました。 オープンdocs
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
databricks/terraform-provider-databricks#6080 · コメント 1 件 ·
メンテナーはふだん 3 日以内に返信