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

GH-5039: Tweak costs and chainspec settings #5047

Closed

Conversation

mpapierski
Copy link
Collaborator

Closes #5039

This PR adds a gas charge for calling a non-existing system contract entry point. Additionally, some charges for incorrectly charged system contract entrypoints are raised significantly (10k motes -> 2.5 CSPR or more depending on complexity).

This PR changes fee_handling and refund_handling to be consistent with 1.5.x settings (refund 99% and pay to proposer)

let entry_point = match footprint.entry_points().get(entry_point_name) {
Some(entry_point) => entry_point,
None => {
match footprint.entity_kind() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit couldn't this be if let EntityKind::System(_) = ?

Comment on lines +3286 to +3293

let cost = match fixture.chainspec.core_config.pricing_handling {
PricingHandling::Classic => 0,
PricingHandling::Fixed => {
fixture.chainspec.system_costs_config.mint_costs().transfer * (current_gas_price as u32)
}
};

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't understand why Classic is set to 0 here...in classic pricing the imputed amount should be used and 0 is not a valid imputed amount

Copy link
Collaborator

@EdHastingsCasperAssociation EdHastingsCasperAssociation left a comment

Choose a reason for hiding this comment

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

approved but see question

@EdHastingsCasperAssociation
Copy link
Collaborator

bors r+

casperlabs-bors-ng bot added a commit that referenced this pull request Dec 20, 2024
5047: GH-5039: Tweak costs and chainspec settings r=EdHastingsCasperAssociation a=mpapierski

Closes #5039 

This PR adds a gas charge for calling a non-existing system contract entry point. Additionally, some charges for incorrectly charged system contract entrypoints are raised significantly (10k motes -> 2.5 CSPR or more depending on complexity).

This PR changes `fee_handling` and `refund_handling` to be consistent with 1.5.x settings (refund 99% and pay to proposer)


Co-authored-by: Michał Papierski <[email protected]>
Co-authored-by: edhastings <[email protected]>
Copy link
Contributor

Build failed:

casperlabs-bors-ng bot added a commit that referenced this pull request Dec 21, 2024
5048: GH-5039: Tweak costs and chainspec settings r=EdHastingsCasperAssociation a=EdHastingsCasperAssociation

Closes #5039 

This PR adds a gas charge for calling a non-existing system contract entry point. Additionally, some charges for incorrectly charged system contract entrypoints are raised significantly (10k motes -> 2.5 CSPR or more depending on complexity).

This PR changes fee_handling and refund_handling to be consistent with 1.5.x settings (refund 99% and pay to proposer)

#5047 


Co-authored-by: Michał Papierski <[email protected]>
Co-authored-by: Ed Hastings <[email protected]>
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