Open
Conversation
Chains with sub-200ms block production (e.g., Base Flashblocks) have unreliable "pending" block state. When `flashblocks = true` is set in a chain's config, gas estimation uses `BlockId::latest()` instead of `BlockId::pending()`, matching the upstream x402-rs behavior. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
kbak
added a commit
to kbak/infra402-facilitator
that referenced
this pull request
Feb 11, 2026
…st-block chains
…as estimation When flashblocks=true, the previous commit only changed gas estimation to use BlockId::latest(). But verification simulation calls (via call_with_fallback) still tried the default "pending" block tag first, which is unreliable on chains with sub-200ms blocks (e.g., Base Flashblocks). The "pending" state can return stale/inconsistent data causing simulations to revert with generic "Contract call failed" errors that don't match the "Unsupported pending" fallback check. Now call_with_fallback accepts a flashblocks flag and skips the pending attempt entirely when true, going straight to BlockId::latest(). This aligns with upstream x402-rs which never forces "pending" on verification calls. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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
flashblocks: boolconfig flag toChainConfigfor chains with sub-200ms block production (e.g., Base Flashblocks)BlockId::latest()instead ofBlockId::pending(), which is unreliable on fast-block chainsEvmProviderChanges
src/config.rs: Newflashblocksfield onChainConfig(defaults tofalse)src/chain/evm.rs: ThreadflashblocksthroughEvmProvider, use insend_transaction()gas estimationconfig.toml: Enableflashblocks = truefor Base chainTest plan
cargo test --lib— 141 tests passcargo clippy— no new warnings🤖 Generated with Claude Code