-
Notifications
You must be signed in to change notification settings - Fork 144
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
Zero Cost EthereumTransaction on Success #1084
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
✅ Deploy Preview for hedera-hips ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
I think referring to success/failure can be misleading in the HIP's title and description. I suggest using something like well-formed, formally valid, etc.
I recommend dropping the success/failure wording and clearly stating the list of results for which the submitter will be charged $0.0001 (e.g., Any results not in the list above will be free for the submitter, whether it's an EVM error or not (e.g., |
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Changes for clarity and list of examples
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
@Neurone I agree, the text has been updated, but I think it would benefit from being even more precise. |
- The `relay` is charged if the `evm tx` cannot be parsed or is otherwise malformed | ||
- The `relay` is charged if the `EOA` specified in the `evm tx` refers to a non-existent account | ||
- The `relay` is charged if the `evm tx` was not properly signed by the keys of the `EOA` | ||
- The `relay` is charged if the `EOA` has insufficient funds to pay the intrinsic gas fee | ||
- The `relay` is charged if the `nonce` check fails |
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 indeed highlights a list of prechecks performed by the Relay to validate transactions and reject them if any conditions are met, ensuring they are not forwarded to the network unnecessarily, thus avoiding charges. Notably, the Hedera JSON-RPC Relay already handles and rejects these scenarios. However, there are additional prechecks currently performed by the Relay that are not mentioned here:
- Transaction type
- Gas price
- Gas limit
- Chain ID
- Value
- calldata size (not exceed 128KB maximum)
I recommend considering these prechecks and including them in this HIP for greater clarity and completeness.
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 agree, thank you @quiet-node! Can you please reply to this comment with a suggested replacement (you can click the icon of a document with the + and - signs within it to offer a suggestion) and we will get it applied to the HIP text.
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.
If a precheck is performed by the Relay, doesn't this mean that if it fails, the Relay will never send a transaction to a Hedera node, meaning the relay account can never be charged for it?
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.
Correct.
A relay will only submit to a CN a transaction that passes it's prechecks.
If it fails it is in the best interest of the relay to not submit to a CN otherwise it will be charged.
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
@Neurone added an explicit clarification of response codes. |
Hi Nana, good. Listing the cases for which the operator is not charged is perfectly fine and clear, thanks. |
HIP/hip-1084.md
Outdated
On Ethereum, all execution costs are paid for by the 'sender' who created, signed, and submitted the transaction. Hedera | ||
follows a similar approach for all `ContractCallTransaction`s but also charges an additional fee for each | ||
`EthereumTransaction` submitted via JSON-RPC relays. This fee serves as a defense against a malicious JSON-RPC relay that | ||
might send malformed transactions to the network, where there would be no one to pay for the processing of those transactions. | ||
This fee is unnecessary for successful transactions since the intrinsic gas fee covers the base costs (gossip & consensus). | ||
Therefore, this HIP proposes that the fee for submitting `EthereumTransactions` to the network should only be charged if the | ||
JSON-RPC relay submits a transaction that fails due diligence checks, such that the EOA cannot be charged for the overhead | ||
of gossip and consensus. |
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.
On Ethereum, all execution costs are paid for by the 'sender' who created, signed, and submitted the transaction. Hedera | |
follows a similar approach for all `ContractCallTransaction`s but also charges an additional fee for each | |
`EthereumTransaction` submitted via JSON-RPC relays. This fee serves as a defense against a malicious JSON-RPC relay that | |
might send malformed transactions to the network, where there would be no one to pay for the processing of those transactions. | |
This fee is unnecessary for successful transactions since the intrinsic gas fee covers the base costs (gossip & consensus). | |
Therefore, this HIP proposes that the fee for submitting `EthereumTransactions` to the network should only be charged if the | |
JSON-RPC relay submits a transaction that fails due diligence checks, such that the EOA cannot be charged for the overhead | |
of gossip and consensus. | |
On Ethereum, all execution costs are paid for by the 'sender' who created, signed, and submitted the transaction. | |
Hedera follows a similar approach for `ContractCallTransaction`s. However, Hedera charges an additional fee for | |
each `EthereumTransaction` submitted via JSON-RPC relays. This fee serves as a defense against a malicious | |
JSON-RPC relay that might send malformed transactions to the network, where there would be no one to pay for | |
the processing of those transactions. | |
This fee is unnecessary for successful transactions since the intrinsic gas fee covers the base costs (gossip & | |
consensus). Therefore, this HIP proposes that the fee for submitting `EthereumTransactions` to the network | |
should only be charged if the JSON-RPC relay submits a transaction that fails due diligence checks, such that the | |
EOA cannot be charged for the overhead of gossip and consensus. |
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.
Changes applied
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Signed-off-by: Nana Essilfie-Conduah <nana@swirldslabs.com>
Description:
On many EVM chains execution costs are fully captured in gas. Thus submitting transactions to execution nodes bears no
cost to the relay node. On Hedera it is necessary to charge a fee for
EthereumTransaction
HAPI submissions (just likeall other HAPI transactions).
This HIP suggests the network logic not charge successful
EthereumTransaction
submissions, but instead only charge theregular HAPI fee for badly formed transactions.
Related issue(s):
Fixes #1083
Notes for reviewer:
Checklist