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

Improve speculative shielded ctx #4019

Merged
merged 7 commits into from
Nov 21, 2024
Merged

Conversation

grarco
Copy link
Collaborator

@grarco grarco commented Nov 13, 2024

Describe your changes

Closes #3457.
Closes #2593.

Moved the transition to the SpeculativeContext from the SDK to the client to have access to the (possible) tx result. The transition is now performed when:

  • the submitted transaction is successfully applied
  • the transaction is broadcasted
  • the transaction is dumped to storage

The transition is not performed when:

  • the transaction gets dry-run
  • the transaction is loaded from storage

Added an integration test to verify the behavior of the client when in a speculative context.

Checklist before merging

  • If this PR has some consensus breaking changes, I added the corresponding breaking:: labels
    • This will require 2 reviewers to approve the changes
  • If this PR requires changes to the docs or specs, a corresponding PR is opened in the namada-docs repo
    • Relevant PR if applies:
  • If this PR affects services such as namada-indexer or namada-masp-indexer, a corresponding PR is opened in that repo
    • Relevant PR if applies:

@grarco grarco marked this pull request as ready for review November 13, 2024 13:17
@grarco grarco mentioned this pull request Nov 13, 2024
2 tasks
@grarco grarco requested review from batconjurer and sug0 November 13, 2024 13:43
@grarco grarco added the breaking:SDK SDK breaking change label Nov 13, 2024
Copy link
Member

@batconjurer batconjurer left a comment

Choose a reason for hiding this comment

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

Apart from sug0's requested changes, this looks fine

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 73.91%. Comparing base (b2332bf) to head (33dd44f).
Report is 87 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4019      +/-   ##
==========================================
- Coverage   73.92%   73.91%   -0.01%     
==========================================
  Files         341      341              
  Lines      106510   106496      -14     
==========================================
- Hits        78740    78720      -20     
- Misses      27770    27776       +6     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

Copy link
Collaborator

@sug0 sug0 left a comment

Choose a reason for hiding this comment

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

couple of nits but otherwise lgtm

@grarco grarco added merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass backport-45 labels Nov 21, 2024
mergify bot added a commit that referenced this pull request Nov 21, 2024
mergify bot added a commit that referenced this pull request Nov 21, 2024
mergify bot added a commit that referenced this pull request Nov 21, 2024
mergify bot added a commit that referenced this pull request Nov 21, 2024
@mergify mergify bot merged commit 86758e1 into main Nov 21, 2024
23 of 25 checks passed
@mergify mergify bot deleted the grarco/improve-speculative-shielded-ctx branch November 21, 2024 10:43
mergify bot pushed a commit that referenced this pull request Nov 21, 2024
(cherry picked from commit aa93c61)
mergify bot added a commit that referenced this pull request Nov 21, 2024
Improve speculative shielded ctx (backport #4019)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking:SDK SDK breaking change merge Ready to merge - mergifyio bot will add the PR to merge queue when all checks pass
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wrong shielded balance in query Improve Speculative ShieldedContext
3 participants