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

runtime: add rent debit charges to block metadata #17504

Merged
merged 2 commits into from
May 26, 2021

Conversation

t-nelson
Copy link
Contributor

Problem

It is difficult to resolve rent debits from block metadata alone

Summary of Changes

Add explicit rent debit entries in block metadata

@t-nelson t-nelson added the v1.6 label May 26, 2021
@t-nelson t-nelson requested review from mvines and CriesofCarrots May 26, 2021 05:15
@t-nelson t-nelson force-pushed the rent-debit-block-metas branch from ed0d3e5 to c5faff8 Compare May 26, 2021 05:28
CriesofCarrots
CriesofCarrots previously approved these changes May 26, 2021
Copy link
Contributor

@CriesofCarrots CriesofCarrots left a comment

Choose a reason for hiding this comment

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

lgtm if CI is happy

@t-nelson
Copy link
Contributor Author

Added some tests for RentDebits

@mergify mergify bot dismissed CriesofCarrots’s stale review May 26, 2021 05:42

Pull request has been modified.

@t-nelson t-nelson added the automerge Merge this Pull Request automatically once CI passes label May 26, 2021
// Store all of them unconditionally to purge old AppendVec,
// even if collected rent is 0 (= not updated).
// Also, there's another subtle side-effect from this: this
// ensures we verify the whole on-chain state (= all accounts)
// via the account delta hash slowly once per an epoch.
self.store_account(&pubkey, &account);
rent_debits.push(&pubkey, rent, account.lamports());
Copy link
Contributor

Choose a reason for hiding this comment

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

hehe, nice 👀

@mergify mergify bot removed the automerge Merge this Pull Request automatically once CI passes label May 26, 2021
@mergify
Copy link
Contributor

mergify bot commented May 26, 2021

automerge label removed due to a CI failure

mvines
mvines previously approved these changes May 26, 2021
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.

lgtm too!

@t-nelson t-nelson force-pushed the rent-debit-block-metas branch from bb844e4 to ceb6f42 Compare May 26, 2021 06:20
@mergify mergify bot dismissed mvines’s stale review May 26, 2021 06:20

Pull request has been modified.

@t-nelson t-nelson added the automerge Merge this Pull Request automatically once CI passes label May 26, 2021
@mergify mergify bot removed the automerge Merge this Pull Request automatically once CI passes label May 26, 2021
@mergify
Copy link
Contributor

mergify bot commented May 26, 2021

automerge label removed due to a CI failure

@t-nelson t-nelson added the automerge Merge this Pull Request automatically once CI passes label May 26, 2021
@mergify mergify bot merged commit 2a6c5ed into solana-labs:master May 26, 2021
@t-nelson t-nelson deleted the rent-debit-block-metas branch May 26, 2021 13:11
mergify bot added a commit that referenced this pull request May 26, 2021
…17513)

* runtime: add rent debit charges to block metadata

(cherry picked from commit 97eab7e)

* add tests from `RentDebits`

(cherry picked from commit 2a6c5ed)

Co-authored-by: Trent Nelson <trent@solana.com>
@brooksprumo brooksprumo mentioned this pull request Aug 23, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
automerge Merge this Pull Request automatically once CI passes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants