Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wasmd precompile: QuerySmart to always use cached ctx #1908

Merged
merged 13 commits into from
Nov 7, 2024

Conversation

jewei1997
Copy link
Contributor

@jewei1997 jewei1997 commented Oct 28, 2024

Describe your changes and provide context

Use wrapped version of QuerySmart called QuerySmartSafe that always uses a cachedCtx instead of just a normal tx context to make sure changes don't get written to underlying store for a query operation.

Relies on sei-protocol/sei-wasmd#65

Testing performed to validate your change

existing tests.

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

Attention: Patch coverage is 33.33333% with 2 lines in your changes missing coverage. Please review.

Project coverage is 61.38%. Comparing base (0dd7724) to head (6ae27bb).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
precompiles/pointer/pointer.go 0.00% 2 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1908      +/-   ##
==========================================
- Coverage   61.56%   61.38%   -0.19%     
==========================================
  Files         263      263              
  Lines       23358    23358              
==========================================
- Hits        14381    14338      -43     
- Misses       7968     8015      +47     
+ Partials     1009     1005       -4     
Files with missing lines Coverage Δ
precompiles/wasmd/wasmd.go 60.62% <100.00%> (ø)
precompiles/pointer/pointer.go 36.00% <0.00%> (ø)

... and 3 files with indirect coverage changes

@jewei1997 jewei1997 force-pushed the query-smart-cached-ctx branch from fc14398 to 0b3d994 Compare October 30, 2024 14:03
@jewei1997 jewei1997 changed the base branch from main to yiren/gas-limit-interop-ops October 30, 2024 14:03
@jewei1997 jewei1997 changed the title Wasmd precompile: QuerySmart to always use cached ctx and inf gas meter Wasmd precompile: QuerySmart to always use cached ctx Oct 30, 2024
Base automatically changed from yiren/gas-limit-interop-ops to main October 30, 2024 16:02
@jewei1997 jewei1997 requested review from udpatil and codchen October 30, 2024 19:59
@jewei1997 jewei1997 enabled auto-merge (squash) November 7, 2024 18:39
@jewei1997 jewei1997 merged commit c7a4b81 into main Nov 7, 2024
48 of 49 checks passed
@jewei1997 jewei1997 deleted the query-smart-cached-ctx branch November 7, 2024 18:48
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