Skip to content

fix(indexer): adjust Base block time - #18

Merged
shoom3301 merged 1 commit into
cowprotocol:mainfrom
shoom3301:fix/base-block-time
Nov 6, 2026
Merged

shoom3301 merged 1 commit into
cowprotocol:mainfrom
shoom3301:fix/base-block-time

Conversation

@shoom3301

Copy link
Copy Markdown
Collaborator

Base’s block times decreasing from 1s to 200ms after yesterday’s Denim hardfork

@shoom3301
shoom3301 force-pushed the fix/base-block-time branch from ac4bd1e to 06491dd Compare November 6, 2026 08:53
@shoom3301

Copy link
Copy Markdown
Collaborator Author

AI review (Claude Code) — no blocking issues

Reviewed at 06491dd (src/chains/base.ts, Ponder patch, lockfile).

Checked and correct

  • blockTime = 0.2 divides exactly in JS: ceil(60/0.2)=300, ceil(5/0.2)=25, round(40/0.2)=200. OrderDiscoveryPoller stays ~60s, CandidateConfirmer/OrderStatusTracker ~5s, orderbook recheck 40s.
  • Ponder patch: getFinalityBlockCount → 300 for 8453/84532 is applied in node_modules and is only read in build/config.js (chain finalityBlockCount). 300 × 200ms ≈ 60s, the same reorg depth Base had at 2s blocks.
  • orderbookPollInterval / reorgSafetyWindowSeconds are wall-clock seconds, unaffected.
  • The fixed block-count cadences (FlashLoanOrderEnricher / OwnerBackfillLive / CancellationWatcher every 10 blocks ≈ 2s, cancel sweep 100 blocks ≈ 20s, tryNextBlock backoff absorbed by the 300-block poller interval) are now documented accurately. They put Base close to Arbitrum (0.3s → 3s / 30s), which already runs this way in production, so this isn't a new load profile.

Nits (optional)

  • The comment says "matches Arbitrum"; strictly it's slightly faster (2s vs 3s, 20s vs 30s). "comparable to Arbitrum" would be more accurate.
  • case 84532 (Base Sepolia) has no effect since that chain isn't configured. It's harmless.

Follow-up (separate PR, not blocking): these fixed block counts could be given a minimum in seconds so sub-second chains (Base, Arbitrum, BNB) don't run them every couple of seconds. That changes several chains, so it doesn't belong in this hotfix.

CI: Lint/Typecheck/Codegen and image build were still pending at review time; locally pnpm typecheck and pnpm lint pass.

@glokos glokos left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@shoom3301

Copy link
Copy Markdown
Collaborator Author

The build failed, but it's because of lack of permissions:

ERROR: Post "https://results-receiver.actions.githubusercontent.com/twirp/github.actions.results.api.v1.CacheService/GetCacheEntryDownloadURL": failed to push ghcr.io/cowprotocol/cow-programmatic-orders-api:pr-18: denied: installation not allowed to Write organization package

@shoom3301
shoom3301 merged commit d9d313e into cowprotocol:main Nov 6, 2026
3 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants