Skip to content

fix: skip suggested params cache on algod devmode - #601

Open
mitre88 wants to merge 1 commit into
algorandfoundation:mainfrom
mitre88:mitre88/fix/devmode-suggested-params-cache
Open

fix: skip suggested params cache on algod devmode#601
mitre88 wants to merge 1 commit into
algorandfoundation:mainfrom
mitre88:mitre88/fix/devmode-suggested-params-cache

Conversation

@mitre88

@mitre88 mitre88 commented Aug 20, 2026

Copy link
Copy Markdown

Proposed Changes

  • On the first getSuggestedParams() call, read algod genesis.devmode.
  • If the node is in developer mode and the caller has not set an explicit cache timeout, stop caching suggested params so firstValid/lastValid keep up with per-transaction blocks.
  • An explicit setSuggestedParamsCacheTimeout(...) still wins.

Closes #273.

Validation

  • npx vitest run src/types/algorand-client.suggested-params.spec.ts --coverage=false (3 passing, no LocalNet)

Detection uses the same algod.genesis() JSON the repo already parses in kmd-account-manager.ts.

On first suggested-params fetch, read genesis.devmode. If the network
is in developer mode and the caller has not set an explicit cache
timeout, stop caching params so firstValid/lastValid keep up with
per-transaction blocks.

Closes algorandfoundation#273.
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.

if an AlograndClient connects to algod in devmode don't cache params

1 participant