Integrate Frontier's fix for eth_getTransactionReceipt race condition#3651
Integrate Frontier's fix for eth_getTransactionReceipt race condition#3651
eth_getTransactionReceipt race condition#3651Conversation
WalkthroughThis PR adds block retrieval by number to the lazy-loading backend and RPC client layers, and introduces a retry-enabled test helper function for more resilient block fetching. The helper is then integrated across multiple test suites to replace direct block fetch calls. Changes
Sequence DiagramsequenceDiagram
participant Test
participant Helper as getBlockWithRetry
participant RPC Client
participant Backend
Test->>Helper: getBlockWithRetry(context, options)
Helper->>RPC Client: block_by_number(blockNumber)
RPC Client->>Backend: block_by_number(blockNumber)
Backend->>RPC Client: Result<Option<H256>, String>
RPC Client->>Helper: Result<Option<Block>>
alt BlockNotFoundError or timeout
Helper->>Helper: Wait delayMs
Helper->>RPC Client: Retry (until maxAttempts)
else Success
Helper->>Test: Return Block
end
Test->>Test: Assert block properties
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
WASM runtime size check:Compared to target branchMoonbase runtime: 2120 KB (no changes) ✅ Moonbeam runtime: 2236 KB (no changes) ✅ Moonriver runtime: 2236 KB (no changes) ✅ Compared to latest release (runtime-4102)Moonbase runtime: 2120 KB (+184 KB compared to latest release) Moonbeam runtime: 2236 KB (+200 KB compared to latest release) Moonriver runtime: 2236 KB (+204 KB compared to latest release) |
What does it do?
Integrate Frontier's fix for
eth_getTransactionReceiptrace condition: polkadot-evm/frontier#1802