Auto-deploy MockKeystoneForwarder for experimental chains during simulation
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 52/100
- Issue-Typ
- Feature
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Ruhig
- Tech-Stack
- go
- Bereich
- blockchain, cli
Rechercherichtung
Beginne in cmd/workflow/simulate/simulate.go beim Fehler wegen des fehlenden Forwarders nahe Zeile 175 und untersuche anschließend test/MockKeystoneForwarder.json sowie den RPC-Ablauf der Simulation. Überprüfe, wie eth_getCode, CRE_ETH_PRIVATE_KEY und das Deployment gehandhabt werden. Als erledigt gilt, dass ein nicht angegebener Forwarder den Mock wiederverwendet oder deployt, seine Adresse protokolliert und das bestehende Verhalten beibehält, wenn einer angegeben ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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.
- Vorherrschende Sprache
- Go
- Sterne
- 24
- Forks
- 29
- Ø Merge
- 1 T. 1 Std.
- Gemergte PRs (30 T.)
- 8
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus smartcontractkit/cre-cli
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
smartcontractkit/cre-cli#430 ·
Maintainer antworten meist innerhalb von 1 Tag
-
`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)Evtl. vergeben @Tyagiquamar hat das vor 38 Tagen übernommen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
smartcontractkit/cre-cli#582 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 35/100
smartcontractkit/cre-cli#569 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 5/5 Über eine Woche Anfängerfreundlichkeit 15/100
smartcontractkit/cre-cli#507 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 48/100
smartcontractkit/cre-cli#328 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in smartcontractkit/cre-cli
Ähnliche Issues
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:session-state issue-rating: 🦞 diamond lobster no-stale P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
openclaw/wacli#503 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 81/100
apache/rocketmq-dashboard#6895 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
agent-butler-finding chore
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 88/100
jordansmall/spindrift#5466 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
open-telemetry/opentelemetry-go-compile-instrumentation#1507 ·
Maintainer antworten meist innerhalb von 3 Tagen
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 87/100
777genius/agent-notifications#490 ·
Maintainer antworten meist innerhalb von 1 Tag