Skip to content

[codex] Reduce conservative RPC waste#426

Merged
fr1jo merged 1 commit into
mainfrom
codex/conservative-rpc-optimizations
May 8, 2026
Merged

[codex] Reduce conservative RPC waste#426
fr1jo merged 1 commit into
mainfrom
codex/conservative-rpc-optimizations

Conversation

@fr1jo

@fr1jo fr1jo commented May 8, 2026

Copy link
Copy Markdown
Contributor

Summary

  • bound Tractor Soil event scans relative to the latest block, with a current-season one-day query when season data is available
  • remove the navbar dependency on useFarmerActions() and use existing farmerSilo.flood.farmerSops data for the helper flood check
  • add missing freshness settings to farmer silo balance reads and the Cream wrapped-token exchange-rate read
  • rename the quote refresh constant so it matches the actual 60-second interval

Why

The previous Tractor Soil lookup used TIME_TO_BLOCKS.month as an absolute fromBlock, which can cause a large stale scan and still miss the intended current-soil context. The navbar helper also pulled the full farmer actions computation just to check whether flood assets existed. These changes trim high-confidence RPC and compute waste without changing the warmed nav-panel behavior.

Validation

  • yarn test src/__tests__/tractor/soil-event-query.test.ts
  • yarn biome check src/lib/Tractor/sowOrder/soil-event-query.ts src/__tests__/tractor/soil-event-query.test.ts src/lib/Tractor/sowOrder/tractor-sow.ts src/lib/Tractor/sowOrder/index.ts src/state/tractor/useTractorSowOrders.ts src/state/queryKeys.ts src/constants/query.ts src/state/useFarmerSilo.ts src/state/use3PSiloWrappedTokenData.ts src/components/nav/nav/Navbar.tsx
  • yarn build

Biome completed with existing warnings in touched files; no blocking diagnostics were reported. Build completed with the repo's existing Rollup/Browserslist/chunk-size warnings.

@netlify

netlify Bot commented May 8, 2026

Copy link
Copy Markdown

Deploy Preview for pintomoney ready!

Name Link
🔨 Latest commit 950448b
🔍 Latest deploy log https://app.netlify.com/projects/pintomoney/deploys/69fe277f7658600008ad9b43
😎 Deploy Preview https://deploy-preview-426.preview.pinto.money
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fr1jo fr1jo marked this pull request as ready for review May 8, 2026 18:14
@fr1jo fr1jo merged commit 599ff2d into main May 8, 2026
6 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.

1 participant