doc(gas-keys): add gas key documentation#15075
Draft
darioush wants to merge 1 commit intonear:masterfrom
Draft
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
darioush
commented
Feb 12, 2026
Comment on lines
+77
to
+78
| - [TransferToGasKey](/RuntimeSpec/Actions.md#transfertogaskeyaction) and [WithdrawFromGasKey](/RuntimeSpec/Actions.md#withdrawfromgaskeyaction) fees are not yet finalized (currently zero) | ||
| - [AddKey](/RuntimeSpec/Actions.md#addkeyaction) with `GasKeyFullAccess` or `GasKeyFunctionCall` permission: fees are not yet finalized (currently zero). Per-nonce fees will be charged based on the `num_nonces` value. |
Contributor
Author
There was a problem hiding this comment.
needs updating after merge
darioush
commented
Feb 12, 2026
| - **Gas cost** = gas burned (send fees) + gas remaining (execution fees), converted to tokens at the current gas price. This is deducted from the **gas key balance**. | ||
| - **Deposit cost** = sum of all deposits in the transaction's actions (`Transfer.deposit`, `FunctionCall.deposit`, `TransferToGasKey.deposit`, etc.). This is deducted from the **account balance**. | ||
|
|
||
| Both checks are performed independently. If the gas key has sufficient balance but the account does not have enough for deposits, the transaction enters the `DepositFailed` state where gas is charged but actions are not executed. |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| Both checks are performed independently. If the gas key has sufficient balance but the account does not have enough for deposits, the transaction enters the `DepositFailed` state where gas is charged but actions are not executed. | |
| Both checks are performed independently. If the gas key has sufficient balance but the account does not have enough for deposits, the transaction enters the `DepositFailed` state where gas is charged but actions are not executed. | |
| Generally, honest chunk producers will prevent this from occurring for ordinary use. This is added as a protection against malicious contract behavior intending to add transactions to chunks without paying gas. |
darioush
commented
Feb 12, 2026
|
|
||
| #### DepositFailed verdict | ||
|
|
||
| If the gas key has sufficient balance for gas costs but the account lacks balance for deposits, the transaction enters the `DepositFailed` state: gas is charged from the gas key (and the nonce is incremented), but the transaction actions are not executed. This prevents free transaction attempts using gas keys. |
Contributor
Author
There was a problem hiding this comment.
Suggested change
| If the gas key has sufficient balance for gas costs but the account lacks balance for deposits, the transaction enters the `DepositFailed` state: gas is charged from the gas key (and the nonce is incremented), but the transaction actions are not executed. This prevents free transaction attempts using gas keys. | |
| If the gas key has sufficient balance for gas costs but the account lacks balance for deposits, the transaction enters the `DepositFailed` state: gas is charged from the gas key (and the nonce is incremented), but the transaction actions are not executed. This prevents malicious contract behavior intending to add transactions to chunks without paying gas. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #15075 +/- ##
=======================================
Coverage 68.91% 68.92%
=======================================
Files 921 921
Lines 204003 204023 +20
Branches 204003 204023 +20
=======================================
+ Hits 140587 140616 +29
+ Misses 57488 57480 -8
+ Partials 5928 5927 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update docs for gas keys.