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

v1.17: Bank: Add function to replace empty account with upgradeable program on feature activation (backport of #32783) #33527

Merged
merged 1 commit into from
Oct 5, 2023

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Oct 4, 2023

This is an automatic backport of pull request #32783 done by Mergify.


Mergify commands and options

More conditions and actions can be found in the documentation.

You can also trigger Mergify actions by commenting on this pull request:

  • @Mergifyio refresh will re-evaluate the rules
  • @Mergifyio rebase will rebase this PR on its base branch
  • @Mergifyio update will merge the base branch into this PR
  • @Mergifyio backport <destination> will backport this PR on <destination> branch

Additionally, on Mergify dashboard you can:

  • look at your merge queues
  • generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com

…on feature activation (#32783)

* replace program account

* modify for all cases

* remove non-data swap

* address tests & conditional feedback

* get the rent involved

* mix in owner & executable

* feature-related cases

* stripped back to feature-specific case only

* added feature

* address initial feedback

* added more lamport checks

* condense tests

* using test_case

* add fail cases to tests

* more cleanup

* add verifiably built program

* update program account state

* cleaned up serializing logic

* use full word capitalization

* rename old & new to dst & src

* swap src and dst in parameters

* add warnings and errors

* rename feature to programify

* test suite description clarity

* remove strings from datapoints

* spell out source and destination

* more verbose comments in account replace functions

* move lamport calculation

* swap lamport check for state check

* move replace functions to helper module

* make replace_account methods fallible

* refactor error handling

* add test for source program state

(cherry picked from commit 25460f7)
@codecov
Copy link

codecov bot commented Oct 4, 2023

Codecov Report

Merging #33527 (9b94f2e) into v1.17 (d75522d) will increase coverage by 0.0%.
The diff coverage is 92.8%.

@@           Coverage Diff            @@
##            v1.17   #33527    +/-   ##
========================================
  Coverage    81.7%    81.7%            
========================================
  Files         802      804     +2     
  Lines      217780   217987   +207     
========================================
+ Hits       178065   178285   +220     
+ Misses      39715    39702    -13     

@mvines
Copy link
Member

mvines commented Oct 4, 2023

Is there a feature-gate issue for this feature? I couldn't find one. Please create the issue and add to the schedule for v1.17-based features at https://github.com/solana-labs/solana/wiki/Feature-Gate-Activation-Schedule#pending-testnet-activation

@buffalojoec
Copy link
Contributor

Is there a feature-gate issue for this feature? I couldn't find one. Please create the issue and add to the schedule for v1.17-based features at https://github.com/solana-labs/solana/wiki/Feature-Gate-Activation-Schedule#pending-testnet-activation

Will create ASAP after #33535

@buffalojoec buffalojoec merged commit 9318394 into v1.17 Oct 5, 2023
16 checks passed
@buffalojoec buffalojoec deleted the mergify/bp/v1.17/pr-32783 branch October 5, 2023 16:28
@buffalojoec
Copy link
Contributor

Is there a feature-gate issue for this feature? I couldn't find one. Please create the issue and add to the schedule for v1.17-based features at https://github.com/solana-labs/solana/wiki/Feature-Gate-Activation-Schedule#pending-testnet-activation

Done! #33547

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