-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Advertise storage last id #2154
Conversation
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 { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For which problem?
There was a problem hiding this comment.
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.
a221a03
to
4738d4e
Compare
Codecov Report
@@ 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 |
4738d4e
to
e5d4cbf
Compare
* Also implement more storage contract logic * Add transactions for proof validation, * Move storage state members into system storage account userdata
bf38bd6
to
51630e3
Compare
…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]>
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