From 00ba7487079e42b4f73d084f3b13621332b40725 Mon Sep 17 00:00:00 2001 From: Jeffrey Wilcke Date: Sat, 8 Oct 2016 00:23:45 +0200 Subject: [release/1.4.18] core, core/vm: added gas price variance table This implements 1b & 1c of EIP150 by adding a new GasTable which must be returned from the RuleSet config method. This table is used to determine the gas prices for the current epoch. Please note that when the CreateBySuicide gas price is set it is assumed that we're in the new epoch phase. In addition this PR will serve as temporary basis while refactorisation in being done in the EVM64 PR, which will substentially overhaul the gas price code. (cherry picked from commit 64af2aafdaf16d0bab4c2b89573324b076602bab) --- cmd/ethtest/main.go | 2 +- cmd/evm/main.go | 4 ++++ cmd/utils/flags.go | 7 +++++++ 3 files changed, 12 insertions(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go index 71465fb55..5663c2623 100644 --- a/cmd/ethtest/main.go +++ b/cmd/ethtest/main.go @@ -74,7 +74,7 @@ func runTestWithReader(test string, r io.Reader) error { var err error switch strings.ToLower(test) { case "bk", "block", "blocktest", "blockchaintest", "blocktests", "blockchaintests": - err = tests.RunBlockTestWithReader(params.MainNetHomesteadBlock, params.MainNetDAOForkBlock, r, skipTests) + err = tests.RunBlockTestWithReader(params.MainNetHomesteadBlock, params.MainNetDAOForkBlock, params.MainNetHomesteadGasRepriceBlock, r, skipTests) case "st", "state", "statetest", "statetests": rs := tests.RuleSet{HomesteadBlock: params.MainNetHomesteadBlock, DAOForkBlock: params.MainNetDAOForkBlock, DAOForkSupport: true} err = tests.RunStateTestWithReader(rs, r, skipTests) diff --git a/cmd/evm/main.go b/cmd/evm/main.go index 3f7370b10..952b32cd1 100644 --- a/cmd/evm/main.go +++ b/cmd/evm/main.go @@ -33,6 +33,7 @@ import ( "github.com/ethereum/go-ethereum/crypto" "github.com/ethereum/go-ethereum/ethdb" "github.com/ethereum/go-ethereum/logger/glog" + "github.com/ethereum/go-ethereum/params" "gopkg.in/urfave/cli.v1" ) @@ -222,6 +223,9 @@ func NewEnv(state *state.StateDB, transactor common.Address, value *big.Int, cfg type ruleSet struct{} func (ruleSet) IsHomestead(*big.Int) bool { return true } +func (ruleSet) GasTable(*big.Int) params.GasTable { + return params.GasTableHomesteadGasRepriceFork +} func (self *VMEnv) RuleSet() vm.RuleSet { return ruleSet{} } func (self *VMEnv) Vm() vm.Vm { return self.evm } diff --git a/cmd/utils/flags.go b/cmd/utils/flags.go index 9424a288d..58e3ebfcb 100644 --- a/cmd/utils/flags.go +++ b/cmd/utils/flags.go @@ -809,6 +809,13 @@ func MustMakeChainConfigFromDb(ctx *cli.Context, db ethdb.Database) *core.ChainC } config.DAOForkSupport = true } + if config.HomesteadGasRepriceBlock == nil { + if ctx.GlobalBool(TestNetFlag.Name) { + config.HomesteadGasRepriceBlock = params.TestNetHomesteadGasRepriceBlock + } else { + config.HomesteadGasRepriceBlock = params.MainNetHomesteadGasRepriceBlock + } + } // Force override any existing configs if explicitly requested switch { case ctx.GlobalBool(SupportDAOFork.Name): -- cgit v1.2.3 From ac0c5dd77f60d91b8cefef307dbda0e6b0e877be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Szil=C3=A1gyi?= Date: Fri, 14 Oct 2016 19:45:19 +0300 Subject: [release/1.4.18] cmd/geth, VERSION: bump version to 1.4.18 --- cmd/geth/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmd') diff --git a/cmd/geth/main.go b/cmd/geth/main.go index 5cf860b12..c4389e434 100644 --- a/cmd/geth/main.go +++ b/cmd/geth/main.go @@ -50,7 +50,7 @@ const ( clientIdentifier = "Geth" // Client identifier to advertise over the network versionMajor = 1 // Major version component of the current release versionMinor = 4 // Minor version component of the current release - versionPatch = 17 // Patch version component of the current release + versionPatch = 18 // Patch version component of the current release versionMeta = "stable" // Version metadata to append to the version string versionOracle = "0xfa7b9770ca4cb04296cac84f37736d4041251cdf" // Ethereum address of the Geth release oracle -- cgit v1.2.3