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

Advertise storage last id #2154

Merged
merged 1 commit into from
Dec 21, 2018

Conversation

sakridge
Copy link
Member

Problem

Validator needs to advertise the last id it currently is using for storage

Summary of Changes

Create new transaction type and post it to the chain. Add an interface to the bank to then get it out of the account.

Fixes #2060

@sakridge sakridge added the work in progress This isn't quite right yet label Dec 13, 2018
src/bank.rs Outdated
@@ -1384,6 +1387,17 @@ impl Bank {
self.last_ids.read().unwrap().tick_height
}

pub fn get_storage_last_id(&self) -> Hash {
Copy link
Member Author

Choose a reason for hiding this comment

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

@aeyakovenko pretend self.id is really the id of the node, is this what you're thinking of? Also, I suppose bank needs to know of the node's pubkey.

Copy link
Member

Choose a reason for hiding this comment

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

For which problem?

Copy link
Member Author

Choose a reason for hiding this comment

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

Previous PR added interface to the validator to get its state of the storage last_id, you said it should be in the account state and advertised on-chain. This has the validator create a transaction with the id it's using and then returns it from the account state when asked for it.

@sakridge sakridge force-pushed the advertise-storage-last-id branch 5 times, most recently from a221a03 to 4738d4e Compare December 21, 2018 03:40
@codecov
Copy link

codecov bot commented Dec 21, 2018

Codecov Report

Merging #2154 into master will increase coverage by 0.6%.
The diff coverage is 65.3%.

@@           Coverage Diff            @@
##           master   #2154     +/-   ##
========================================
+ Coverage    73.1%   73.7%   +0.6%     
========================================
  Files         114     114             
  Lines       16974   17198    +224     
========================================
+ Hits        12412   12689    +277     
+ Misses       4562    4509     -53

* Also implement more storage contract logic
* Add transactions for proof validation,
* Move storage state members into system storage account userdata
@sakridge sakridge removed the work in progress This isn't quite right yet label Dec 21, 2018
@sakridge sakridge merged commit a1759ae into solana-labs:master Dec 21, 2018
@sakridge sakridge deleted the advertise-storage-last-id branch December 21, 2018 23:45
brooksprumo added a commit to brooksprumo/solana that referenced this pull request Jul 16, 2024
ruuda pushed a commit to ChorusOne/solana that referenced this pull request Jul 24, 2024
…match cli arg (backport of solana-labs#2154) (solana-labs#2157)

Removes deprecated --halt-on-known-validators-accounts-hash-mismatch cli arg (solana-labs#2154)

(cherry picked from commit 4f228f4)

Co-authored-by: Brooks <[email protected]>
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.

2 participants