Skip to content

Commit

Permalink
New translations intrinsic-gas.md (Vietnamese)
Browse files Browse the repository at this point in the history
  • Loading branch information
kaia-docs committed Jan 16, 2025
1 parent 598127f commit dedff50
Showing 1 changed file with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ Before we get into the detail, keep in mind that not all key types apply the key
| MultiSig | Yes |
| RoleBased | Depending on key types in the role |

## KeyCreationGas <a id="key-creation-gas"></a>
## KeyCreationGas <a id="keycreationgas"></a>

The KeyCreationGas is calculated as `(number of registering keys) x TxAccountCreationGasPerKey (20000)`.\
Please keep in mind that Public key type always has only one registering key, so the gas would be always 20000.

## KeyValidationGas <a id="key-validation-gas"></a>
## KeyValidationGas <a id="keyvalidationgas"></a>

`KeyValidationGas` is calculated as `(number of signatures - 1) x TxValidationGasPerKey(15000)`.\
Please keep in mind that Public key type always has only one signature key, so the gas would be always zero.
Expand All @@ -48,13 +48,13 @@ A Kaia transaction can also have a feePayer, so the total KeyValidationGas is li
KeyValidationGas = (KeyValidationGas for a sender) + (KeyValidationGas for a feePayer)
```

## PayloadGas <a id="payload-gas"></a>
## PayloadGas <a id="payloadgas"></a>

Basically, `PayloadGas` is charged with `number_of_bytes_of_tx_input x TxDataGas (100)`.

In the case of a transaction creating contract, an additional charge of `number_of_words_of_initcode x InitCodeWordGas (2)` is applied. It is effective since Shanghai hardfork.

## TxTypedGas <a id="tx-typed-gas"></a>
## TxTypedGas <a id="txtypedgas"></a>

There are three types of transactions in klaytn; `base`, `feeDelegated`, and `feeDelegatedWithFeeRatio`.

Expand All @@ -81,7 +81,7 @@ For example,

## Hardfork changes

| Hardfork | Change |
| ------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Shanghai EVM | limit and meter initcode when calculating intrinsicGas<br/>- started to add 2 gas per word of the initcode |
| Istanbul EVM | make the [PayloadGas](payload-gas) of legacyTxType consistent with other TxTypes<br/>- Before: PayloadGas=number_of_zero_bytes_of_tx_input x 4 + number_of_nonzero_bytes_of_tx_input x 68 <br/> - After: PayloadGas=number_of_bytes_of_tx_input x 100<br/><br/>change [keyValidationGas](key-validation-gas) calculation logic<br/>- Before: KeyValidationGas=(number of keys - 1) x 15,000<br/>- After: KeyValidationGas=(number of signatures - 1) x 15,000 |
| Hardfork | Change |
| ------------ | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Shanghai EVM | limit and meter initcode when calculating intrinsicGas<br/>- started to add 2 gas per word of the initcode |
| Istanbul EVM | make the [PayloadGas](#payloadgas) of legacyTxType consistent with other TxTypes<br/>- Before: PayloadGas=number_of_zero_bytes_of_tx_input x 4 + number_of_nonzero_bytes_of_tx_input x 68 <br/> - After: PayloadGas=number_of_bytes_of_tx_input x 100<br/><br/>change [keyValidationGas](#keyvalidationgas) calculation logic<br/>- Before: KeyValidationGas=(number of keys - 1) x 15,000<br/>- After: KeyValidationGas=(number of signatures - 1) x 15,000 |

0 comments on commit dedff50

Please sign in to comment.