From 342cc122b43f01301d0188de1e333c32ed64ae8c Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 4 Aug 2014 16:25:53 +0200 Subject: Added general Pipe API --- ethpipe/pipe.go | 135 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 ethpipe/pipe.go (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go new file mode 100644 index 000000000..710fc4e7c --- /dev/null +++ b/ethpipe/pipe.go @@ -0,0 +1,135 @@ +package ethpipe + +import ( + "strings" + + "github.com/ethereum/eth-go/ethchain" + "github.com/ethereum/eth-go/ethcrypto" + "github.com/ethereum/eth-go/ethlog" + "github.com/ethereum/eth-go/ethstate" + "github.com/ethereum/eth-go/ethutil" + "github.com/ethereum/eth-go/ethvm" +) + +var logger = ethlog.NewLogger("PIPE") + +type Pipe struct { + obj ethchain.EthManager + stateManager *ethchain.StateManager + blockChain *ethchain.BlockChain + world *world +} + +func New(obj ethchain.EthManager) *Pipe { + pipe := &Pipe{ + obj: obj, + stateManager: obj.StateManager(), + blockChain: obj.BlockChain(), + } + pipe.world = NewWorld(pipe) + + return pipe +} + +func (self *Pipe) Balance(addr []byte) *ethutil.Value { + return ethutil.NewValue(self.World().safeGet(addr).Balance) +} + +func (self *Pipe) Nonce(addr []byte) uint64 { + return self.World().safeGet(addr).Nonce +} + +func (self *Pipe) Execute(addr []byte, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { + return self.ExecuteObject(self.World().safeGet(addr), data, value, gas, price) +} + +func (self *Pipe) ExecuteObject(object *ethstate.StateObject, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { + var ( + initiator = ethstate.NewStateObject([]byte{0}) + state = self.World().State().Copy() + block = self.blockChain.CurrentBlock + ) + + vm := ethvm.New(NewEnv(state, block, value.BigInt(), initiator.Address())) + + closure := ethvm.NewClosure(initiator, object, object.Code, gas.BigInt(), price.BigInt()) + ret, _, err := closure.Call(vm, data) + + return ret, err +} + +func (self *Pipe) Block(hash []byte) *ethchain.Block { + return self.blockChain.GetBlock(hash) +} + +func (self *Pipe) Storage(addr, storageAddr []byte) *ethutil.Value { + return self.World().safeGet(addr).GetStorage(ethutil.BigD(storageAddr)) +} + +func (self *Pipe) ToAddress(priv []byte) []byte { + pair, err := ethcrypto.NewKeyPairFromSec(priv) + if err != nil { + return nil + } + + return pair.Address() +} + +func (self *Pipe) TransactString(key *ethcrypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) error { + // Check if an address is stored by this address + var hash []byte + addr := self.World().Config().Get("NameReg").StorageString(rec).Bytes() + if len(addr) > 0 { + hash = addr + } else if ethutil.IsHex(rec) { + hash = ethutil.Hex2Bytes(rec[2:]) + } else { + hash = ethutil.Hex2Bytes(rec) + } + + return self.Transact(key, hash, value, gas, price, data) +} + +func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price *ethutil.Value, data []byte) error { + var hash []byte + var contractCreation bool + if rec == nil { + contractCreation = true + } + + var tx *ethchain.Transaction + // Compile and assemble the given data + if contractCreation { + script, err := ethutil.Compile(string(data), false) + if err != nil { + return err + } + + tx = ethchain.NewContractCreationTx(value.BigInt(), gas.BigInt(), price.BigInt(), script) + } else { + data := ethutil.StringToByteFunc(string(data), func(s string) (ret []byte) { + slice := strings.Split(s, "\n") + for _, dataItem := range slice { + d := ethutil.FormatData(dataItem) + ret = append(ret, d...) + } + return + }) + + tx = ethchain.NewTransactionMessage(hash, value.BigInt(), gas.BigInt(), price.BigInt(), data) + } + + acc := self.stateManager.TransState().GetOrNewStateObject(key.Address()) + tx.Nonce = acc.Nonce + acc.Nonce += 1 + self.stateManager.TransState().UpdateStateObject(acc) + + tx.Sign(key.PrivateKey) + self.obj.TxPool().QueueTransaction(tx) + + if contractCreation { + logger.Infof("Contract addr %x", tx.CreationAddress()) + } + + return nil +} -- cgit v1.2.3 From 0f84b9c30d06a59f20a2d33ffd1281d5e6e2681a Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 4 Aug 2014 16:34:55 +0200 Subject: Added exist method --- ethpipe/pipe.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 710fc4e7c..ca0a3416c 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -75,6 +75,10 @@ func (self *Pipe) ToAddress(priv []byte) []byte { return pair.Address() } +func (self *Pipe) Exists(addr []byte) bool { + return self.World().Get(addr) != nil +} + func (self *Pipe) TransactString(key *ethcrypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) error { // Check if an address is stored by this address var hash []byte -- cgit v1.2.3 From 4f0bda403ea332eeb477f8e56457423628772b19 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 5 Aug 2014 11:10:24 +0200 Subject: Added vm options for object execution --- ethpipe/pipe.go | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index ca0a3416c..876a953aa 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -13,11 +13,17 @@ import ( var logger = ethlog.NewLogger("PIPE") +type VmVars struct { + State *ethstate.State +} + type Pipe struct { obj ethchain.EthManager stateManager *ethchain.StateManager blockChain *ethchain.BlockChain world *world + + Vm VmVars } func New(obj ethchain.EthManager) *Pipe { @@ -40,19 +46,22 @@ func (self *Pipe) Nonce(addr []byte) uint64 { } func (self *Pipe) Execute(addr []byte, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { - return self.ExecuteObject(self.World().safeGet(addr), data, value, gas, price) + return self.ExecuteObject(&object{self.World().safeGet(addr)}, data, value, gas, price) } -func (self *Pipe) ExecuteObject(object *ethstate.StateObject, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { +func (self *Pipe) ExecuteObject(object *object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { var ( - initiator = ethstate.NewStateObject([]byte{0}) - state = self.World().State().Copy() - block = self.blockChain.CurrentBlock + initiator = ethstate.NewStateObject([]byte{0}) + block = self.blockChain.CurrentBlock + stateObject = object.StateObject ) + if self.Vm.State == nil { + self.Vm.State = self.World().State().Copy() + } - vm := ethvm.New(NewEnv(state, block, value.BigInt(), initiator.Address())) + vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address())) - closure := ethvm.NewClosure(initiator, object, object.Code, gas.BigInt(), price.BigInt()) + closure := ethvm.NewClosure(initiator, stateObject, object.Code, gas.BigInt(), price.BigInt()) ret, _, err := closure.Call(vm, data) return ret, err @@ -79,7 +88,7 @@ func (self *Pipe) Exists(addr []byte) bool { return self.World().Get(addr) != nil } -func (self *Pipe) TransactString(key *ethcrypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) error { +func (self *Pipe) TransactString(key *ethcrypto.KeyPair, rec string, value, gas, price *ethutil.Value, data []byte) ([]byte, error) { // Check if an address is stored by this address var hash []byte addr := self.World().Config().Get("NameReg").StorageString(rec).Bytes() @@ -94,7 +103,7 @@ func (self *Pipe) TransactString(key *ethcrypto.KeyPair, rec string, value, gas, return self.Transact(key, hash, value, gas, price, data) } -func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price *ethutil.Value, data []byte) error { +func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price *ethutil.Value, data []byte) ([]byte, error) { var hash []byte var contractCreation bool if rec == nil { @@ -106,7 +115,7 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price if contractCreation { script, err := ethutil.Compile(string(data), false) if err != nil { - return err + return nil, err } tx = ethchain.NewContractCreationTx(value.BigInt(), gas.BigInt(), price.BigInt(), script) @@ -133,7 +142,9 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price if contractCreation { logger.Infof("Contract addr %x", tx.CreationAddress()) + + return tx.CreationAddress(), nil } - return nil + return tx.Hash(), nil } -- cgit v1.2.3 From e71b198e3d8df1bd8b73bae9bc934b778a3115bf Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 5 Aug 2014 11:26:12 +0200 Subject: Renamed object to Object --- ethpipe/pipe.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 876a953aa..c00731b84 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -46,10 +46,10 @@ func (self *Pipe) Nonce(addr []byte) uint64 { } func (self *Pipe) Execute(addr []byte, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { - return self.ExecuteObject(&object{self.World().safeGet(addr)}, data, value, gas, price) + return self.ExecuteObject(&Object{self.World().safeGet(addr)}, data, value, gas, price) } -func (self *Pipe) ExecuteObject(object *object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { +func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { var ( initiator = ethstate.NewStateObject([]byte{0}) block = self.blockChain.CurrentBlock -- cgit v1.2.3 From 3c78e418fbe70cfb574302f00962cf7fac50f69e Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 5 Aug 2014 11:30:12 +0200 Subject: world => World --- ethpipe/pipe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index c00731b84..a9da66ab8 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -21,7 +21,7 @@ type Pipe struct { obj ethchain.EthManager stateManager *ethchain.StateManager blockChain *ethchain.BlockChain - world *world + world *World Vm VmVars } -- cgit v1.2.3 From 7d95e8624a3bdca4a68b2a7ff6ed133264088cc1 Mon Sep 17 00:00:00 2001 From: obscuren Date: Fri, 15 Aug 2014 16:19:10 +0200 Subject: Added message to closure && added change addresses --- ethpipe/pipe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index a9da66ab8..8a81734cd 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -61,7 +61,7 @@ func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price * vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address())) - closure := ethvm.NewClosure(initiator, stateObject, object.Code, gas.BigInt(), price.BigInt()) + closure := ethvm.NewClosure(ðstate.Message{}, initiator, stateObject, object.Code, gas.BigInt(), price.BigInt()) ret, _, err := closure.Call(vm, data) return ret, err -- cgit v1.2.3 From 4008ff32c903e6894f5fb4fb69c795641641d192 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sun, 17 Aug 2014 12:42:02 +0200 Subject: Mutan compile --- ethpipe/pipe.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 8a81734cd..800a71139 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -148,3 +148,12 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price return tx.Hash(), nil } + +func (self *Pipe) CompileMutan(code string) ([]byte, error) { + data, err := ethutil.Compile(code, false) + if err != nil { + return nil, err + } + + return data, nil +} -- cgit v1.2.3 From 7dacd7eb7818a336b3be99aea834093cf40a1b08 Mon Sep 17 00:00:00 2001 From: Cayman Nava Date: Sat, 6 Sep 2014 13:51:13 -0700 Subject: add pushtx to api Previously the software assumed use of an internal private key for use in all broadcasted transactions. This addition lets nodes relay pre-signed transactions originating from sources other than the node itself. --- ethpipe/pipe.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 800a71139..b7d3be041 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -149,6 +149,15 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price return tx.Hash(), nil } +func (self *Pipe) PushTx(tx *ethchain.Transaction) ([]byte, error) { + self.obj.TxPool().QueueTransaction(tx) + if tx.Recipient == nil { + logger.Infof("Contract addr %x", tx.CreationAddress()) + return tx.CreationAddress(), nil + } + return tx.Hash(), nil +} + func (self *Pipe) CompileMutan(code string) ([]byte, error) { data, err := ethutil.Compile(code, false) if err != nil { -- cgit v1.2.3 From 65a802c6787184951753ba2f79fdf60dce526721 Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 22 Sep 2014 14:51:21 +0200 Subject: Re-wrote Call and Execute to use the new vm messages --- ethpipe/pipe.go | 30 ++++++++++++++++-------------- 1 file changed, 16 insertions(+), 14 deletions(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index b7d3be041..7c3f491d3 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -1,6 +1,7 @@ package ethpipe import ( + "fmt" "strings" "github.com/ethereum/eth-go/ethchain" @@ -51,18 +52,19 @@ func (self *Pipe) Execute(addr []byte, data []byte, value, gas, price *ethutil.V func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price *ethutil.Value) ([]byte, error) { var ( - initiator = ethstate.NewStateObject([]byte{0}) - block = self.blockChain.CurrentBlock - stateObject = object.StateObject + initiator = ethstate.NewStateObject(self.obj.KeyManager().KeyPair().Address()) + block = self.blockChain.CurrentBlock ) - if self.Vm.State == nil { - self.Vm.State = self.World().State().Copy() - } + + self.Vm.State = self.World().State().Copy() vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address())) + vm.Verbose = true - closure := ethvm.NewClosure(ðstate.Message{}, initiator, stateObject, object.Code, gas.BigInt(), price.BigInt()) - ret, _, err := closure.Call(vm, data) + msg := ethvm.NewMessage(vm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) + ret, err := msg.Exec(object.Address(), initiator) + + fmt.Println("returned from call", ret, err) return ret, err } @@ -150,12 +152,12 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price } func (self *Pipe) PushTx(tx *ethchain.Transaction) ([]byte, error) { - self.obj.TxPool().QueueTransaction(tx) - if tx.Recipient == nil { - logger.Infof("Contract addr %x", tx.CreationAddress()) - return tx.CreationAddress(), nil - } - return tx.Hash(), nil + self.obj.TxPool().QueueTransaction(tx) + if tx.Recipient == nil { + logger.Infof("Contract addr %x", tx.CreationAddress()) + return tx.CreationAddress(), nil + } + return tx.Hash(), nil } func (self *Pipe) CompileMutan(code string) ([]byte, error) { -- cgit v1.2.3 From 82be3054961864dfd5bbeaec2ab961f593203dbf Mon Sep 17 00:00:00 2001 From: obscuren Date: Thu, 2 Oct 2014 17:03:15 +0200 Subject: Fixed inconsistencies --- ethpipe/pipe.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 7c3f491d3..f57b56ea0 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -143,9 +143,10 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price self.obj.TxPool().QueueTransaction(tx) if contractCreation { - logger.Infof("Contract addr %x", tx.CreationAddress()) + addr := tx.CreationAddress(self.World().State()) + logger.Infof("Contract addr %x\n", addr) - return tx.CreationAddress(), nil + return addr, nil } return tx.Hash(), nil @@ -154,8 +155,9 @@ func (self *Pipe) Transact(key *ethcrypto.KeyPair, rec []byte, value, gas, price func (self *Pipe) PushTx(tx *ethchain.Transaction) ([]byte, error) { self.obj.TxPool().QueueTransaction(tx) if tx.Recipient == nil { - logger.Infof("Contract addr %x", tx.CreationAddress()) - return tx.CreationAddress(), nil + addr := tx.CreationAddress(self.World().State()) + logger.Infof("Contract addr %x\n", addr) + return addr, nil } return tx.Hash(), nil } -- cgit v1.2.3 From b417766b36f46316cbae6fa42815f1a519e5f733 Mon Sep 17 00:00:00 2001 From: obscuren Date: Wed, 8 Oct 2014 11:59:44 +0200 Subject: Minor tweaks for poc7 --- ethpipe/pipe.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index f57b56ea0..1e1a2b835 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -61,7 +61,7 @@ func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price * vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address())) vm.Verbose = true - msg := ethvm.NewMessage(vm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) + msg := ethvm.NewExecution(vm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) ret, err := msg.Exec(object.Address(), initiator) fmt.Println("returned from call", ret, err) -- cgit v1.2.3 From c5bd32b0ad1a3d0fd20a3d1014cc8a97d889dc28 Mon Sep 17 00:00:00 2001 From: obscuren Date: Tue, 14 Oct 2014 11:48:52 +0200 Subject: Refactored VM to two separate VMs; std & debug Standard VM should be about 10x faster than the debug VM. Some error checking has been removed, all of the log statements and therefor quite some unnecessary if-statements. --- ethpipe/pipe.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 1e1a2b835..39ee0ef07 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -58,8 +58,7 @@ func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price * self.Vm.State = self.World().State().Copy() - vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address())) - vm.Verbose = true + vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()), ethvm.Type(ethutil.Config.VmType)) msg := ethvm.NewExecution(vm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) ret, err := msg.Exec(object.Address(), initiator) -- cgit v1.2.3 From 20c742e47406c13ebc6427951f6fcf1b0056ea26 Mon Sep 17 00:00:00 2001 From: obscuren Date: Sat, 18 Oct 2014 13:31:20 +0200 Subject: Moved ethvm => vm --- ethpipe/pipe.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 39ee0ef07..5e5ff7000 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -9,7 +9,7 @@ import ( "github.com/ethereum/eth-go/ethlog" "github.com/ethereum/eth-go/ethstate" "github.com/ethereum/eth-go/ethutil" - "github.com/ethereum/eth-go/ethvm" + "github.com/ethereum/eth-go/vm" ) var logger = ethlog.NewLogger("PIPE") @@ -58,9 +58,9 @@ func (self *Pipe) ExecuteObject(object *Object, data []byte, value, gas, price * self.Vm.State = self.World().State().Copy() - vm := ethvm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()), ethvm.Type(ethutil.Config.VmType)) + evm := vm.New(NewEnv(self.Vm.State, block, value.BigInt(), initiator.Address()), vm.Type(ethutil.Config.VmType)) - msg := ethvm.NewExecution(vm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) + msg := vm.NewExecution(evm, object.Address(), data, gas.BigInt(), price.BigInt(), value.BigInt()) ret, err := msg.Exec(object.Address(), initiator) fmt.Println("returned from call", ret, err) -- cgit v1.2.3 From 097ba56df59293f9225a8ecdc9e1c43a5ad891bb Mon Sep 17 00:00:00 2001 From: obscuren Date: Mon, 20 Oct 2014 11:53:11 +0200 Subject: Renamed block_chain to chain_manager --- ethpipe/pipe.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'ethpipe/pipe.go') diff --git a/ethpipe/pipe.go b/ethpipe/pipe.go index 5e5ff7000..50507143c 100644 --- a/ethpipe/pipe.go +++ b/ethpipe/pipe.go @@ -21,7 +21,7 @@ type VmVars struct { type Pipe struct { obj ethchain.EthManager stateManager *ethchain.StateManager - blockChain *ethchain.BlockChain + blockChain *ethchain.ChainManager world *World Vm VmVars @@ -31,7 +31,7 @@ func New(obj ethchain.EthManager) *Pipe { pipe := &Pipe{ obj: obj, stateManager: obj.StateManager(), - blockChain: obj.BlockChain(), + blockChain: obj.ChainManager(), } pipe.world = NewWorld(pipe) -- cgit v1.2.3