Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

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 requested a review from Lichtso September 16, 2023 17:13
@pgarg66 pgarg66 merged commit 6300a43 into solana-labs:master Sep 16, 2023
@pgarg66 pgarg66 deleted the loader-v4-initial-slot branch September 16, 2023 20:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants