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

Refactor - Share RBPF config and syscall registry globally #31727

Conversation

Lichtso
Copy link
Contributor

@Lichtso Lichtso commented May 19, 2023

Problem

Currently the RBPF config and syscall registry are created for each Instruction of a Transaction, which is wasteful and makes it hard to control the config in one place. Note, that this PR does not yet implement the feature activation recompilation phase nor does it adjust the RBPF config based on feature activations.

Summary of Changes

  • Adds LoadedPrograms::program_runtime_environment_v1 which is created in Bank::finish_init() and used in Bank::load_program().
  • Merges get_programdata_offset_and_deployment_offset() into load_program_from_account().
  • Renames create_loader() to create_program_runtime_environment().

@Lichtso Lichtso force-pushed the refactor/share_rbpf_config_and_syscalls_globally branch from caf8636 to a241640 Compare May 19, 2023 16:06
@Lichtso Lichtso requested a review from pgarg66 May 19, 2023 16:48
@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #31727 (a241640) into master (fb09cba) will increase coverage by 0.0%.
The diff coverage is 80.8%.

@@           Coverage Diff           @@
##           master   #31727   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         736      736           
  Lines      205950   205955    +5     
=======================================
+ Hits       168657   168671   +14     
+ Misses      37293    37284    -9     

Copy link
Contributor

@dmakarov dmakarov left a comment

Choose a reason for hiding this comment

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

nice!

@Lichtso Lichtso merged commit 83f692c into solana-labs:master May 20, 2023
@Lichtso Lichtso deleted the refactor/share_rbpf_config_and_syscalls_globally branch May 20, 2023 18:28
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.

3 participants