Skip to content
This repository has been archived by the owner on Oct 4, 2019. It is now read-only.

Commit

Permalink
Merge pull request #88 from ethereumproject/ecip/1015-round2
Browse files Browse the repository at this point in the history
EXP reprice, ECIP-1015
  • Loading branch information
ericsomdahl authored Oct 21, 2016
2 parents 65f1fbc + f3e5fb5 commit 7ec3a1c
Show file tree
Hide file tree
Showing 7 changed files with 211 additions and 207 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0.1
3.1.0
4 changes: 2 additions & 2 deletions cmd/geth/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ import (
const (
clientIdentifier = "Geth" // Client identifier to advertise over the network
versionMajor = 3 // Major version component of the current release
versionMinor = 0 // Minor version component of the current release
versionPatch = 1 // Patch version component of the current release
versionMinor = 1 // Minor version component of the current release
versionPatch = 0 // Patch version component of the current release
versionMeta = "unstable" // Version metadata to append to the version string

// !EPROJECT Replace Oracle or remove point of centralization
Expand Down
3 changes: 2 additions & 1 deletion core/vm/vm.go
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,8 @@ func calculateGasAndSize(gasTable params.GasTable, env Environment, contract *Co

quadMemGas(mem, newMemSize, gas)
case EXP:
gas.Add(gas, new(big.Int).Mul(big.NewInt(int64(len(stack.data[stack.len()-2].Bytes()))), params.ExpByteGas))
expByteLen := int64(len(stack.data[stack.len()-2].Bytes()))
gas.Add(gas, new(big.Int).Mul(big.NewInt(expByteLen), gasTable.ExpByte))
case SSTORE:
err := stack.require(2)
if err != nil {
Expand Down
3 changes: 3 additions & 0 deletions params/gas_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ type GasTable struct {
SLoad *big.Int
Calls *big.Int
Suicide *big.Int
ExpByte *big.Int

// CreateBySuicide occurs when the
// refunded account is one that does
Expand All @@ -44,6 +45,7 @@ var (
SLoad: big.NewInt(50),
Calls: big.NewInt(40),
Suicide: big.NewInt(0),
ExpByte: big.NewInt(10),

// explicitly set to nil to indicate
// this rule does not apply to homestead.
Expand All @@ -59,6 +61,7 @@ var (
SLoad: big.NewInt(200),
Calls: big.NewInt(700),
Suicide: big.NewInt(5000),
ExpByte: big.NewInt(50),

CreateBySuicide: big.NewInt(25000),
}
Expand Down
Loading

0 comments on commit 7ec3a1c

Please sign in to comment.