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

Fix storage program space issues and limit storage transaction data #4677

Merged
merged 5 commits into from
Jun 14, 2019

Conversation

sagar-solana
Copy link
Contributor

@sagar-solana sagar-solana commented Jun 13, 2019

Problem

Storage accounts can fill up quite easily and it's possible for validators to be unable to submit some proof of validation transactions if there are too many replicators and proofs in a turn/segment

Summary of Changes

Numerous updates to storage accounts and storage program

  • Re-introduced a proof mask for storage validations
  • Simplified validator rewards to just a number
  • Added functionality to dynamically split validation transactions to avoid running up against the tx size limit
  • Replicators will drop rewards that haven't been claimed for 10 turns/segments
  • Added more sensible errors to storage program
  • Replicators now submit proofs more correctly. i.e; they submit the encryption key as well as the blockhash used to generate the offsets (they don't use this blockhash for the offsets just yet)
  • Updated storage reward claims to go into the account owner's balance instead of the storage account itself
  • Fixed replicators using a hardcoded gossip port

Fixes #4536

@sagar-solana sagar-solana requested review from sakridge and mvines June 13, 2019 21:32
@sagar-solana
Copy link
Contributor Author

@mvines take a look at the wallet changes. I think I did the right thing. (including the pretty print for the account data; maybe I should have done it for all account prints?)

Copy link
Contributor

@mvines mvines left a comment

Choose a reason for hiding this comment

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

wallet changes lgtm

@codecov
Copy link

codecov bot commented Jun 13, 2019

Codecov Report

Merging #4677 into master will increase coverage by 3.8%.
The diff coverage is 39.4%.

@@           Coverage Diff            @@
##           master   #4677     +/-   ##
========================================
+ Coverage    71.6%   75.5%   +3.8%     
========================================
  Files         184     184             
  Lines       35910   34096   -1814     
========================================
+ Hits        25732   25754     +22     
+ Misses      10178    8342   -1836

1 similar comment
@codecov
Copy link

codecov bot commented Jun 13, 2019

Codecov Report

Merging #4677 into master will increase coverage by 3.8%.
The diff coverage is 39.4%.

@@           Coverage Diff            @@
##           master   #4677     +/-   ##
========================================
+ Coverage    71.6%   75.5%   +3.8%     
========================================
  Files         184     184             
  Lines       35910   34096   -1814     
========================================
+ Hits        25732   25754     +22     
+ Misses      10178    8342   -1836

@sagar-solana sagar-solana merged commit b1ac8f9 into solana-labs:master Jun 14, 2019
@sagar-solana sagar-solana deleted the replicator_work branch June 14, 2019 00:53
// The maximum transaction size is == `PACKET_DATA_SIZE` (1232 bytes)
// There are approx. 900 bytes left over after the storage instruction is wrapped into
// a signed transaction.
static MAX_BYTES: u64 = 900;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we do something like PACKET_DATA_SIZE - 300

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah maybe that is better. I'll fix it the next time I push something.

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.

Prevent storage accounts from filling up
3 participants