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

EE-1221: Increase create purse / mint entry point cost #1326

Merged

Conversation

mpapierski
Copy link
Collaborator

@mpapierski mpapierski commented Apr 16, 2021

Ref: https://casperlabs.atlassian.net/browse/EE-1221

To discourage creating many empty purses to deplete storage resources, this PR is increasing create_purse/mint cost to 2.5cspr.

@@ -23,7 +23,7 @@ const DEFAULT_ADD_COST: u32 = 5_800;
const DEFAULT_CALL_CONTRACT_COST: u32 = 4_500;
const DEFAULT_CALL_CONTRACT_ARGS_SIZE_WEIGHT: u32 = 420;

const DEFAULT_CREATE_PURSE_COST: u32 = 170_000;
const DEFAULT_CREATE_PURSE_COST: u32 = 1_700_000;
Copy link
Collaborator

Choose a reason for hiding this comment

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

shouldn't this also be 2_500_000_000; ?

Michał Papierski added 4 commits May 21, 2021 18:45
This change first creates a purse and saves them in the account's
context which will be later retrieved under payment code. This is due to
the fact that create_purse would always trigger GasLimit error.
@cspramit cspramit added this to the 1.4.0 milestone May 25, 2021
@mpapierski mpapierski added the upgrade-safe Does not introduce backwards incompatible changes at upgrade label Jul 13, 2021
 Conflicts:
	execution_engine/CHANGELOG.md
@mpapierski
Copy link
Collaborator Author

bors r+

@casperlabs-bors-ng
Copy link
Contributor

Build succeeded:

@casperlabs-bors-ng casperlabs-bors-ng bot merged commit 61141be into casper-network:dev Aug 5, 2021
@@ -18,6 +18,7 @@ All notable changes to this project will be documented in this file. The format

### Changed
* Support building and testing using stable Rust.
* Changed price of `create_purse` to 2.5CSPR to discourage people from creating purses in the payment code.
Copy link
Collaborator

Choose a reason for hiding this comment

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

The "in the payment code" is confusing b/c it increases the price across the whole execution, including session code. Is that correct @mpapierski ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Correct, but it was increased specifically to disallow creating those in the payment code.

Copy link
Collaborator

Choose a reason for hiding this comment

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

But the comment makes it sound as if the cost is increased only in the payment code. I don't think the last part needs to be included in the changelog.

@mpapierski mpapierski mentioned this pull request Aug 9, 2021
casperlabs-bors-ng bot added a commit that referenced this pull request Aug 9, 2021
1871: EE-1221: Follow up r=mpapierski a=mpapierski

Ref: #1326 #1293 

Follow up PR to change a changelog entry from #1326 and move an entry created in #1293 to Unreleased section as it was wrongly changed after resolving merge conflicts.

Co-authored-by: Michał Papierski <michal@casperlabs.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
execution engine upgrade-safe Does not introduce backwards incompatible changes at upgrade
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants