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

Revive payments via Budget #3079

Merged
merged 2 commits into from
Mar 4, 2019
Merged

Revive payments via Budget #3079

merged 2 commits into from
Mar 4, 2019

Conversation

garious
Copy link
Contributor

@garious garious commented Mar 3, 2019

Problem

Budget used to be part of the bank and was well-tested at that time. When we added userdata to accounts, we moved it out and added a bunch of unit-tests, but no integration tests. Then we added support for batched instructions, and the current code doesn't reflect that. It still assumes key[0] was the account that funded the program account. Also, BudgetTransaction doesn't allocate space for the program account.

Summary of Changes

  • Update BudgetTransaction to use SystemInstruction::CreateAccount instead of Move
  • Move budget_state.rs to budget_api, where it can be used to calculate its serialized size to create the transaction
  • Add an integration test for a simple payment

Still quite a bit of work to do in a follow-up PR. It doesn't support more advanced contracts. BudgetInstruction needs to collect all potential Payment Pubkeys.

@codecov
Copy link

codecov bot commented Mar 4, 2019

Codecov Report

Merging #3079 into master will decrease coverage by 0.6%.
The diff coverage is 77.4%.

@@           Coverage Diff            @@
##           master   #3079     +/-   ##
========================================
- Coverage    77.7%   77.1%   -0.7%     
========================================
  Files         137     137             
  Lines       20314   20486    +172     
========================================
+ Hits        15789   15799     +10     
- Misses       4525    4687    +162

@garious garious merged commit 2ec9bc9 into solana-labs:master Mar 4, 2019
steviez added a commit to steviez/solana that referenced this pull request Oct 11, 2024
Use the tar crate instead; doing so avoids spawning a subprocess and
also removes the variability of relying on whatever tar the caller has
in their path
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.

1 participant