aboutsummaryrefslogtreecommitdiffstats
path: root/params/protocol_params.go
diff options
context:
space:
mode:
authorPéter Szilágyi <peterke@gmail.com>2018-09-18 21:24:35 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-09-18 21:29:51 +0800
commit5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4 (patch)
treea2898e4b4d3f8b17d32f86c6964f60f177fa7c5b /params/protocol_params.go
parentcaa2c23a38141911a570ba098a940b4fdbf0aa88 (diff)
downloadgo-tangerine-5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4.tar
go-tangerine-5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4.tar.gz
go-tangerine-5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4.tar.bz2
go-tangerine-5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4.tar.lz
go-tangerine-5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4.tar.xz
go-tangerine-5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4.tar.zst
go-tangerine-5d921fa3a0cea9d87e7fd391c0ddd3115d00d0c4.zip
core, params: polish net gas metering PR a bit
Diffstat (limited to 'params/protocol_params.go')
-rw-r--r--params/protocol_params.go23
1 files changed, 17 insertions, 6 deletions
diff --git a/params/protocol_params.go b/params/protocol_params.go
index 4b53b3320..c8b6609af 100644
--- a/params/protocol_params.go
+++ b/params/protocol_params.go
@@ -32,15 +32,26 @@ const (
TxGasContractCreation uint64 = 53000 // Per transaction that creates a contract. NOTE: Not payable on data of calls between transactions.
TxDataZeroGas uint64 = 4 // Per byte of data attached to a transaction that equals zero. NOTE: Not payable on data of calls between transactions.
QuadCoeffDiv uint64 = 512 // Divisor for the quadratic particle of the memory cost equation.
- SstoreSetGas uint64 = 20000 // Once per SLOAD operation.
LogDataGas uint64 = 8 // Per byte in a LOG* operation's data.
CallStipend uint64 = 2300 // Free gas given at beginning of call.
- Sha3Gas uint64 = 30 // Once per SHA3 operation.
- Sha3WordGas uint64 = 6 // Once per word of the SHA3 operation's data.
- SstoreResetGas uint64 = 5000 // Once per SSTORE operation if the zeroness changes from zero.
- SstoreClearGas uint64 = 5000 // Once per SSTORE operation if the zeroness doesn't change.
- SstoreRefundGas uint64 = 15000 // Once per SSTORE operation if the zeroness changes to zero.
+ Sha3Gas uint64 = 30 // Once per SHA3 operation.
+ Sha3WordGas uint64 = 6 // Once per word of the SHA3 operation's data.
+
+ SstoreSetGas uint64 = 20000 // Once per SLOAD operation.
+ SstoreResetGas uint64 = 5000 // Once per SSTORE operation if the zeroness changes from zero.
+ SstoreClearGas uint64 = 5000 // Once per SSTORE operation if the zeroness doesn't change.
+ SstoreRefundGas uint64 = 15000 // Once per SSTORE operation if the zeroness changes to zero.
+
+ NetSstoreNoopGas uint64 = 200 // Once per SSTORE operation if the value doesn't change.
+ NetSstoreInitGas uint64 = 20000 // Once per SSTORE operation from clean zero.
+ NetSstoreCleanGas uint64 = 5000 // Once per SSTORE operation from clean non-zero.
+ NetSstoreDirtyGas uint64 = 200 // Once per SSTORE operation from dirty.
+
+ NetSstoreClearRefund uint64 = 15000 // Once per SSTORE operation for clearing an originally existing storage slot
+ NetSstoreResetRefund uint64 = 4800 // Once per SSTORE operation for resetting to the original non-zero value
+ NetSstoreResetClearRefund uint64 = 19800 // Once per SSTORE operation for resetting to the original zero value
+
JumpdestGas uint64 = 1 // Refunded gas, once per SSTORE operation if the zeroness changes to zero.
EpochDuration uint64 = 30000 // Duration between proof-of-work epochs.
CallGas uint64 = 40 // Once per CALL operation & message call transaction.