Skip to content

Add GET /fee for frontend max_fee quotes - #37

Merged
stephenctw merged 2 commits into
mainfrom
feat/public-fee-endpoint
Sep 16, 2026
Merged

stephenctw merged 2 commits into
mainfrom
feat/public-fee-endpoint

Conversation

@stephenctw

Copy link
Copy Markdown
Collaborator

Summary

  • Adds public GET /fee so wallets can set signed max_fee before POST /tx.
  • Returns the open-frame fee, next-frame recommended_fee, and suggested_max_fee (max of those plus 1.5× log slack) so a signature can survive a frame rotation. Users still pay the real frame fee, not the cap.
  • Ingress CORS now allows GET; rust-client exposes get_fee().

Test plan

  • GET /fee on an admitted sequencer returns all three exponents; suggested_max_fee is max(fee, recommended_fee) + 53.
  • Copy suggested_max_fee into POST /tx; inclusion succeeds.
  • Browser preflight OPTIONS /fee from another origin succeeds; /livez still has no CORS.
  • GET /fee during shutdown (or with no open frame) returns 503 UNAVAILABLE.

Wallets need a number they can sign before POST /tx. Quote the open-frame
fee and recommended_fee, plus suggested_max_fee (max of those with 1.5x slack)
so inclusion can survive a frame rotation.
Share snapshot storage_task across ingress and egress so a panic or
corrupt DB aborts instead of returning 500 while POST /tx keeps running.

@GCdePaula GCdePaula left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM!

@stephenctw
stephenctw merged commit 16f94be into main Sep 16, 2026
8 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