Skip to content

Perf: cache the fee table for the duration of the call #2377

Description

@Baskarayelu

Summary��cache the

ee table
or the duration o
the call.��## Background��We want to keep the invoice-lending protocol auditable and sa
e to change. Landing this issue tightens one speci
ic corner and gives reviewers a clear di

to reason about rather than a general "cleanup" commit. It should be scoped small enough to close in a single PR.��## Acceptance criteria��- [ ] The change matches the summary above.�- [ ] Tests cover the new behavior (happy path + one e
plicit
ailure mode).�- [ ] Lint, type-check, and tests all pass locally.�- [ ] PR description re
erences this issue with Closes #<this-issue>.��## Implementation hints��- Measure be
ore and a
ter — put the numbers (ms, allocations, gas) in the PR description.�- Pre
er algorithmic wins over micro-optimizations; pro
ile be
ore assuming.�- Do not sacri
ice readability
or a <5% improvement without justi
ication.��## Repo-speci
ic notes��- Soroban contract crate. Run cargo build --target wasm32-unknown-unknown --release to veri
y the change still builds
or WASM.�- Run cargo test -p <package>
or the a

ected crate and cargo clippy --workspace --all-targets -- -D warnings be
ore pushing.�- Keep #![no_std] discipline: do not introduce std:: calls; use soroban_sdk primitives.�- Any change touching invoice state MUST include a #[test] that
ails on main be
ore the
i
.��## Out o
scope��- Unrelated re
actors in adjacent
iles.�- Stylistic-only changes (
ormatting, renaming) that are not required by the
i
.�- Anything beyond the acceptance criteria above; sur
ace
ollow-ups as separate issues.��## How to claim and submit��
. Comment on this issue saying you'd like to take it on; wait
or a maintainer to assign you (avoids duplicated e

ort).�2. Open a PR that re
erences this issue (Closes #<this-issue>).�3. Make sure CI is green and request review
rom a CODEOWNERS maintainer.�4. PRs that close this issue and pass review may quali
y
or a reward — see the MAYBE REWARDED label and the FWC26 campaign page.��---��Category: per  ·  Campaign: GrantFo
OSS · O

icial Campaign | FWC26 · Maybe Rewarded

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions