-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add fixed execution cost #2294
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Left one suggestion.
There was a problem hiding this 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, | ||
} | ||
|
There was a problem hiding this comment.
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.
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 | |
} | |
} |
There was a problem hiding this comment.
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
Closing as this is not necessary at this time. |
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