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

feat: implement message v0 compilation #27524

Merged
merged 4 commits into from
Sep 7, 2022

Conversation

jstarry
Copy link
Member

@jstarry jstarry commented Sep 1, 2022

Problem

No easy way to create transactions with lookup tables

Summary of Changes

  • Add MessageAccountKeys class to provide an abstraction over a message's static and dynamic (using lookup tables) account keys. This class is used during message compilation.
  • Add CompiledKeys class to track account key metadata during message compilation. This is only intended for internal use.
  • Add MessageV0.compile method for creating a v0 transaction message with address lookup tables. The compile method will attempt to load as many account keys as possible from the provided address lookup tables.

Fixes #

@codecov
Copy link

codecov bot commented Sep 1, 2022

Codecov Report

Merging #27524 (c159dca) into master (e779032) will increase coverage by 0.6%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master   #27524     +/-   ##
=========================================
+ Coverage    76.9%    77.6%   +0.6%     
=========================================
  Files          48       54      +6     
  Lines        2505     2770    +265     
  Branches      355      379     +24     
=========================================
+ Hits         1927     2150    +223     
- Misses        448      484     +36     
- Partials      130      136      +6     

@jstarry jstarry requested a review from jordaaash September 1, 2022 00:46
@jstarry jstarry merged commit 3374f41 into solana-labs:master Sep 7, 2022
@jstarry jstarry deleted the web3/compile-message branch September 7, 2022 03:43
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