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

remove data size check from cost model #30205

Conversation

tao-stones
Copy link
Contributor

@tao-stones tao-stones commented Feb 8, 2023

Problem

code outlived its purpose, described in issue #30204

Summary of Changes

  • remove it

Fixes #30204

@tao-stones tao-stones force-pushed the refactor-remove-data-size-from-cost-model branch from 4c425c1 to fdee174 Compare February 9, 2023 21:13
@@ -1598,15 +1598,7 @@ impl Bank {
.map(|drop_callback| drop_callback.clone_box()),
)),
freeze_started: AtomicBool::new(false),
cost_tracker: RwLock::new(CostTracker::new_with_account_data_size_limit(
feature_set
.is_active(&feature_set::cap_accounts_data_len::id())
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this feature is not scheduled for activation according to #24135

Copy link
Contributor

Choose a reason for hiding this comment

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

Correct 😭😭😭


if self
.feature_set
.is_active(&feature_set::cap_accounts_data_len::id())
Copy link
Contributor Author

@tao-stones tao-stones Feb 9, 2023

Choose a reason for hiding this comment

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

same as above. For context, the follow up tasks for #29743 (and this PR) is to introduce a compute_budget instruction to request account data size limit per tx, and charge a fee to economically incentive better space utilization.

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.

These code changes look good to me. I would still like another approval, since I could see the current code still having value until the per transaction load/allocation limits are in place and activated.

@tao-stones
Copy link
Contributor Author

These code changes look good to me. I would still like another approval, since I could see the current code still having value until the per transaction load/allocation limits are in place and activated.

This is a valid point. I checked metric (#30204 (comment)) to confirm that this check hasn't kicked in past days. It is certainly safer to hold it till above mentioned features are activated, but IMO the benefit doesn't justify the delay (of #30035). But in any case, it'd be good to have more inputs, other than @mvines , who can we victimize?

@mvines mvines removed their request for review February 11, 2023 00:35
@mvines
Copy link
Contributor

mvines commented Feb 11, 2023

Ya, I'm not informed enough on this part of the code to give a good review here unfortunately.

@github-actions github-actions bot added the stale [bot only] Added to stale content; results in auto-close after a week. label Feb 27, 2023
@github-actions github-actions bot closed this Mar 6, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
stale [bot only] Added to stale content; results in auto-close after a week.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Propose to remove new account creation data size check from cost model
3 participants