Skip to content

Commit 7031577

Browse files
author
Akhilesh Singhania
authored
Fix minor typo (#1072)
1 parent 8c4dcff commit 7031577

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/concepts/gas.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ Transactions often take several blocks before they are completed. Due to dynamic
220220

221221
Pessimistic inflation means that all of the gas has to be purchased at the highest price that the transaction could reach in theory. But the extra spending is only temporary, the difference between the pessimistic and actual price will be refunded by the end of the transaction. This is the reason why in the explorer, you will see refunds after virtually every transaction that spans more than one block. Even if all gas has been spent.
222222

223-
How much is the price inflated? It depends on hoy many blocks a transaction may take. For a simple transaction that only sends tokens from account to another, it will only take two blocks. One block to subtract the money from the signer's account and one block to add it to the receivers account. Gas price between two blocks can go up by at most 1%. However, it is possible that the receipt at the receiver shard is applied delayed more than one block. Therefore, the pessimistically inflated price is `gas_price` ⨉ 1.03. Every additional cross-shard communication adds another factor of 1.03.
223+
How much is the price inflated? It depends on how many blocks a transaction may take. For a simple transaction that only sends tokens from account to another, it will only take two blocks. One block to subtract the money from the signer's account and one block to add it to the receivers account. Gas price between two blocks can go up by at most 1%. However, it is possible that the receipt at the receiver shard is applied delayed more than one block. Therefore, the pessimistically inflated price is `gas_price` ⨉ 1.03. Every additional cross-shard communication adds another factor of 1.03.
224224

225225
For a function call, the maximum block delay is computed as the total gas attached divided by the minimum amount required to call another function. Therefore, the more gas you attach to a transaction, the higher your gas price. But again, the increased price is temporarily and will be refunded unless the network really is that congested. Prices would have to go up by the maximum every block and your receipts would need to be very unlucky to have extra delays every time.
226226

0 commit comments

Comments
 (0)