diff options
author | obscuren <geffobscura@gmail.com> | 2015-03-02 23:32:02 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2015-03-02 23:32:02 +0800 |
commit | b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad (patch) | |
tree | 6af5b54d74402e2c31ea083981d215c0701832f4 /vm/common.go | |
parent | 73c52d1677ba526385f1b223ef48f3a26091fe00 (diff) | |
download | go-tangerine-b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad.tar go-tangerine-b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad.tar.gz go-tangerine-b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad.tar.bz2 go-tangerine-b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad.tar.lz go-tangerine-b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad.tar.xz go-tangerine-b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad.tar.zst go-tangerine-b383ff0b96a1cf3df0b56f13b8d303ae4d4977ad.zip |
New gas prices model
Diffstat (limited to 'vm/common.go')
-rw-r--r-- | vm/common.go | 64 |
1 files changed, 44 insertions, 20 deletions
diff --git a/vm/common.go b/vm/common.go index 45a7187a9..bc1353009 100644 --- a/vm/common.go +++ b/vm/common.go @@ -31,26 +31,48 @@ func NewVm(env Environment) VirtualMachine { } var ( - GasStep = big.NewInt(1) - GasSha = big.NewInt(10) - GasSLoad = big.NewInt(20) - GasSStore = big.NewInt(100) - GasSStoreRefund = big.NewInt(100) - GasBalance = big.NewInt(20) - GasCreate = big.NewInt(100) - GasCall = big.NewInt(20) - GasCreateByte = big.NewInt(5) - GasSha3Byte = big.NewInt(10) - GasSha256Byte = big.NewInt(50) - GasRipemdByte = big.NewInt(50) - GasMemory = big.NewInt(1) - GasData = big.NewInt(5) - GasTx = big.NewInt(500) - GasLog = big.NewInt(32) - GasSha256 = big.NewInt(50) - GasRipemd = big.NewInt(50) - GasEcrecover = big.NewInt(500) - GasMemCpy = big.NewInt(1) + GasQuickStep = big.NewInt(2) + GasFastestStep = big.NewInt(3) + GasFastStep = big.NewInt(5) + GasMidStep = big.NewInt(8) + GasSlowStep = big.NewInt(10) + GasExtStep = big.NewInt(20) + + GasStorageGet = big.NewInt(50) + GasStorageAdd = big.NewInt(20000) + GasStorageMod = big.NewInt(5000) + GasLogBase = big.NewInt(2000) + GasLogTopic = big.NewInt(2000) + GasLogData = big.NewInt(8) + GasCreate = big.NewInt(32000) + GasCreateByte = big.NewInt(300) + GasCall = big.NewInt(40) + GasCallValueTransfer = big.NewInt(6700) + GasCallNewAccount = big.NewInt(25000) + GasReturn = big.NewInt(0) + GasStop = big.NewInt(0) + GasJumpDest = big.NewInt(1) + + RefundStorage = big.NewInt(15000) + RefundSuicide = big.NewInt(24000) + + GasMemWord = big.NewInt(3) + GasQuadCoeffWord = big.NewInt(1) + GasContractByte = big.NewInt(200) + GasTransaction = big.NewInt(21000) + GasTxDataNonzeroByte = big.NewInt(37) + GasTxZeroByte = big.NewInt(2) + + GasSha3Base = big.NewInt(30) + GasSha3Word = big.NewInt(6) + GasSha256Base = big.NewInt(60) + GasSha256Word = big.NewInt(12) + GasRipemdBase = big.NewInt(600) + GasRipemdWord = big.NewInt(12) + GasEcrecover = big.NewInt(3000) + GasIdentityBase = big.NewInt(15) + GasIdentityWord = big.NewInt(3) + GasCopyWord = big.NewInt(3) Pow256 = ethutil.BigPow(2, 256) @@ -59,6 +81,8 @@ var ( U256 = ethutil.U256 S256 = ethutil.S256 + + Zero = ethutil.Big0 ) const MaxCallDepth = 1025 |