From ecf95993dcfc3eabde000f4fd26729594f209fb9 Mon Sep 17 00:00:00 2001 From: BenKurrek Date: Wed, 13 Jul 2022 16:05:04 -0400 Subject: [PATCH 1/2] Replaced create account with transfer in dive deeper section --- docs/concepts/gas.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/docs/concepts/gas.md b/docs/concepts/gas.md index 104b21608b2..733b6163367 100644 --- a/docs/concepts/gas.md +++ b/docs/concepts/gas.md @@ -48,15 +48,15 @@ Where do these numbers come from? NEAR is [configured](https://github.com/near/nearcore/blob/master/nearcore/res/genesis_config.json#L57-L119) with base costs. An example: - create_account_cost: { - send_sir: 99607375000, - send_not_sir: 99607375000, - execution: 99607375000 + transfer_cost: { + send_sir: 115123062500, + send_not_sir: 115123062500, + execution: 115123062500 } The "sir" here stands for "sender is receiver". Yes, these are all identical, but that could change in the future. -When you make a request to create a new account, NEAR immediately deducts the appropriate `send` amount from your account. Then it creates a _receipt_, an internal book-keeping mechanism to facilitate NEAR's asynchronous, sharded design (if you're coming from Ethereum, forget what you know about Ethereum's receipts, as they're completely different). Creating a receipt has its own associated costs: +When you make a request to transfer funds, NEAR immediately deducts the appropriate `send` amount from your account. Then it creates a _receipt_, an internal book-keeping mechanism to facilitate NEAR's asynchronous, sharded design (if you're coming from Ethereum, forget what you know about Ethereum's receipts, as they're completely different). Creating a receipt has its own associated costs: action_receipt_creation_config: { send_sir: 108059500000, @@ -68,10 +68,10 @@ You can query this value by using the [`protocol_config`](/docs/api/rpc#protocol The appropriate `send` amount for creating this receipt is also immediately deducted from your account. -The "create account" action won't be finalized until the next block. At this point, the `execution` amount for each of these actions will be deducted from your account (something subtle: the gas units on this next block could be multiplied by a gas price that's up to 1% different, since gas price is recalculated on each block). Adding it all up to find the total transaction fee: +The "transfer" action won't be finalized until the next block. At this point, the `execution` amount for each of these actions will be deducted from your account (something subtle: the gas units on this next block could be multiplied by a gas price that's up to 1% different, since gas price is recalculated on each block). Adding it all up to find the total transaction fee: - (create_account_cost.send_sir + action_receipt_creation_config.send_sir ) * gas_price_at_block_1 + - (create_account_cost.execution + action_receipt_creation_config.execution) * gas_price_at_block_2 + (transfer_cost.send_not_sir + action_receipt_creation_config.send_not_sir ) * gas_price_at_block_1 + + (transfer_cost.execution + action_receipt_creation_config.execution) * gas_price_at_block_2 From 3abc84b41161bf35b71d8a514445833fd4c69820 Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Thu, 14 Jul 2022 10:49:48 +0200 Subject: [PATCH 2/2] Update link to gas parameter config Gas parameters in nearcore are now defiend in a flat list, stored in parameters.txt. The RPC will still return a JSON format, so the example can probably stay as it is. But the link to the source should point to where we the values are defined. --- docs/concepts/gas.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/concepts/gas.md b/docs/concepts/gas.md index 733b6163367..d02e939a96e 100644 --- a/docs/concepts/gas.md +++ b/docs/concepts/gas.md @@ -46,7 +46,7 @@ To give you a starting point for what to expect for costs on NEAR, the table bel Where do these numbers come from? -NEAR is [configured](https://github.com/near/nearcore/blob/master/nearcore/res/genesis_config.json#L57-L119) with base costs. An example: +NEAR is [configured](https://github.com/near/nearcore/blob/master/core/primitives/res/runtime_configs/parameters.txt) with base costs. An example: transfer_cost: { send_sir: 115123062500,