-
Notifications
You must be signed in to change notification settings - Fork 183
feat: Add fees for hook transactions #21157
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
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Michael Tinker <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
...ode/hapi-utils/src/main/java/com/hedera/node/app/hapi/utils/fee/SmartContractFeeBuilder.java
Show resolved
Hide resolved
...ode/hapi-utils/src/main/java/com/hedera/node/app/hapi/utils/fee/SmartContractFeeBuilder.java
Outdated
Show resolved
Hide resolved
Signed-off-by: Neeharika-Sompalli <[email protected]>
Signed-off-by: Neeharika-Sompalli <[email protected]>
tinker-michaelj
left a comment
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.
This all makes sense to me, tyvm @Neeharika-Sompalli !
xin-hedera
left a comment
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.
LGTM
Signed-off-by: Neeharika-Sompalli <[email protected]>
0662b44
xin-hedera
left a comment
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.
LGTM
Nana-EC
left a comment
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.
Seems good on first pass.
Left on clarifying suggestion
...e/hapi-fees/src/main/java/com/hedera/node/app/hapi/fees/usage/crypto/CryptoTransferMeta.java
Show resolved
Hide resolved
tinker-michaelj
left a comment
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.
LGTM, tyvm @Neeharika-Sompalli !
| if (hasPreTxHook) { | ||
| gas = clampedAdd( | ||
| gas, aa.preTxAllowanceHookOrThrow().evmHookCallOrThrow().gasLimit()); | ||
| } | ||
| if (hasPrePostTxHook) { | ||
| gas = clampedAdd( | ||
| gas, aa.prePostTxAllowanceHookOrThrow().evmHookCallOrThrow().gasLimit()); | ||
| } |
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.
Shouldn't these both be gas += clamedAdd(...)? (Javadoc: Adds gas from pre-tx and pre+post allowance hooks on an account transfer)
Signed-off-by: Neeharika-Sompalli <[email protected]> Signed-off-by: Michael Tinker <[email protected]> Co-authored-by: Michael Tinker <[email protected]>
Fixes #21090
SBSfee component inCryptoCreate/CryptoUpdate/ContractCreate/CryptoTransferto set the constant fees for hooks. UsedTVfee component to add the constant fees forContractUpdate. The reason for choosing these parameters is because they are not currently used in the calculation of fees for the respective handlers.NOTE: All this calculation using the respective fee components will be changed very soon with Simple fees.
feeSchedules.jsonto reflect new fee data