Skip to content

chore: cache chainInfo in embeddedwallet#22592

Merged
Thunkar merged 2 commits intomerge-train/fairiesfrom
gj/chain_info_caching
Apr 16, 2026
Merged

chore: cache chainInfo in embeddedwallet#22592
Thunkar merged 2 commits intomerge-train/fairiesfrom
gj/chain_info_caching

Conversation

@Thunkar
Copy link
Copy Markdown
Contributor

@Thunkar Thunkar commented Apr 16, 2026

A wallet is instantiated for a particular chain, and if an app supports multiple it is expected to recreate the whole thing. We are calling getChainInfo a surprising amount of times, so it makes sense to cache it for performance.

@Thunkar Thunkar requested a review from benesjan April 16, 2026 05:25
@Thunkar Thunkar self-assigned this Apr 16, 2026
Copy link
Copy Markdown
Contributor

@benesjan benesjan left a comment

Choose a reason for hiding this comment

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

Pushed that comment as I think it's helpful to have it there. LGTM

@Thunkar Thunkar enabled auto-merge (squash) April 16, 2026 06:07
@Thunkar Thunkar merged commit 6091ae6 into merge-train/fairies Apr 16, 2026
12 checks passed
@Thunkar Thunkar deleted the gj/chain_info_caching branch April 16, 2026 06:14
AztecBot pushed a commit that referenced this pull request Apr 16, 2026
A wallet is instantiated for a particular chain, and if an app supports
multiple it is expected to recreate the whole thing. We are calling
`getChainInfo` a surprising amount of times, so it makes sense to cache
it for performance.

---------

Co-authored-by: benesjan <janbenes1234@gmail.com>
@AztecBot
Copy link
Copy Markdown
Collaborator

✅ Successfully backported to backport-to-v4-next-staging #22580.

github-merge-queue bot pushed a commit that referenced this pull request Apr 17, 2026
BEGIN_COMMIT_OVERRIDE
feat: check noir release has nargo binaries before releasing (#22551)
chore: cache chainInfo in embeddedwallet (#22592)
fix: wrap external getCapsule in transactionAsync (#22595)
fix(pxe): throw clear error for invalid comparator in pick_notes
(#22585)
refactor(aztec-nr): rename conversion fns to encode_/decode_ naming
(#22576)
fix: adding transactions to PXE stores (#22603)
feat: infrastructure for testing `[new_contract_artfiacts,
old_aztec_stack]` (#22593)
chore: fix unnecessary and inconsistent side-effect counter increments
(#22245)
feat(aztec-nr): new BoundedVec emit private log APIs (#22064)
END_COMMIT_OVERRIDE
Thunkar added a commit that referenced this pull request Apr 17, 2026
BEGIN_COMMIT_OVERRIDE
fix(pxe): cap event filter toBlock to last synced block (#22573)
fix(pxe): round tx expiration timestamp to reduce precision (#22577)
fix: eliminate anvil watcher warp race and false success logs (#22584)
refactor: aztec new and init creating 2 crates (#20681)
test: aztec new scaffold works (#20711)
feat(cli): warning if contract crate has tests (#20723)
feat(cli): auto-recompiling when aztec test is run (#20729)
feat: aztec new supporting multiple contract crates (#21007)
feat: asserts that aztec dep version matches cli (#21245)
chore: backport aztec CLI improvements to v4-next (#22587)
feat: check noir release has nargo binaries before releasing (#22551)
chore: cache chainInfo in embeddedwallet (#22592)
fix: wrap external getCapsule in transactionAsync (#22595)
fix(pxe): throw clear error for invalid comparator in pick_notes
(#22585)
refactor(aztec-nr): rename conversion fns to encode_/decode_ naming
(#22576)
feat: infrastructure for testing `[new_contract_artfiacts,
old_aztec_stack]` (#22593)
chore: fix unnecessary and inconsistent side-effect counter increments
(#22245)
fix: update FaceID wallet redirects and strip anchors in redirect
validation (#22505)
docs: add getting started on testnet guide (#22366)
docs: add getting started on testnet guide (backport #22366) (#22619)
feat(aztec-nr): new BoundedVec emit private log APIs (#22064)
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants