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

Reduce payer balance needed to deploy programs#19645

Merged
jstarry merged 4 commits intosolana-labs:masterfrom
jstarry:cheaper-deploys
Sep 18, 2021
Merged

Reduce payer balance needed to deploy programs#19645
jstarry merged 4 commits intosolana-labs:masterfrom
jstarry:cheaper-deploys

Conversation

@jstarry
Copy link
Copy Markdown
Contributor

@jstarry jstarry commented Sep 4, 2021

Problem

Program deploys require more SOL than necessary for a successful deploy.

The payer balance is used to pay for programdata account creation before the payer is credited for the deploy buffer account. The buffer account balance is about the same as the required programdata balance, so a payer basically has to cover twice the rent cost than they need to.

Summary of Changes

  • Credit buffer balance before paying for programdata account creation

Fixes #

@codecov
Copy link
Copy Markdown

codecov Bot commented Sep 4, 2021

Codecov Report

Merging #19645 (749818f) into master (691bea8) will decrease coverage by 0.0%.
The diff coverage is 88.8%.

@@            Coverage Diff            @@
##           master   #19645     +/-   ##
=========================================
- Coverage    82.6%    82.6%   -0.1%     
=========================================
  Files         478      478             
  Lines      133443   133462     +19     
=========================================
- Hits       110334   110326      -8     
- Misses      23109    23136     +27     

@jstarry jstarry requested a review from jackcmay September 7, 2021 17:20
@jstarry
Copy link
Copy Markdown
Contributor Author

jstarry commented Sep 8, 2021

Blocked on #18629

@jstarry jstarry marked this pull request as draft September 8, 2021 16:47
@jackcmay
Copy link
Copy Markdown
Contributor

jackcmay commented Sep 8, 2021

I'm working on #18629

@jackcmay
Copy link
Copy Markdown
Contributor

jackcmay commented Sep 9, 2021

I'm working on #18629

#19750

@jackcmay
Copy link
Copy Markdown
Contributor

Btw, if this was blocked I would expect a test that shows that :-)

@jstarry jstarry marked this pull request as ready for review September 15, 2021 15:54
program_id,
);

// pass an extra account to avoid the overly strict UnbalancedInstruction error
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

FYI @jackcmay I'm bumping into this issue now: #9711

@jstarry
Copy link
Copy Markdown
Contributor Author

jstarry commented Sep 15, 2021

This is ready for review @jackcmay, as mentioned above I hit the overly restrictive balanced instruction check but it's easy to work around for now

@jstarry jstarry added the v1.7 label Sep 15, 2021
@jackcmay
Copy link
Copy Markdown
Contributor

This is ready for review @jackcmay, as mentioned above I hit the overly restrictive balanced instruction check but it's easy to work around for now

We are expecting to solve the overly restrictive balanced instruction issue in ABIv2 (FYI @Lichtso )

jackcmay
jackcmay previously approved these changes Sep 16, 2021
@mergify mergify Bot dismissed jackcmay’s stale review September 16, 2021 20:04

Pull request has been modified.

@jstarry jstarry added the automerge Merge this Pull Request automatically once CI passes label Sep 16, 2021
@mergify mergify Bot removed the automerge Merge this Pull Request automatically once CI passes label Sep 16, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Sep 16, 2021

automerge label removed due to a CI failure

@jstarry jstarry added the automerge Merge this Pull Request automatically once CI passes label Sep 17, 2021
@mergify
Copy link
Copy Markdown
Contributor

mergify Bot commented Sep 18, 2021

automerge label removed due to a CI failure

@mergify mergify Bot removed the automerge Merge this Pull Request automatically once CI passes label Sep 18, 2021
@jstarry jstarry merged commit efd0245 into solana-labs:master Sep 18, 2021
@jstarry jstarry deleted the cheaper-deploys branch September 18, 2021 00:49
mergify Bot pushed a commit that referenced this pull request Sep 18, 2021
* Reduce payer balance needed to deploy programs

* Fix test and unbalanced ix error

* fix test

* fix up tests

(cherry picked from commit efd0245)

# Conflicts:
#	programs/bpf_loader/src/lib.rs
mergify Bot added a commit that referenced this pull request Sep 18, 2021
)

* Reduce payer balance needed to deploy programs (#19645)

* Reduce payer balance needed to deploy programs

* Fix test and unbalanced ix error

* fix test

* fix up tests

(cherry picked from commit efd0245)

# Conflicts:
#	programs/bpf_loader/src/lib.rs

* fix conflicts

Co-authored-by: Justin Starry <justin@solana.com>
dankelleher pushed a commit to identity-com/solana that referenced this pull request Nov 24, 2021
* Reduce payer balance needed to deploy programs

* Fix test and unbalanced ix error

* fix test

* fix up tests
frits-metalogix added a commit to identity-com/solana that referenced this pull request Nov 24, 2021
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