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

remove expected rent collection and rehashing completely #28422

Merged
merged 1 commit into from
Oct 17, 2022

Conversation

jeffwashington
Copy link
Contributor

@jeffwashington jeffwashington commented Oct 17, 2022

Problem

For eliminating rewrites, to maintain consensus and accounts hash calculation while developing and testing, and presumably during roll out, there was a system in place to allow any validator to skip rewrites and still maintain consensus.
A better way to solve the issue with hashes and eliminating rewrites is to stop updating rent_epoch for rent-exempt accounts and to stop hashing the slot for the account hash. These 2 projects (features) are underway. This codepath complicates removing the slot from the account hash feature.

Summary of Changes

Remove the rehash/expected rent epoch code path completely and wait for the features. Once we stop updating rent_epoch and using the slot in the hash, the hash is always complete.

Fixes #

@jeffwashington jeffwashington force-pushed the oct1_2 branch 2 times, most recently from fc0fe52 to 3508383 Compare October 17, 2022 02:40
@jeffwashington jeffwashington marked this pull request as ready for review October 17, 2022 13:40
Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

Love the idea. So with this change does this mean validators no longer do the rehashing, which implies they can no longer skip rewrites (temporarily)?

@jeffwashington
Copy link
Contributor Author

Love the idea. So with this change does this mean validators no longer do the rehashing, which implies they can no longer skip rewrites (temporarily)?

If they do, their machine will fail consensus until both features gets activated. That option is hidden on the cli.

Copy link
Contributor

@brooksprumo brooksprumo left a comment

Choose a reason for hiding this comment

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

lgtm

@jeffwashington jeffwashington merged commit 28a89a1 into solana-labs:master Oct 17, 2022
mergify bot pushed a commit that referenced this pull request Oct 21, 2022
(cherry picked from commit 28a89a1)

# Conflicts:
#	accounts-bench/src/main.rs
#	core/src/accounts_hash_verifier.rs
#	core/tests/epoch_accounts_hash.rs
#	runtime/benches/accounts.rs
#	runtime/src/accounts_background_service.rs
#	runtime/src/accounts_db.rs
#	runtime/src/expected_rent_collection.rs
#	runtime/src/snapshot_package.rs
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Oct 21, 2022
jeffwashington added a commit that referenced this pull request Oct 21, 2022
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Oct 21, 2022
jeffwashington added a commit to jeffwashington/solana that referenced this pull request Oct 21, 2022
mergify bot pushed a commit that referenced this pull request Oct 21, 2022
* feature 28541 no-op

* Revert "manual backport of #28422 (#28532)"

This reverts commit 5571aca.

* only update rent_epoch on load until feature
gnapoli23 pushed a commit to gnapoli23/solana that referenced this pull request Dec 16, 2022
nickfrosty pushed a commit to nickfrosty/solana that referenced this pull request Jan 4, 2023
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