-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Set up fees for WASM processing #5393
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
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## ripple/smart-escrow #5393 +/- ##
=====================================================
Coverage ? 78.1%
=====================================================
Files ? 794
Lines ? 68495
Branches ? 8303
=====================================================
Hits ? 53502
Misses ? 14993
Partials ? 0
🚀 New features to boost your workflow:
|
@@ -37,6 +37,7 @@ struct Fees | |||
std::uint32_t extensionComputeLimit{ | |||
0}; // Extension compute limit (instructions) | |||
std::uint32_t extensionSizeLimit{0}; // Extension size limit (bytes) | |||
std::uint32_t gasPrice{0}; // price of WASM gas (micro-drops) |
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.
All these names doesn't show any relations among them. Consider to give them some common root / field of usage, for example
extensionSizeLimit-> contractSizeLimit
extensionComputeLimit -> contractGasLimit
gasPrice -> contractGasPrice
ComputationAllowance -> contractGasPayment
sfFinishFunction -> sfContract
tefNO_WASM -> tefNO_CONTRACT
and so on
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.
Extensions != contracts, so that's an incorrect statement. More specifically, we may want different values for extensions vs contracts further down the line.
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.
What "extension" is refer to? And as we have gasPrice
, which is definitely used with contracts
, not extensions
, so it just bring more ambiguity.
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.
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.
👍
nits for you to consider
- missing 0 in "high level overview of change": " 100,000 of this unit = 1 drop/gas"
- "gas_price = 2000000 # 2 drops per gas", I suggest to low the price to 0.1 drop per gas.
High Level Overview of Change
This PR:
gasPrice
- this is the price of 1 gas in micro-drops (i.e. 1,000,000 of this unit = 1 drop/gas)EscrowFinish
parameter,ComputationAllowance
- this is how much gas the transaction submitter is willing to payComputationAllowance * gasPrice / 100000
to theEscrowFinish
transaction feeContext of Change
Setting up proper fees for WASM usage
Type of Change
Test Plan
Tests were added and work properly.