improve(evm-rpc): rewrite Rust section with evm_rpc_client, add evals#143
Open
improve(evm-rpc): rewrite Rust section with evm_rpc_client, add evals#143
Conversation
Addresses #135 (observations 1, 5), #136 (findings 1, 4). Rust section: - Replace ~180 lines of manually defined Candid types with evm_rpc_client crate - Use EvmRpcClient builder API instead of raw Call::unbounded_wait - Resolve EVM RPC canister ID via environment variable (works locally and on mainnet) - Default to Threshold consensus (2-of-3) instead of Equality - Add per-request chain override example (Arbitrum) icp.yaml: - Switch to Rust recipe (@dfinity/rust@v3.2.0) - Use latest release URL for pre-built WASM - Add environments section (evm_rpc local-only, mainnet ID via env var) Pitfalls: - Add: default Equality consensus fails for Latest block queries - Add: do not define EVM RPC types manually - Remove: Motoko-specific Cycles.add pitfall - Remove: Motoko-specific null config pitfall - Adjust remaining pitfalls to Rust syntax Other: - Remove Motoko section (pending icp-cli canister: import verification) - Remove broken icp deps commands in deploy section - Remove redundant Verify It Works section - Add Candid interface URL and canhelp cross-reference - Add Candid column to Supported Chains table Evaluations: - Add evaluations/evm-rpc.json with 4 output evals and 13 trigger evals
Skill Validation ReportValidating skill: /home/runner/work/icskills/icskills/skills/evm-rpcStructure
Frontmatter
Markdown
Tokens
Content Analysis
Contamination Analysis
Result: passed Project Checks |
…ic diagnostic answers
Member
Author
Re-run eval results after loosening cycle cost awareness expectations
The original expected behaviors were too narrow (required exact mention of "refunds" and Updated totals with skill: 16/16 passed (100%) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
evm_rpc_clientcrate, preventing type drift and IC0503 decode traps (Skill improvements based on real-world session analysis (Kairos + ClearDeck) #136 finding 1)PUBLIC_CANISTER_ID:evm_rpcenvironment variable — works on both local and mainnet without code changesConsensusStrategy::Threshold { total: 3, min: 2 }instead ofEquality(which fails forLatestblock queries)icp.yamlto scopeevm_rpccanister to local-only deploymentcanister:import with icp-cli pre-built canisters)evaluations/evm-rpc.jsonwith 4 output evals and 13 trigger evalsAddresses #135 (observations 1, 5), #136 (findings 1, 4).
End-to-end tested: compiled, deployed locally, and verified all read-only endpoints (get_eth_balance, get_latest_block, get_erc20_balance, get_transaction_receipt) return correct data from Ethereum mainnet.
Eval results (with skill vs without skill)
Output evals
With skill: 13/16 passed (81%)
Without skill: 3/16 passed (19%)
Notable: without the skill, the agent manually defined Candid types (the exact anti-pattern that caused 2+ hours of wasted iteration in #136), used deprecated
call_with_payment128instead of the client crate, and recommendedBlockTag::Finalizedinstead of Threshold consensus for the inconsistency issue.Trigger evals
Triggers: 13/13 correct (100%)