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

Add fixed execution cost #2294

Closed
wants to merge 5 commits into from
Closed

Add fixed execution cost #2294

wants to merge 5 commits into from

Conversation

vicsn
Copy link
Collaborator

@vicsn vicsn commented Jan 10, 2024

Motivation

Adds a fixed execution cost.

Tests

Need to rewrite expectations, which can be done once we're sure when this will be merged.

Related PRs

Copy link
Collaborator

@ljedrz ljedrz left a comment

Choose a reason for hiding this comment

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

Left one suggestion.

@howardwu howardwu changed the base branch from testnet3 to mainnet January 11, 2024 00:51
Copy link
Contributor

@iamalwaysuncomfortable iamalwaysuncomfortable left a comment

Choose a reason for hiding this comment

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

One further nit on providing accessor methods for end users

finalize_cost: u64,
execution_cost: u64,
}

Copy link
Contributor

Choose a reason for hiding this comment

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

Looks good, just needs accessor methods for end users, and perhaps a display method for printing it.

Suggested change
impl ExecutionCosts {
/// Cost for storing the execution transaction on the Aleo Network
pub fn storage_cost() -> u64 {
self.storage_cost
}
/// Cost for executing all operations within the function's finalize scope on the Aleo Network
pub fn finalize_cost() -> u64 {
self.finalize_cost
}
/// Cost for verification of the function execution
pub fn execution_cost() -> u64 {
self.storage_cost
}
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I feel like a rebel today: cc10cce

@howardwu
Copy link
Member

howardwu commented Feb 9, 2024

Closing as this is not necessary at this time.

@howardwu howardwu closed this Feb 9, 2024
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.

5 participants