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

Set loader-v4 program deployment slot at actual deployment #33278

Merged
merged 1 commit into from
Sep 16, 2023

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented Sep 16, 2023

Problem

The program deployment fails when using loader-v4.

Summary of Changes

The truncate instruction sets the deployment slot for the program to the current slot when the buffer is being initialized. The deploy instruction checks if DEPLOYMENT_COOLDOWN_IN_SLOTS have elapsed since the last deployment. DEPLOYMENT_COOLDOWN_IN_SLOTS is set to 750, so the deployment fails (since the CLI sends truncate and deploy instructions in quick succession).

Taking a step back, the truncate instruction should not be setting the deployment slot when the buffer is being initialized. It should only be set at the time of program deployment.

Fixes #

@codecov
Copy link

codecov bot commented Sep 16, 2023

Codecov Report

Merging #33278 (f76bae5) into master (6283c1d) will decrease coverage by 0.1%.
The diff coverage is 100.0%.

@@            Coverage Diff            @@
##           master   #33278     +/-   ##
=========================================
- Coverage    81.9%    81.9%   -0.1%     
=========================================
  Files         790      790             
  Lines      214273   214273             
=========================================
- Hits       175661   175643     -18     
- Misses      38612    38630     +18     

@pgarg66 pgarg66 marked this pull request as ready for review September 16, 2023 17:13
@pgarg66 pgarg66 merged commit 6300a43 into solana-labs:master Sep 16, 2023
32 checks passed
@pgarg66 pgarg66 deleted the loader-v4-initial-slot branch September 16, 2023 20:11
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.

None yet

2 participants