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

fix: Clarity and copy changes on enforced txs and gas limit and zktrie #121

Merged
merged 4 commits into from
Jan 15, 2024

Conversation

dghelm
Copy link
Contributor

@dghelm dghelm commented Nov 15, 2023

  • adds clearer expectations and numbers around gas limit (along with mentioning refund) but keeps testnet message passing number
  • rewords enforced tx callout to make clear this isn't enabled
  • fixes typo from [Bug]: <Typos in Technology-zkTrie Section> #119

Copy link

netlify bot commented Nov 15, 2023

Deploy Preview for scroll-documentation ready!

Name Link
🔨 Latest commit 18bacd5
🔍 Latest deploy log https://app.netlify.com/sites/scroll-documentation/deploys/65a594e1ca7b8c0008fe4484
😎 Deploy Preview https://deploy-preview-121.docs.scroll.xyz
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link
Contributor

@isabellewei isabellewei left a comment

Choose a reason for hiding this comment

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

Sorry I think I didn't explain very clearly, gas limit is NOT refunded, but any extra msg.value will be and a too low msg.value will cause the tx to revert, which is why msg.value should always err on being set very high.

The gas limit does affect the fee that is deducted from the user, I think we can mention somewhere that they can use eth_estimateGas to get a more accurate real-time estimate for what to set it

@@ -84,8 +84,8 @@ We pass the message by executing `executeFunctionCrosschain` and passing the fol
- `value`: In this case, it is `0` because the `setGreeting`is not payable.
- `greeting`: This is the parameter that will be sent through the message. Try passing `“This message was crosschain!”`
- `gasLimit`:
- If you are sending the message from L1 to L2, around `5000` gas limit should be more than enough.
- If you are sending the message from L2 to L1, pass `0`, as the transaction be completed by executing an additional transaction on L1.
- If you are sending the message from L1 to L2, around `5000` gas limit should be more than enough. That said, if you set this too high, any unused portion of the fee will be refunded.
Copy link
Contributor

Choose a reason for hiding this comment

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

The gas limit is not refunded. The gasLimit * baseFee is the fee that is charged, and if the msg.value is higher than this fee, the remainder of the msg.value is refunded. Conversely, if the msg.value is lower than this fee, the tx will revert

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed!

@dghelm dghelm requested a review from isabellewei January 15, 2024 20:18
@dghelm dghelm merged commit 56efb31 into develop Jan 15, 2024
6 checks passed
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.

2 participants